negative numbers aren't important because could find the maximum negative
(for instance, -M)  number and then
create  a new set {a+M for all a in initial set }



Wladimir Araujo Tavares
http://www.si.ufc.br/~wladimir <http://www.si.ufc.br/%7Ewladimir/>
"Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos."




On Tue, Aug 31, 2010 at 9:15 PM, Wladimir Tavares <[email protected]>wrote:

> given a set of n number a_i sum up to M ,you use 2 dimensional table array
> m[0..M], m[i][b] indicate whether b can be hit using only
> {a_1,a_2,...,a_i},where each row only depends on the previous rows.
>
> the inner j-loop check if the previous row m[i][j-arr[i]] can be hit then
> m[i+1][j] will be hit.
>
>
>
>
> Wladimir Araujo Tavares
> http://www.si.ufc.br/~wladimir <http://www.si.ufc.br/%7Ewladimir/>
> "Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos."
>
>
>
>
> On Tue, Aug 31, 2010 at 10:13 AM, Chi Hoang <[email protected]> wrote:
>
>> Pairs of:
>>
>> ['1_2']
>> ['1_3']
>> ['1_4']
>> ['1_5']
>> ['1_6']
>> ['1_7']
>> ['2_3']
>> ['2_4']
>> ['2_5']
>> ['2_6']
>> ['2_7']
>> ['3_4']
>> ['3_5']
>> ['3_6']
>> ['3_7']
>> ['4_5']
>> ['4_6']
>> ['4_7']
>> ['5_6']
>> ['5_7']
>> ['6_7']
>>
>> N^2-(N-1).
>>
>>
>> Am 31.08.2010 14:37, schrieb Maria:
>> > @Wladmir- Can u plz explain ur code???
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<algogeeks%[email protected]>
>> .
>> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to