solving an equation where some unknowns must be integers
Posted
by Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2010-06-08T06:53:22Z
Indexed on
2010/06/08
7:02 UTC
Read the original article
Hit count: 420
algorithm
(in the following, t1...tn, C1...Cn, 1 through n are subscripts)
Solve for s, and t1...tn that minimizes the following summation:
summation from k = 1 to n of: (1-(min(s*tk,Ck)/max(s*tk,Ck))),
where
C1...Cn are constants greater than 1, s is positive, t1...tn are positive integers
© Stack Overflow or respective owner