MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

algorithm for picking sum of list items

  • To: mathgroup at
  • Subject: [mg26745] algorithm for picking sum of list items
  • From: "jim Baxter" <jbax at>
  • Date: Fri, 19 Jan 2001 02:14:19 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Please redirect me if I am posting in the wrong ng.
Thank you for your time.
I am looking for an algorithm for picking the best combination of values
from a sorted list to sum to a desired value.
EX:  list contains (1)7.4, (2)10.9, (3)11.2, (4)11.6, (5)11.8, (6)12.3,
(7)12.5, (8)12.6, (9)13.1, (10)13.8
looking for a total of [34.4]  best pick = (2,3,6)


  - Striving to find the order underlying in all the chaos.
  Jim Baxter
Pacific Industrial Scale
jimb at
comp at

  • Prev by Date: Re: The value of a partial derivative
  • Next by Date: Re: Shortcut for magnitude of a Vector?
  • Previous by thread: Training Courses
  • Next by thread: complicated recursion relations