Python Forum
a solution to the Subset Sum Problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a solution to the Subset Sum Problem
#14
@league55: what 2-set do you mean that has a sum of 0?

Output:
>>> sum({-3,13})==0 False >>>

Output:
>>> s {0, 2, 5, 7, 13, -3} >>> [ (p,q) for p in s for q in s if p!=q and sum({p,q})==0 ] [] >>>
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
a solution to the Subset Sum Problem - by league55 - Jan-15-2018, 02:56 AM
RE: a solution to the Subset Sum Problem - by Skaperen - Jan-26-2018, 07:13 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020