[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Need Some help in a SQR Select



There are a number of good answers for the two-row case, already provided by 
John Tucker among others. For the general case, I quote _Introduction to 
Algorithms_, Cormen, Leiserson, Rivest 1996, section 37.4

"An instance of the subset-sum problem is a pair (S,t) where S is a set {x1, 
x2, ...,xn} of positive integers and t is a positive integer. This decision 
problem asks whether there exists a subset of S that adds up exactly to the 
target value t. This problem is NP-complete."

The text goes on to give a polynomial-time approximation algorithm, but the 
general case is exponential in cost.






_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users