From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1N58B9-0000k1-Bk for garchives@archives.gentoo.org; Tue, 03 Nov 2009 01:27:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F33CEE0938; Tue, 3 Nov 2009 01:27:21 +0000 (UTC) Received: from mail-gx0-f228.google.com (mail-gx0-f228.google.com [209.85.217.228]) by pigeon.gentoo.org (Postfix) with ESMTP id D87CBE0938 for ; Tue, 3 Nov 2009 01:27:21 +0000 (UTC) Received: by gxk28 with SMTP id 28so2107747gxk.9 for ; Mon, 02 Nov 2009 17:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=DfsisKjUjOKkuBdLFZkw2jtgsXHly2DSaOOfhkWoHJU=; b=SZdSnfpt+YRNQWJkqtc+b8CENsF4mp9n100yl9yaNF/X1evOqKnVHSZtxTQhXUtDEn bkYIXCL62p0ibtuXDvVdN2mWNYidJfuKAbzu3jedv7qdKahvs9/z0M80zjLsvhlsjPsg 2fI7eKsgSqCzwAysEC4TXKXT5URiFkx9hFOKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=xREVw6F/3mozBqdCrWaxwWhuttiZh1qIknZoTvxR9C7J0f1V63ArUiDISssYTKjGq1 /C0o+EW9E+zFbQJQ86nkeIIEl4HvPQgbehDeKTtyXwHY8aRSDtO0VR19NI/vWd6huNlO /S8fiMZTQ2mfCnWfD/ZTFSrSkrTOdxLqZ9J44= Received: by 10.150.233.2 with SMTP id f2mr9213778ybh.259.1257211640057; Mon, 02 Nov 2009 17:27:20 -0800 (PST) Received: from ?192.168.1.1? (adsl-0-115-242.jan.bellsouth.net [65.0.115.242]) by mx.google.com with ESMTPS id 13sm67729gxk.5.2009.11.02.17.27.17 (version=SSLv3 cipher=RC4-MD5); Mon, 02 Nov 2009 17:27:19 -0800 (PST) Message-ID: <4AEF86F1.2040406@gmail.com> Date: Mon, 02 Nov 2009 19:27:13 -0600 From: Dale User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20091007 SeaMonkey/1.1.18 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] program to solve assignment problem? References: <4AEF45C2.20703@gmail.com> <20091103004628.GA8853@princeton.edu> In-Reply-To: <20091103004628.GA8853@princeton.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 26eb67bd-0263-48d4-8b19-5ea01f8297f7 X-Archives-Hash: 9013d6925bf4e03ae7d91ab217cf7612 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 :-) :-)