I am working on a program to solve the linear Diophantine equation in N variables. So far, it can solve for any N, but the solutions are, as yet, integers. I still need to write the part which selects only non-negative solutions. I gave my solver the restaurant ordering problem:
./diophan 215 275 335 355 420 580 1505 and it gave back the solution: x1 = -6923 +55t1 +1541t2 +1633t3 +1932t4 +2668t5 x2 = 5418 -43t1 -1206t2 -1278t3 -1512t4 -2088t5 x3 = 0 +1t2 x4 = 0 +1t3 x5 = 0 +1t4 x6 = 0 +1t5 where t1-t5 are any choice of integers. By playing around with the values of t1-t5, there may be a way of getting x1-x6 all non-negative. From a problem with 6 variables, we now have a problem with 5 variables. Still hard, but is there light in the tunnel? P~Manalastas --- Daniel Escasa <[EMAIL PROTECTED]> wrote: > http://xkcd.com/c287.html _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

