PDA

View Full Version : Finding the value of n in nlog(n)


-A-
Sep11-10, 03:37 PM
1. The problem statement, all variables and given/known data

Pretty simply, if you have an inequality like c1*n^2<c2*n*log(n), how do you find the values of n for this without plugging in diifferent values and substituting? Or a question like nlog(n)=k where k is a constant.

2. Relevant equations
Umm...thats it.


3. The attempt at a solution
I just plugged in solutions or thought I'd use MATLAB or something. This isn't actually my homework, but it comes up a lot in complexity questions, and I need to know hot to solve it.

praharmitra
Sep11-10, 10:11 PM
There is no analytic way to solve the above question. But you could ballpark the answer by drawing graphs. nlog(n) = k => log(n) = 1/n. Draw both graphs and find out the answer.

Or you could solve this problem using the Lambert W function, which is about as close you can get to an analytic solution.

http://en.wikipedia.org/wiki/Lambert_W_function