Article View: comp.programming.contests
Article #1Re: A PROBLEM FOR ALL MATHEMATICAL GENIUSES !!!!!!
From: Roy Johnson
Date: Wed, 27 Sep 1995 21:25
Date: Wed, 27 Sep 1995 21:25
53 lines
2344 bytes
2344 bytes
richb@nando.net writes: > > You have 7 fertilizers: > > NAME PRICE/TON > --------- ------------------- > Filler (0-0-0) 30 > 21-0-0 98 > 0-0-60 108 > 0-46-0 136 > 0-0-22 148 > 46-0-0 200 > 18-46-0 207 ... > Problem: > > Find the least cost (LCM) for a blend of 10-20-20. > Please, if you choose to accept this mission, post the algorithm on > this newsgroup and PLEASE e-mail me at richb@nando.net. Others have mentioned linear programming. I just tried to solve it logically: There are two K-only mixes, and no other mixes provide K. The better buy is K=60. So we need 1/3 0-0-60, and 2/3 15-30-0. Only one mix gives both N and P. Subtracting the P-only price, the price for N in it is cheaper than N-only mix. Only one mix gives P-only. 46-0-0 is the best-buy for N-only. To make using 18-46-0, we need 30/46 of 18-46-0 plus 16/46 of 9.375-0-0 We can make the 9.337-0-0 from .2038 of 46-0-0 and .7962 of filler So if I did it right, it's: (30/46) * 207 + (16/46) * (.2038 * 200 + .7962 * 30) = 135 + 8.3082 = 143.31 Least cost Note that followups are redirected to comp.programming.contests, which, though not in the original list of newsgroups, struck me as most appropriate. -- -------- Roy Johnson ---- rjohnson@shell.com ---- Speaking for myself -------- "When the only tool you have is Perl, the whole | "Hooray for snakes!" world begins to look like your oyster." -- Me | -- The Simpsons (29 Apr 93) ======= E-mail me for information on joining the Usenet Police Academy =======
Technical Details
Message-ID:
<RJOHNSON.95Sep27162514@conus.shell.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!psinntp!psinntp!psinntp!psinntp!shellgate!usenetReferences:
<442s98$4vi@parsifal.nando.net>Show Full Headers
Complete Article Headers
Newsgroups: comp.programming.contests,alt.comp.lang.borland-delphi,alt.comp.shareware,comp.ai.philosophy,comp.arch.arithmetic,comp.edu.languages.natural,comp.graphics.algorithms,comp.lang.c++,comp.lang.pascal.borland,comp.misc Path: arc1-ca.pugleaf.net!in1.uu.net!psinntp!psinntp!psinntp!psinntp!shellgate!usenet From: rjohnson@conus.shell.com (Roy Johnson) Subject: Re: A PROBLEM FOR ALL MATHEMATICAL GENIUSES !!!!!! In-Reply-To: richb@nando.net's message of Sun, 24 Sep 1995 06:04:03 GMT Message-ID: <RJOHNSON.95Sep27162514@conus.shell.com> Followup-To: comp.programming.contests Sender: usenet@shellgate.shell.com (USENET News System) Organization: Bellaire Technology Center, Houston, TX References: <442s98$4vi@parsifal.nando.net> Date: Wed, 27 Sep 1995 21:25:14 GMT