home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / prolog / 2105 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.lang.prolog
  2. Path: sparky!uunet!mcsun!Germany.EU.net!ecrc!acrab5!joachim
  3. From: joachim@ecrc.de (Joachim Schimpf)
  4. Subject: Re: PROLOG puzzle frameworks
  5. Message-ID: <1992Nov19.095904.29834@ecrc.de>
  6. Sender: news@ecrc.de
  7. Reply-To: joachim@ecrc.de
  8. Organization: European Computer industry Research Centre GmbH.
  9. References: <7932@skye.ed.ac.uk>
  10. Date: Thu, 19 Nov 1992 09:59:04 GMT
  11. Lines: 28
  12.  
  13. In article 7932@skye.ed.ac.uk, ken@aiai.ed.ac.uk (Ken Johnson) writes:
  14. >
  15. >***  The Mr S and Mr P Problem, by David Warren
  16. >
  17. >There are two numbers M and N such that 1 < M & N < 100.  Mr S is told
  18. >their sum S and Mr P is told their product P.  The following dialogue
  19. >takes place:
  20. >
  21. >    Mr P: I don't know the numbers. 
  22. >
  23. >    Mr S: I knew you didn't know them; I don't know them either. 
  24. >
  25. >    Mr P: Now I know the numbers!
  26. >
  27. >    Mr S: Now I know them too!
  28. >Question: What are the numbers?
  29.  
  30. When a friend gave me this problem a few years ago, the bounds given were
  31. 1 < M,N < 50, which gives you a unique solution.
  32.  
  33. If my program is correct, there are four solutions in 1 < M,N < 100.
  34.  
  35. ---------------------------------------------------------------------------
  36.  Joachim Schimpf                                 Email   joachim@ecrc.de 
  37.  European Computer-Industry Research Centre      Phone   +49 89 92699 111
  38.  Arabellastrasse 17, D-8000 Munich 81, Germany   Fax     +49 89 92699 170
  39.  
  40.