Hi all
I have some real trouble trying to first read the algorithm for the balanced Partition Problem and then trying to understand it, as i find to be unique among those who have this unusual skill of lacking a sense to read and understand algorithms.
Every forum on the topic of the balanced partition problem has a link to MIT’s tutorial video on it. the link is [URL=“http://people.csail.mit.edu/bdean/6.046/dp/”]http://people.csail.mit.edu/bdean/6.046/dp/
For any n integers a1…ak split into two parts such that their difference of their sum is minimum. I get the idea on how this works (i.e) Given N integers eg:5 8 13 27 14 the minimum sum is 3 as (13+8+14)-(5+27)=3[URL=“http://people.csail.mit.edu/bdean/6.046/dp/”].
In the video above i don’t understand the derivation of how P(i,j)=1 if there is a subset of values a1…ai having a sum j and 0 otherwise and how to split the range of “i” in P(i,j) to 1…n and j to 0…nk?
I dont first understand the derivation and i am clueless on translating p(i,j)
It would be of great help if anybody could explain the derivation and the maths behind it with examples and i could use that to code the solution.