Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combinatorics Algorithm
#1
Make an algorithm that, given a bunch of (n) random INTEGERs and two inputted (sp??) LONGs, where the sum of the LONGs equals the sum of the integers,

finds the combination of INTEGERs for each LONG that most closely approximate (or exactly equal) the LONG's individual values.

Example:

INTEGERS: 5 4 2 3 = 14
LONGs: 6 8

Solution:
4 2, 5 3

Most efficient (or, the one that actually works, if there is only one that works..) algorithm wins...
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Messages In This Thread
Combinatorics Algorithm - by Agamemnus - 12-21-2003, 09:00 PM
challenge specifics: - by Meg - 12-22-2003, 03:28 AM
Combinatorics Algorithm - by Agamemnus - 12-22-2003, 06:21 AM
Combinatorics Algorithm - by Agamemnus - 12-29-2003, 04:25 AM
Combinatorics Algorithm - by Rhiannon - 12-29-2003, 04:48 AM
Combinatorics Algorithm - by Neo - 12-29-2003, 05:42 PM
Combinatorics Algorithm - by Agamemnus - 12-31-2003, 01:07 AM
Combinatorics Algorithm - by Neo - 12-31-2003, 06:42 PM
Combinatorics Algorithm - by Agamemnus - 12-31-2003, 11:09 PM
Combinatorics Algorithm - by SCM - 01-02-2004, 06:54 AM
Combinatorics Algorithm - by Agamemnus - 01-02-2004, 07:29 PM
Combinatorics Algorithm - by qbiscool - 03-09-2004, 08:39 AM
Combinatorics Algorithm - by na_th_an - 03-09-2004, 02:39 PM
Combinatorics Algorithm - by SCM - 03-26-2004, 08:05 AM
Combinatorics Algorithm - by Agamemnus - 03-28-2004, 12:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)