jupa86
November 12th, 2010, 11:39 AM
Hi everyone!
I need some help to find a recurrence formula to the next problem.
I have a sequence of positive numbers of size N and I need to distribute N-1 parentheses in the sum of these positive integers. For example if I have the sequence (for N=4) 4,1,2,3 then a posible distribution is:
((4+1)+(2+3)) and other is (4+((1+2)+3)) but the objetive of this probles is using Dynamic Programming find the minumum sum of the intermediate sums ie in the first example (4+1)=5 (one of the intermediate sums) (2+3) = 5 (the second) and the third (5+5)=10 then the sum in this case is 5+5+10 = 20 and for the second case the sum is 3 + 6 + 10 = 19.
I hope someone could understand my explanation and help me.
Thank's
I need some help to find a recurrence formula to the next problem.
I have a sequence of positive numbers of size N and I need to distribute N-1 parentheses in the sum of these positive integers. For example if I have the sequence (for N=4) 4,1,2,3 then a posible distribution is:
((4+1)+(2+3)) and other is (4+((1+2)+3)) but the objetive of this probles is using Dynamic Programming find the minumum sum of the intermediate sums ie in the first example (4+1)=5 (one of the intermediate sums) (2+3) = 5 (the second) and the third (5+5)=10 then the sum in this case is 5+5+10 = 20 and for the second case the sum is 3 + 6 + 10 = 19.
I hope someone could understand my explanation and help me.
Thank's