home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / sci / logic / 1367 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.8 KB  |  40 lines

  1. Newsgroups: sci.logic
  2. Path: sparky!uunet!wupost!gumby!destroyer!ubc-cs!alberta!kakwa.ucs.ualberta.ca!access.usask.ca!ccu.umanitoba.ca!silver.cs.umanitoba.ca!sbloch
  3. From: sbloch@silver.cs.umanitoba.ca (Stephen Bloch)
  4. Subject: Re: enigma
  5. Message-ID: <1992Sep8.221339.174@ccu.umanitoba.ca>
  6. Sender: news@ccu.umanitoba.ca
  7. Nntp-Posting-Host: silver.cs.umanitoba.ca
  8. Organization: Computer Science, University of Manitoba, Winnipeg, Canada
  9. References: <Bu26KK.DEB@ireq.hydro.qc.ca> <1992Sep4.230629.2695@wdl.loral.com>
  10. Distribution: na
  11. Date: Tue, 8 Sep 1992 22:13:39 GMT
  12. Lines: 26
  13.  
  14. bouchard@ireq.hydro.qc.ca (Marco Bouchard ETUDIANT sept-dec 92) writes:
  15. >You have 10 vending machines to fill out with chocolate bars. In fact,
  16. >after finishing to put the chocolate, you remember that you had 9 boxes
  17. >of chocolate bars of 100g. and one box of bars of 90g and you gotta know
  18. >in which machine you put those of 90g....
  19. >You can weigh as [many]
  20. >bars as you want, but you can take one measure.    
  21.  
  22. mab@wdl39.wdl.loral.com (Mark A Biggar) replies:
  23. >Take 1 bar from machine #1, 2 bars from machine #2, ... and 10 bars from
  24. >machine #10.  Weight the whole set of bars.  The expected weight is 5500g.
  25. >But some of the bars weight only 90g, so the actual weight will be some
  26. >number of 10g increments less then 5500g, that number is the number of the 
  27. >machine with the 90g bars.
  28.  
  29. Of course, this approach can be generalized to handle the case in
  30. which you're not sure how many of the boxes were underweight: take 1
  31. bar from machine #1, 2 from #2, 4 from #3, 8 from #4, etc.  Only
  32. problem is, one of the vending machines has to be capable of holding
  33. 1024 chocolate bars, and your scale has to be able to handle over 200 kg
  34. of chocolate.  And then there's the question of what to DO with over
  35. 200 kg of chocolate... :-)
  36.  
  37. -- 
  38.                     Stephen Bloch
  39.                 sbloch@silver.cs.umanitoba.ca
  40.