Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Solve for n

Name: Anonymous 2010-03-01 17:10

Hello /sci/,

I was reading a book on the analysis of algorithms at the library today, and I had some time so I was doing the exercises. One of the questions was:

Suppose program A takes (2^n)/1000 units of time and prgram B takes 1000 * n^2 units. For what values of n does program A take less time than program B?

None of the mathematics I could remember got me to a stage where I could work out the value of n. The only options I could think of was a) taking a guess and then improving it iteratively or b) ask wolfram alpha.

Doing it iteratively, I get n = 30, since I wanted a non-negative integer and asking wolfram alpha to "solve 1000 * n ^ 2 = 2 ^ n / 1000" gives me some answer involving "the analytic continuation of the product log function" which I don't understand :(

So what I would like to know is, is there a simple way to get the answer algebraicly that I have missed? Help and/or abuse welcome.

Name: Anonymous 2010-03-01 21:26

Ok, I did it algebraicly and solved it taunting the solution, wich gave me 16

The final equation was

\frac{2^n}{n}>4000

I guess this is as far as I can get.

Name: Anonymous 2010-03-01 22:52

u just solve  1000 * n ^ 2 < 2 ^ n / 1000 for n as you said.

Name: Anonymous 2010-03-02 3:48

>>2
thanks anyway

>>3
( ≖‿≖)

Name: Anonymous 2010-03-02 6:45

>>3

well... he wanted the solution to that, and I gave it to him. What I meant with "this is as far as I can get" was thta I don't know a crap about "the analytic continuation of the product log function".

Also, giving the same equation to wolframAlpha, gave me the same answer that had OP. So it must be solved with something of analysis that I don't know.

Name: Anonymous 2010-03-08 13:59

>>3
Such an equation is simply nastay. You can't just go for an exact solution but you can get iteratively close. There's a reason/theorem behind this but I totally can't remember what.

You're just looking for an integer, so leave well enough alone, I'd say.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List