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

11-02-2009, 09:48 PM

Marcus Wanner

program to solve assignment problem?

On 11/2/2009 3:49 PM, Erik wrote:

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

What?

11-02-2009, 09:59 PM

Michael Sullivan

program to solve assignment problem?

On Mon, 2009-11-02 at 17:48 -0500, Marcus Wanner wrote:
> On 11/2/2009 3:49 PM, Erik wrote:
> > 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.)
> >
> What?
>

Can't one do this kind of thing in python?

11-02-2009, 10:21 PM

Neil Bothwick

program to solve assignment problem?

On Mon, 02 Nov 2009 21:49:06 +0100, Erik wrote:

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

Have you tried apps-edu/domyhomeworkforme?

--
Neil Bothwick

Life is pleasant. Death is peaceful. Its the transition thats
troublesome. - Isaac Asimov

11-02-2009, 10:26 PM

Albert Hopkins

program to solve assignment problem?

On Mon, 2009-11-02 at 21:49 +0100, Erik wrote:
> 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.)
>

You mean you want a program to do your homework assignment?

-a

11-02-2009, 11:46 PM

Willie Wong

program to solve assignment problem?

On Mon, Nov 02, 2009 at 09:49:06PM +0100, Penguin Lover Erik squawked:
> 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.)

An odd question deserves an odd answer: try Metafont. Donald Knuth
implemented in it a general linear equation solver / inequality
optimizer, though learning the syntax can be a little bit tricky.

W

--
Do you think paper grow on trees?
~Sarah Grant. To Tal Zamir, after Prof Cutts commented on Tal's
requesting the third copy of one handout...
Sortir en Pantoufles: up 1060 days, 23:36

11-03-2009, 12:27 AM

Dale

program to solve assignment problem?

Willie Wong wrote:
> On Mon, Nov 02, 2009 at 09:49:06PM +0100, Penguin Lover Erik squawked:
>
>> 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.)
>>
>
> An odd question deserves an odd answer: try Metafont. Donald Knuth
> implemented in it a general linear equation solver / inequality
> optimizer, though learning the syntax can be a little bit tricky.
>
> W
>
>

And maybe it will be easier to just do his own homework instead of
letting a computer do it for him.

I would like to see how he cheats on test day tho. Think he can bring
his puter with him?

Dale

:-) :-)

11-03-2009, 01:02 AM

Neil Bothwick

program to solve assignment problem?

On Mon, 02 Nov 2009 19:27:13 -0600, Dale wrote:

> And maybe it will be easier to just do his own homework instead of
> letting a computer do it for him.

Maybe the assignment is to write a program to solve the equation.

--
Neil Bothwick

What do you have when you have six lawyers buried up to their necks in
sand? Not enough sand.

11-03-2009, 01:48 AM

Marcus Wanner

program to solve assignment problem?

On 11/2/2009 5:59 PM, Michael Sullivan wrote:

On Mon, 2009-11-02 at 17:48 -0500, Marcus Wanner wrote:

On 11/2/2009 3:49 PM, Erik wrote:

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

What?

Can't one do this kind of thing in python?

That is what I would do, if I couldn't do it on paper...

But seriously, this does not belong on this list.

Marcus

11-03-2009, 04:18 AM

Dale

program to solve assignment problem?

Neil Bothwick wrote:
> On Mon, 02 Nov 2009 19:27:13 -0600, Dale wrote:
>
>
>> And maybe it will be easier to just do his own homework instead of
>> letting a computer do it for him.
>>
>
> Maybe the assignment is to write a program to solve the equation.
>
>
>