Classic problem of DP + bit´s...like knapsack

2011/7/30 saurabh singh <saurab...@gmail.com>

> when i said pick elements in descending order,it meant sorting them.Sorry
> for being unclear.
> But i am open to any discussion about my logic because its pure intuition
> based algo,so it may be having lots of loop holes.
>
>
> On Sun, Jul 31, 2011 at 7:02 AM, saurabh singh <saurab...@gmail.com>wrote:
>
>> @Amol according to my algo
>> group 1=9 4 3
>> group 2= 7 8 1
>>
>> Think again....
>>
>>
>> On Sat, Jul 30, 2011 at 6:27 PM, Gary Drocella <gdroc...@gmail.com>wrote:
>>
>>> To Solve This Problem, I would
>>> 1. Sort the given list S by their respective strengths.
>>> 2. Then I would create two other lists A and B for respective
>>> partitions.
>>> 3. (a) Remove First and Last from S add them both to A
>>>    (b) Remove First and Last from S add them both to B
>>> 4. Repeat Step 3 until there is 1 or 0 people left in which if there
>>> is 1 person left we would print NO
>>> 0 people we successfully partitioned the teams into equal strengths.
>>>
>>> This is just off the top of my head though, so not sure if it will
>>> completely work :)
>>>
>>> On Jul 30, 8:37 am, Amol Sharma <amolsharm...@gmail.com> wrote:
>>> > @saurabh- your algo has very high probability of failure
>>> >
>>> > take the case  9,7,8,4,3,1
>>> >
>>> > acc to ur algo
>>> > group 1 is  9,8,3  strength =20
>>> > group 2 is  7,4,2  strength =13
>>> >
>>> > but it is possible to divide them into 2 equal grp's
>>> > take
>>> > G1 - 9,4,3  total =16
>>> > G2 - 7,8,1  total =16
>>> >
>>> > so we have to think of some better algo
>>> > --
>>> >
>>> > Amol Sharma
>>> > Third Year Student
>>> > Computer Science and Engineering
>>> > MNNIT Allahabad
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Sat, Jul 30, 2011 at 5:51 PM, shubham <shubh2...@gmail.com> wrote:
>>> > > hey sylvester,
>>> > > just clarify the problem ..
>>> >
>>> > > Is it such that in forming the group some people can be left out
>>> > > or
>>> > > the sum of the number of people in both partitions is equal to the
>>> total
>>> > > number of people
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups
>>> > > "Algorithm Geeks" group.
>>> > > To view this discussion on the web visit
>>> > >https://groups.google.com/d/msg/algogeeks/-/gVAGoc_nYhAJ.
>>> >
>>> > > 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?hl=en.
>>>
>>> --
>>> 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?hl=en.
>>>
>>>
>>
>>
>> --
>> Saurabh Singh
>> B.Tech (Computer Science)
>> MNNIT ALLAHABAD
>>
>>
>>
>
>
> --
> Saurabh Singh
> B.Tech (Computer Science)
> MNNIT ALLAHABAD
>
>
>  --
> 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?hl=en.
>



-- 
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
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?hl=en.

Reply via email to