| | |
Help with functions
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Jan 2008
Posts: 20
Reputation:
Solved Threads: 0
Hello, I am trying to find out the folowing question:
For what integer values of N is 10N lg N > 2N^2 ?
a) 0 <= N <= 12
b) 1 < N <= 12
c) 0 < N < 12
d) 0 < N < 13
I think the answer is B because you get an error if using a negative number. But, I was hoping that someone might be able to explain how to figure this question out.
For what integer values of N is 10N lg N > 2N^2 ?
a) 0 <= N <= 12
b) 1 < N <= 12
c) 0 < N < 12
d) 0 < N < 13
I think the answer is B because you get an error if using a negative number. But, I was hoping that someone might be able to explain how to figure this question out.
Last edited by dbwalters; Oct 15th, 2008 at 11:44 am.
But how is this related to Java? If you have a Java program which doesn't behave as expected for the above problem, post it, otherwise I would be moving this to the Computer Science sub-forum.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
•
•
Join Date: Jan 2008
Posts: 3,840
Reputation:
Solved Threads: 503
•
•
•
•
One thing I should add is that when I try to plug in a number less than 0, I get an error. When I try a number between 0 and 1 I get this:
10(0.1) (lg 0.1) > 2(0.1)^2
-1 > 0.02
Thus this is why I pick B as my answer.
For the left side, since N is positive, so is 10N. Logarithms of numbers less than 1 are negative, so logN is negative for N < 1, so when N is less than 1, you are multiplying a positive times a negative and the result is a negative. Again, the right side of the equation is positive. A negative number cannot be greater than a positive number, so you can cross off any answer where N can be less than 1. That leaves only one answer left: B. So you got it right.
![]() |
Similar Threads
- VB's Left, Right, Mid Functions in C++? (C++)
- User defined functions (C++)
- Double Linked Lists and Functions required (C++)
- How to write FNVAL functions (Java)
- I dont see any difference between these 2 functions, DO YOU? (C)
- access Digital Camera Functions (C++)
Other Threads in the Computer Science Forum
- Previous Thread: Towers of Hanoi
- Next Thread: Nested method calls in UML
Views: 846 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for Computer Science
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computers computerscience computertrackingsoftware connect csc data dataanalysis dataintepretation development dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosure foreclosuresoftware gadgets geeks givemetehcodez graphics hardware history homeowners homework homeworkassignment homeworkhelp humor ibm idea internet iphone ipod itcontracts laws lazy linkbait lsmeans mainframes marketing mining mobileapplication msaccess nano networking news os p2p parser piracy piratebay principles programming rasterizer sam-being-cute sas science sex simulation software spoonfeeding spying sql stephenfry student study supercomputer supercomputing sweden technology textfield tree turing turingtest uk virus warehouse ww2






