home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!edcastle!aiai!ken
- From: ken@aiai.ed.ac.uk (Ken Johnson)
- Newsgroups: comp.lang.prolog
- Subject: Re: PROLOG puzzle frameworks
- Message-ID: <7932@skye.ed.ac.uk>
- Date: 18 Nov 92 12:27:53 GMT
- References: <721442885.F00001@ocitor.fidonet>
- Followup-To: comp.lang.prolog
- Organization: William's Wonderful Wonky Widget Warehouse
- Lines: 40
-
-
-
- In a message originally to All, atrium!sysop asked for:
-
- # Logic puzzles such as those posed by Dell's Official Pencil Puzzles and
- # Word Games. You know, those puzzles that seem to appear on those
- # intelligence or Mensa quizzes.
-
-
- Here's one I got from Dr. Peter Ross here:
-
-
- *** The Mr S and Mr P Problem, by David Warren
-
- There are two numbers M and N such that 1 < M & N < 100. Mr S is told
- their sum S and Mr P is told their product P. The following dialogue
- takes place:
-
- Mr P: I don't know the numbers.
-
- Mr S: I knew you didn't know them; I don't know them either.
-
- Mr P: Now I know the numbers!
-
- Mr S: Now I know them too!
-
- Question: What are the numbers?
-
- Ken Johnson comments:
-
- genius(X) :-
- solves(mr_s_and_mr_p_puzzle,X).
-
-
-
- --
- //// Ken Johnson, A I Applications Institute
- CNS server brain not responding //// 80 South Bridge, EDINBURGH EH1 1HN
- ... still trying //// E-mail ken@aiai.ed.ac.uk
- //// Phone 031-650 2756 Fax 031-650 6513
-