Partitioning set into subsets with respect to equality of sum among subsets

Posted by Al.Net on Programmers See other posts from Programmers or by Al.Net
Published on 2012-06-16T18:49:08Z Indexed on 2012/06/16 21:22 UTC
Read the original article Hit count: 215

Filed under:
|
|

let say i have {3, 1, 1, 2, 2, 1,5,2,7} set of numbers, I need to split the numbers such that sum of subset1 should be equal to sum of subset2 {3,2,7} {1,1,2,1,5,2}. First we should identify whether we can split number(one way might be dividable by 2 without any remainder) and if we can, we should write our algorithm two create s1 and s2 out of s.

How to proceed with this approach? I read partition problem in wiki and even in some articles but i am not able to get anything. Can someone help me to find the right algorithm and its explanation in simple English?

© Programmers or respective owner

Related posts about c#

Related posts about algorithms