@DufusCan u pls give the algorithm about how to do this?

On Fri, Aug 14, 2009 at 8:56 PM, Dufus <rahul.dev.si...@gmail.com> wrote:

>
> If the range is given then it get reduced to a standard problem which
> can be solved by DP in O(k.n^2) time..where n integers within range
> 0...K have to be partitioned in two sets S1 and S2 such that the
> difference of sum of their elements is min.
>
> _dufus
>
> On Aug 14, 6:27 pm, fundoonick <fundoon...@yahoo.co.in> wrote:
> > Problem:
> > I have a set of positive integers. I have to divide it into 2 sets such
> that
> > the difference of the sums of both sets is minimum.
> > For ex, the given set of +ve integers is: 1,2,3,4
> > I divide it into 2 sets {1,4} and {2,3} such that the difference of their
> > sum (1+4=)5 - (2+3=)5 = 0
> > This is the least possible difference.
> >
> > Pls help.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to