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

Algorithms

 
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 
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 
It is. I actually programmed in VB a long time ago a very similar problem. Scarily, I still have it. One of my first programs. Smile | :)

I had to find the closest product to a number given the prime decomposition of the product. In other words, given N and a1, a2, … an, minimize N - a1e1a2e2…anen either in absolute value or not.

I'm not sure if I used this for resizing images or what?
I think this method is also much more complex. I can't remember if I required ei to all be greater than 1. Just checked. Nope. But I did think about modifying it for that.



"Patriotism is the last refuge of a scoundrel." - Samuel Johnson

Web - Blog - RSS - Math - LinkedIn - BM

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 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 18:09
cp98764-Apr-07 18:09 

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.