Wednesday, April 3, 2013

Problem solving slog

                          Products of sums
   1)Understand the problem
    The problem was stated as following:

    For this question, I interpret it as this: If all the positive integers in a list add up to n( no matter how many elements there is), we need to find a certain kind of way to organize the list so that the product of every elements is maximized. As the example shows in the question, if the integers add up to 2, there are two different lists:[1,1] and [2]. And the second one has a bigger integer so it is the list we are trying to find.

2) Device a plan or two. What is the best case result you expect from the plan?
     For the second part, I come up with a plan. Firstly, I would write down the example with the sum of several small positive integers like 1,2,3,4... For each integer, I would think carefully to write down all possible lists with the sum of that integer.According to the examples I write, I would find out the regular patterns they share and what is similar among all the examples. To make it not a mess, I would write down the lists according to some regulations and orders. For example, every factor in a list must be bigger than 1 and less than the sum number itself. Larger numbers occurs last in a list. And longer list should followed by a shorter one. In addition, I would try to avoid duplicate lists.
    I also make a conjecture.If n is an even number, then the list with the maximum sum should be [n/2, n/2]. And if n is an odd number, then the list with the maximum sum should be[(n-1)/2, (n+1)/2]. This is the best case result I expect for my plan.

3) Carry out and verify your plan.
     To carry out my plan,the first step is to write some examples.
  1. n = 1 lists: [1] the expected list:[1]
  2. n = 2 lists: [1,1],[2] the expected list:[2]
  3. n = 3 lists: [1,1,1],[2,1],[3] the expected list[3]
  4. n = 4 lists: [1,1,1,1],[2,1,1],[2,2],[3,1],[4] the expected lists[2,2] or [4]
  5. n = 5 lists: [1,1,1,1,1],[2,1,1,1],[2,2,1],[2,3],[4,1],[5] the expected list[2,3]
  6. n = 6 lists:[1,1,1,1,1,1],[2,1,1,1,1,1],[2,2,1,1],[2,2,2],[2,3,1],[3,3],[3,1,1],[4,2],[4,1,1],[5,1],[6] expected list[3,3]
......
 From the examples I write above, I figured out one regular pattern. When n is larger than or equal to 4, if n is an even number, then the list with the maximum sum should be [n/2, n/2]. And if n is an odd number, then the list with the maximum sum should be[(n-1)/2, (n+1)/2]. But when n is less than or equal to 4, the list with the maximum sum should be[n].

4) Look back, figure out when and how you become stuck, and what insights represented a breakthrough.
   From the carrying out part, I found out that my original conjecture is partly true.It is true when n is larger than or equal to 4 and false otherwise. Even though it is not totally right, I still gain some confidence for my conjecture is very near the truth. When looking back, I became stuck when I was examine the first four examples since they do not follow the conjecture I made. Which makes me confused. However, there is a breakthrough when I examined the fifth example cause it follows my conjecture. Which is even better is that when n becomes larger and larger, they all follow my version of pattern that if n is an even number, then the list with the maximum sum should be [n/2, n/2]. And if n is an odd number, then the list with the maximum sum should be[(n-1)/2, (n+1)/2].

Conclusion: I have found that this problem solving process is very interesting and challenging. Since I solve the problem finally, it makes me like thinking and want to challenge something more!
     

No comments:

Post a Comment