Help with functions

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Jan 2008
Posts: 20
Reputation: dbwalters is an unknown quantity at this point 
Solved Threads: 0
dbwalters dbwalters is offline Offline
Newbie Poster

Help with functions

 
0
  #1
Oct 15th, 2008
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.
Last edited by dbwalters; Oct 15th, 2008 at 11:44 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 20
Reputation: dbwalters is an unknown quantity at this point 
Solved Threads: 0
dbwalters dbwalters is offline Offline
Newbie Poster

Re: Help with functions

 
0
  #2
Oct 15th, 2008
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.
Last edited by dbwalters; Oct 15th, 2008 at 12:46 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,649
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Help with functions

 
0
  #3
Oct 15th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 20
Reputation: dbwalters is an unknown quantity at this point 
Solved Threads: 0
dbwalters dbwalters is offline Offline
Newbie Poster

Re: Help with functions

 
0
  #4
Oct 15th, 2008
The book I have the question from is "Algorithms in Java". So, I figure that this would be the appropriate place to ask the question. But, we can move this question so that I can get help by others.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,840
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 503
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: Help with functions

 
0
  #5
Oct 16th, 2008
Originally Posted by dbwalters View Post
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.
You can't take a logarithm of a negative number and it's irrelevant to this problem anyways since N is always positive for all the answers. If N is positive, then so is 2N^2, so the right side of the equation is positive.

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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 43
Reputation: shrughes is an unknown quantity at this point 
Solved Threads: 4
shrughes shrughes is offline Offline
Light Poster

Re: Help with functions

 
0
  #6
Oct 17th, 2008
Is this some kind of trick question? What is stopping you from trying out the different values of N and seeing the answer?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 8
Reputation: aashish.raina has a little shameless behaviour in the past 
Solved Threads: 1
aashish.raina aashish.raina is offline Offline
Newbie Poster

Re: Help with functions

 
0
  #7
Oct 25th, 2008
Hi
I am not that good in Math,,but having a first look at the options i think N>1 it will be the case.. as if N==0 lhs will be 0 and cat be greater than the LHS

correct me if i am wrong
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 846 | Replies: 6
Thread Tools Search this Thread



Tag cloud for Computer Science
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC