jack: (Default)
[personal profile] jack
One of Gerald Duck's question was: Which is greater, pi^e or e^pi? I happened to be doing something related yesterday, and was sufficiently amused to continue here.

Spoilers

SNAPE KILLS DUMBLEDORE! Just kidding.

e^pi is greater for any value of pi.

The other question was, "Given a set of n positive integers which sum to 100, what is their maximum product?"

If you relax the constraint on being integers, and there being an integer number of them, and assume they are all the same, you get "Observe that (100/n)^n is low at n=1 and n=100. Where is the maximum?" and differentiating by n (with product and chain rule and letting n=e^logn), you find, unsurprisingly, the answer is always e.

Of course, for the problem with integers, it suggests a sum of 3s is correct, but it's easier to prove it by showing any change makes it smaller.

But it incidentally solves Gerald Duck's problem -- e^x is inherently a maximum :)

Date: 2007-07-23 03:11 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
It's ok, I had a proper proof for integers before thinking about reals (none =1 or >4; at most two 2s; a most one 4; can't have both 2 and 4). But I forgot to explain there.

Date: 2007-07-23 03:59 pm (UTC)
From: [identity profile] drswirly.livejournal.com
(none =1 or >4; at most two 2s; a most one 4; can't have both 2 and 4)

More concisely: since 2+2 = 2*2, you can ignore 4 as well, so you're left with just 2s and 3s, and at most two 2s. (We're only after the biggest total, not the number of ways of writing it!)

Date: 2007-07-23 04:12 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Mmm, yes, ok. That would eliminate one more step.

Date: 2007-07-23 05:05 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
OK, two steps.

(i) Can't have 1s.
(ii) WLOG can't have 4s or bigger.
(iii) Can't have three 2s.

Doesn't give you all both possibilities, but gives you the max.

Date: 2007-07-23 06:25 pm (UTC)
From: [identity profile] drswirly.livejournal.com
Indeed.

(i) n > 1*(n-1), so 1s are always useless

(ii) pulling out a 2 is at least as good if and only if 2(n-2) >= n, which is true iff n >= 4, therefore no point in using 4 or more

(iii) 2+2+2 = 3+3 but 2*2*2 < 3*3 (which is something I love writing down in a degree-level supervision!), so at most two 2s.

Active Recent Entries