Divide et impera asked to divide the set of integers from 1 to 15 into two subsets A & B,
so that the sum of the numbers in A equals the product
of the numbers in B.
Instead of an upper limit of 15, use n to stand for any positive integer.
Find, with proof for what values of n the task is possible?
Charlie's data points the way to a solution.
If n=odd, B=1, (n-1)/2, (n-1).
If n=even, B=1, (n/2)-1, n.
Since Sum(A)+Sum(B)=(n*(n+1))/2 only a little algebra is needed.
This method clearly doesn't get all solutions but it shows solutions exist except for n=1,2,4.
|
Posted by xdog
on 2015-08-26 18:26:37 |