public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] program to solve assignment problem?
@ 2009-11-02 20:49 Erik
  2009-11-02 22:48 ` Marcus Wanner
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Erik @ 2009-11-02 20:49 UTC (permalink / raw
  To: gentoo-user

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.)



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-11-03 17:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 20:49 [gentoo-user] program to solve assignment problem? Erik
2009-11-02 22:48 ` Marcus Wanner
2009-11-02 22:59   ` Michael Sullivan
2009-11-03  2:48     ` Marcus Wanner
2009-11-02 23:21 ` Neil Bothwick
2009-11-02 23:26 ` Albert Hopkins
2009-11-03  0:46 ` Willie Wong
2009-11-03  1:27   ` Dale
2009-11-03  2:02     ` Neil Bothwick
2009-11-03  5:18       ` Dale
2009-11-03 13:08         ` bn
2009-11-03 13:06           ` Etaoin Shrdlu
2009-11-03 13:13             ` Alan McKinnon
2009-11-03 14:24               ` Dale
2009-11-03 14:42                 ` Erik
2009-11-03 15:41                   ` Alan McKinnon
2009-11-03 16:03                     ` Erik
2009-11-03 16:28                       ` bn
2009-11-03 17:11                     ` Stroller
2009-11-03 15:22 ` [gentoo-user] " James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox