T.R | Title | User | Personal Name | Date | Lines |
---|
513.1 | Intuition | BEING::RABAHY | | Mon Jun 16 1986 11:39 | 1 |
| My first guess is a set of fifty twos.
|
513.2 | | JON::MORONEY | This space for rent. | Mon Jun 16 1986 11:54 | 16 |
| I looked at the following:
50 25 20 10 50 25 20 10
2 , 4 , 5 , 10 . Turns out 2 = 4 > 5 > 10 >...
2 3 32 48 33
But, since 3 > 2 , 3 > 2 . So next "guess" would be 3 * 1.
But that "1" doesn't increase the product any, so lets get rid of it.
The expression is ..*3*3*3*1, if we change the last two factors to 2*2, we
get a larger product since 2*2 > 3*1 So my guess is
32 32
3 * 2 * 2 or 3 * 4.
-Mike
|
513.3 | | BEING::POSTPISCHIL | Always mount a scratch monkey. | Mon Jun 16 1986 12:20 | 6 |
| Re .1, .2:
Sets don't contain multiple copies of anything.
-- edp
|
513.4 | No duplicates | BEING::RABAHY | | Mon Jun 16 1986 12:41 | 1 |
| I guess {2,3,5,6,7,8,9,10,11,12,13,14}.
|
513.5 | I had intended duplicates to be o.k. | SIERRA::OSMAN | and silos to fill before I feep, and silos to fill before I feep | Mon Jun 16 1986 17:07 | 19 |
| As the submitter of .0, I intended multiples to be allowed.
So, either we replace the word "set of integers" with something
else, or we announce that {3,3,3...} doesn't mean multiple COPIES
of 3, but distinct 3's. Hence we can continue to use the word "set".
Anyway, the question about a set with non-duplicates is an interesting
one too.
By the way, all 3's except for two 2's is what I believe the answer
to the original question is. The "reason" the answer only includes
2's and 3's is related to the fact that the number "e" (natural
logarithm base) falls between 2 and 3.
The dependence on "e" can be more clearly seen if you attempt
to find a collection of positive REALS that add to 100 and multiply
to a maximum.
/Eric
|
513.6 | | CLT::GILBERT | Juggler of Noterdom | Mon Jun 16 1986 22:28 | 24 |
| A multiset is analogous to a set, but elements may appear more than once.
Duplicate elements are indicated with count�element. For example, the
multiset {1,1,1,1,2,3,3} can be written {4�1,2,2�3}.
Lemma 1: A multiset with sum = N that maximizes the product of elements
contains no elements > 4.
Proof: Assume m > 4 is an element of a multiset that maximizes the
product. But m can be replaced by the two elements 2 and m-2,
yielding the same sum, and a larger product. Thus, m cannot
be an element of the multiset, and the lemma is proved.
Similarly, we can easily show that any multiset that maximizes the product
may contain at most one 3 (since 2*4 > 3*3), need contain no 4s (since 4 = 2*2),
and that, if the sum > 1, there are no 1s (either 2 > 1*1 or 2*(m-1) > 1*m).
Thus, a maximal multiset is either {1} (if N = 1), or several 2s and possibly
a 3. Finally, we note that the 3 must be present iff N is odd. Altogether,
For N = 1, the multiset is {1},
for N even, the multiset is {(N/2)�2},
and for N odd and > 1, the multiset is {((N-1)/2)�2,3}.
Other maximal multisets result from substituting 4 for pairs of 2s.
|
513.7 | 2*4 > 3*3 ? | TLE::FAIMAN | Neil Faiman | Tue Jun 17 1986 09:42 | 8 |
| Re .6:
> Similarly, we can easily show that any multiset that maximizes the product
> may contain at most one 3 (since 2*4 > 3*3), need contain no 4s (since 4 = 2*2),
2*4 > 3*3 ?
-Neil
|
513.8 | | CLT::GILBERT | Juggler of Noterdom | Tue Jun 17 1986 16:47 | 18 |
| Oh dear. Let's pick up 513.6 where it started to go afoul.
Similarly, we can easily show that any multiset that maximizes the product
may contain at most two 2s (since 3*3 > 2*2*2), need contain no 4s (since
4 = 2*2), and that, if the sum > 1, there are no 1s (either 2 > 1*1 or
2*(m-1) > 1*m).
Thus, a maximal multiset is either {1} (if N = 1), or several 3s and two,
one or no 2s. Finally, we note that the number of 2s can be determined
as a function of N mod 3. Altogether,
For N = 1, the multiset is {1},
otherwise, a maximal multiset is
{y�3}, with y = N/3, if N mod 3 = 0,
{2,2,y�3} or {y�3,4}, with y = (N-4)/3, if N mod 3 = 1, or
{2,y�3}, with y = (N-2)/3, if N mod 3 = 2.
Or simply, {x�2,y�3}, where x = 2 - (N+2) mod 3, and y = (N-2x)/3.
|
513.9 | | CLT::GILBERT | Juggler of Noterdom | Tue Jun 17 1986 18:58 | 19 |
| re 513.5 (same problem, but with a set of positive reals)
Let us find a set of real positive numbers, with sum S,
for which the product is maximized. Now, all the numbers
must be equal; otherwise, we could take two different numbers
a-b and a+b and replace them by a and a, giving the same sum,
but a larger product, since a*a > (a-b)(a+b) = a^2 - b^2.
Given S, the only freedom we have in maximizing the product
is the choice of N, the number of numbers. Each number is S/N
(since N of them sum to S), and the product is (S/N)^N. We
note that the continuous function f(N) = (S/N)^N is concave
downward, with a maximum at N = S/e. To maximize f(N) with an
integer N, we have either N = floor(S/e) or N = ceiling(S/e).
Does anyone have an idea of how to determine, in general, whether
the floor or ceiling should be used? (yeah, I know, try 'em both).
For example, will S/e rounded to the nearest integer always maximize
the product for integer S?
|
513.10 | e is closer to 3 than 2. | SIERRA::OSMAN | and silos to fill before I feep, and silos to fill before I feep | Wed Jun 18 1986 11:42 | 10 |
| Well, you were so quick at comparing e**pi and pi**e (q.v.) without
"trying them both", so I'd think you could just as effectively
compare ceiling and floor of (S/e) ! :-)
Anyway, perhaps a small amount of analysis of the derivative will
reveal which is better, floor or ceiling. Perhaps we might
even cheat a little to help the analysis by using the fact that
e is closer to 3 than 2. Would this help ?
/Eric
|
513.11 | just a few comments | 4GL::GILBERT | Ownership Obligates | Mon Nov 27 1989 12:08 | 23 |
| Sometimes S/e should be rounded down, sometimes up. Let's find values of S
that are 'borderline': rounding either way is just as good. These S values
have:
/ S \ [S/e] / S \ [S/e]+1
( ----- ) = ( ------- )
\ [S/e] / \ [S/e]+1 /
where [x] is the floor function. Rearranging the above, we have:
1 [S/e]
S = ([S/e]+1) ( 1 + ----- )
[S/e]
Now as S (and [S/e]) increases, the expression (1 + 1/[S/e])^[S/e] approaches
e from below. This makes the above equation for S rather interesting:
S = ([S/e]+1) (e-delta)
Substituting this into itself gives:
S = ([ ([S/e]+1)(e-delta)/e ]+1) (e-delta)
= ([ ([S/e]+1)(1-delta/e) ]+1) (e-delta)
= ( [S/e] +1) (e-delta)
|