wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> WHICH IS LARGER?
(Message started by: pcbouhid on Nov 25th, 2005, 11:33am)

Title: WHICH IS LARGER?
Post by pcbouhid on Nov 25th, 2005, 11:33am
Which is larger, 100^300 or 300! (factorial of 300)?

Title: Re: WHICH IS LARGER?
Post by Michael_Dagg on Nov 25th, 2005, 11:41am
The latter by many orders of 10.

Title: Re: WHICH IS LARGER?
Post by JohanC on Nov 25th, 2005, 12:16pm
You could make use of [hide]Stirling's approximation for ln(n!) [/hide].
Then you get:
[hide]ln(300!) is approx. 300*ln(300)-300=1411.134...
which is larger than
ln(100^300)=300*ln(100)=1381.551... [/hide]

Title: Re: WHICH IS LARGER?
Post by Eigenray on Nov 25th, 2005, 1:24pm
The most elementary way to make that precise is to consider [hide]
log(300!) = sum(log n, n=1..300)
as an over-approximation to
int(log x, x=1..300) = 300 log 300 - 300 + 1[/hide]

Title: Re: WHICH IS LARGER?
Post by JocK on Nov 26th, 2005, 1:29am

on 11/25/05 at 11:33:37, pcbouhid wrote:
Which is larger, 100^300 or 300! (factorial of 300)?


What about 111^300 vs 300! ...?



(or: 367882^999999 vs 999999! for that matter...?)

Title: Re: WHICH IS LARGER?
Post by Deedlit on Nov 26th, 2005, 3:12pm
To approximate factorials more closely, you can use a more complicated version of Stirling's formula:

log (n!) = n log n - n + log n / 2 + log (2 pi) / 2 + [sum]k=1m (B2k / (2k (2k - 1) n2k-1 )) + x (B2m+2 / ((2m + 2)(2k + 1) n2m+1 )),

where x is between 0 and 1, and Bk is the kth Bernoulli number. You can cut off the series at any point for the desired level of accuracy.  For example, with m = 2:

log (n!) = n log n - n + log n / 2 + log (2 pi) / 2 + 1/(12n) - 1/(360 n3 + x / (1260 n5), with 0 < x < 1.

Applying the above, we get that log (999999!) lies between

12,815,504.56914761165997697178501711315368718154145293529

and

12,815,504.56914761165997697178501711315368797519621485195

and so 999999! lies between

367881.9525828613742098353957252121140716300871695073894999999

and

367881.9525828613742098353957252121140719220587249695342999999

Title: Re: WHICH IS LARGER?
Post by JocK on Nov 26th, 2005, 11:45pm
Hmmm.... should have asked:

"What is larger: 367881.9525828613742098353957252121140718999999 or 999999! ...?"

;D



Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 1st, 2007, 3:34pm
Quit answering with questions. 300! is higher, but by one digit!

Title: Re: WHICH IS LARGER?
Post by mikedagr8 on Sep 1st, 2007, 4:26pm

Quote:
Quit answering with questions. 300! is higher, but by one digit!


By one digit, do you mean that 4>3 or 15>4? Because one digit makes an awful lot of difference.

Title: Re: WHICH IS LARGER?
Post by cool_joh on Sep 1st, 2007, 4:52pm
[hide]We first show that the product of n consecutive natural numbers is greater than the nth power of the square root of the product of the first and last of these numbers. Let the n integers be a, a+1, ..., a+n-1. Then the kth number from the beginning will be a+k-1, and the kth number from the end will be a+n-k. Their product is: (a+k-1)(a+n-k) = a^2+an-a+(k-1)(n-k) &#8805; a^2+an-a = a(a+n-1)
where the equality is obtained only for k=1 or k=n. That is the product of two positive integers equidistant respectively from each end of the sequence (for odd n, the two integers are taken to be the common middle one) always exceeds the product of the two extreme (first and last) integers. But then we have, the product of all the numbers,
a(a+1)...(a+n-1) &#8805; [a(a+n-1)]^(n/2)
where the equality holds only if n=1 or n=1.

We shall show now that 300!>100^300.

We have 1*2*3*...*25>25^(25/2)=5^25
26*27*...*50>(26*50)^(25/2)>35^25
51*...*100>(51*100)^(25)>70^50
101*...*200>100^50 * 200^50 = 100^200 * 2^50
201*...*300>200^50 * 300^50 = 10^200 * 2^50 * 3^50

If we multiply together all the left members of these inequalities and compare the results with the product of all the right members, we obtain
300!>5^25 * 35^25 * 70^50 * 10^400 * 2^100 * 3^50 = 5^50*7^25*5^50*14^50*10^400*2^100*3^50 = 10^500^21^25*42^25*14^25 >10^500*20^25*40^25*14^25
=10^550*2^25&4^25&14^25 = 10^550*112^25 = 10^600*1,12^25 > 10^600=100^300


[/hide]

Title: Re: WHICH IS LARGER?
Post by ThudanBlunder on Sep 1st, 2007, 6:18pm
cool_joh, not a bad answer for someone who doesn't know the difference between 'dave' (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_medium;action=display;num=1188654266) and 'deaf'.   ::)

Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 1st, 2007, 7:18pm
Maybe he meant daft.

Title: Re: WHICH IS LARGER?
Post by cool_joh on Sep 1st, 2007, 9:12pm

on 09/01/07 at 18:18:40, ThudanBlunder wrote:
cool_joh, not a bad answer for someone who doesn't know the difference between 'dave' (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_medium;action=display;num=1188654266) and 'deaf'.   ::)


;D I have solved this a few months ago. But in Indonesian (I'm really poor in English) :-[

Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 25th, 2007, 5:03pm
Calculaters don't help in these questions since it makes such high numbers become something e+something(whatever that represents).

Title: Re: WHICH IS LARGER?
Post by ThudanBlunder on Sep 25th, 2007, 5:46pm

on 09/25/07 at 17:03:19, srn347 wrote:
Calculaters don't help in these questions since it makes such high numbers become something e+something(whatever that represents).

Such questions are not meant to be solved with calculators.
e+some integer means 10 to the power of 'some integer'.

Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 25th, 2007, 7:49pm
So it's scientific notation. Why don't the calculaters just show the exponent in the form of an exponent?

Title: Re: WHICH IS LARGER?
Post by mikedagr8 on Sep 25th, 2007, 8:06pm

on 09/25/07 at 19:49:25, srn347 wrote:
So it's scientific notation. Why don't the calculaters just show the exponent in the form of an exponent?

Well, if you plan to display every single digit, go for it. The calculator isn't stupid enough to waste it's time, so it just simplifies it, making it easier for all.

Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 25th, 2007, 8:09pm
I meant why not represent n10x as n10x instead of n+ex.

Title: Re: WHICH IS LARGER?
Post by Sameer on Sep 25th, 2007, 8:48pm

on 09/25/07 at 20:09:10, srn347 wrote:
I meant why not represent n10x as n10x instead of n+ex.


The E in calculator is not same as the constant e. But you should know that already, right?

Title: Re: WHICH IS LARGER?
Post by srn347 on Sep 25th, 2007, 8:55pm
I know. It isn't the same as 14 in base 15 or higher either. But why use it instead of exponents?

Title: Re: WHICH IS LARGER?
Post by ima1trkpny on Sep 25th, 2007, 10:34pm

on 09/25/07 at 20:55:23, srn347 wrote:
I know. It isn't the same as 14 in base 15 or higher either. But why use it instead of exponents?


Because if you know E means multiplied by 10 to the power of some integer, the format of say 6E-7 is less work than showing it as 6(10-7). It is just a simplification.

Title: Re: WHICH IS LARGER?
Post by Obob on Sep 27th, 2007, 9:38pm
Calculators use E instead of exponents because simple calculators with digital displays can't possibly express exponents (i.e. superscripts), and because the E notation takes less room.  When space is at a premium (as it is on an 8 to 10 digit calculator display) it is important to make the best use possible of the space given.  



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board