Python Forum
find the sum of a series of values that equal a number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find the sum of a series of values that equal a number
#2
This is a well-known problem in theoretical computer science, the subset sum problem, which is known to be NP-hard, which means that no fast algorithm will solve the problem when the size of the input data is large (eg the length of the list).

I have found one package (untested) in the Python Package Index subsetsum but it relies on C++ code. You could perhaps check this package.

Apart from this, a search engine finds pure Python implementations such as this one.
Reply


Messages In This Thread
RE: find the sum of a series of values that equal a number - by Gribouillis - Oct-30-2023, 05:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Any tips to how to find out values? nevlindan 1 741 Apr-27-2023, 09:14 PM
Last Post: deanhystad
  Print names in x-axis of a time-series values hobbyist 4 1,266 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  find random numbers that are = to the first 2 number of a list. Frankduc 23 3,319 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  Remove values for weekend in a panda series JaneTan 0 703 Dec-12-2022, 01:50 AM
Last Post: JaneTan
  is there equal syntax to "dir /s /b" kucingkembar 2 1,026 Aug-16-2022, 08:26 AM
Last Post: kucingkembar
  Loop through values in dictrionary and find the same as in previous row Paqqno 5 1,952 Mar-27-2022, 07:58 PM
Last Post: deanhystad
  Find if chain of characters or number Frankduc 4 1,823 Feb-11-2022, 01:55 PM
Last Post: Frankduc
  Can a variable equal 2 things? Extra 4 1,539 Jan-18-2022, 09:21 PM
Last Post: Extra
Question Help to find the largest int number in a file directory SalzmannNicholas 1 1,663 Jan-13-2022, 05:22 PM
Last Post: ndc85430
  find 2 largest equal numbers Frankduc 13 3,664 Jan-11-2022, 07:10 PM
Last Post: Frankduc

Forum Jump:

User Panel Messages

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