Click here to Skip to main content
15,894,410 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Find Closest Sum of Numbers to a Given Number Pin
Bassam Abdul-Baki5-Apr-07 3:25
professionalBassam Abdul-Baki5-Apr-07 3:25 
AnswerRe: Find Closest Sum of Numbers to a Given Number Pin
samv985-Apr-07 11:48
samv985-Apr-07 11:48 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
Luc Pattyn5-Apr-07 12:31
sitebuilderLuc Pattyn5-Apr-07 12:31 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
cp98765-Apr-07 16:23
cp98765-Apr-07 16:23 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
David Crow6-Apr-07 2:39
David Crow6-Apr-07 2:39 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
cp98766-Apr-07 3:01
cp98766-Apr-07 3:01 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
David Crow6-Apr-07 3:23
David Crow6-Apr-07 3:23 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
cp98766-Apr-07 3:47
cp98766-Apr-07 3:47 
I think it is actually a kind of knapsack problem link[^], the bin packing problem is close but it tries to minimize the bins needed to pack all the items into fixed size bins. I'm not being picky, but the distinction could be important if the OP needs to look for approximate algorithms.

Whilst it has all the appeal of a sledgehammer, the brute force approach could be the simplest if he has sufficuent grunt for the range of N needed.


Peter

"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
Bassam Abdul-Baki6-Apr-07 5:52
professionalBassam Abdul-Baki6-Apr-07 5:52 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
samv986-Apr-07 6:09
samv986-Apr-07 6:09 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
cp98768-Apr-07 21:49
cp98768-Apr-07 21:49 
GeneralRe: Find Closest Sum of Numbers to a Given Number Pin
samv989-Apr-07 9:06
samv989-Apr-07 9:06 
QuestionMath (statistics) problem that I just can't seem to get a grasp on Pin
David Crow4-Apr-07 4:00
David Crow4-Apr-07 4:00 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
CPallini4-Apr-07 4:08
mveCPallini4-Apr-07 4:08 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Dan Neely4-Apr-07 4:13
Dan Neely4-Apr-07 4:13 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Rob Graham4-Apr-07 4:19
Rob Graham4-Apr-07 4:19 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on [modified] Pin
cp98764-Apr-07 17:59
cp98764-Apr-07 17:59 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Rob Graham5-Apr-07 13:22
Rob Graham5-Apr-07 13:22 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
cp98765-Apr-07 16:07
cp98765-Apr-07 16:07 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Frank Kerrigan2-May-07 6:33
Frank Kerrigan2-May-07 6:33 
QuestionAngle Algorithm Pin
Kushi Bobby4-Apr-07 1:23
Kushi Bobby4-Apr-07 1:23 
AnswerRe: Angle Algorithm Pin
CPallini4-Apr-07 1:46
mveCPallini4-Apr-07 1:46 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 2:06
cp98764-Apr-07 2:06 
GeneralRe: Angle Algorithm Pin
Dan Neely4-Apr-07 2:11
Dan Neely4-Apr-07 2:11 
GeneralRe: Angle Algorithm Pin
CPallini4-Apr-07 4:04
mveCPallini4-Apr-07 4:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.