[Getdp] Can GetDP solve this problem?

James james at buffer.net
Tue Nov 3 16:49:34 CET 2009


Is there some simple little program to solve
assignment problems?
Suppose that someone bought k meat (160), m fish
(30) and n milk (15)
for 700. So it should solve the equation k * 160 +
m * 30 + n * 15 =
700. (A solution happens to be k = 4, m = 2, n =
0. An additional
condition could be that he bought at most 6 items;
k + m + n <= 6. That
would eliminate solutions like k = 4, m = 0, n = 4.)


I can do it, with a brute force method of finding
integer roots using nested do for loops.


However, I'd be more interested to see if GetDP
can solve this sort of problem.....
As a Eigen value solution?

If not what?



James





More information about the getdp mailing list