Xref: utzoo comp.databases:6871 rec.puzzles:6431 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!usc!apple!bbn.com!cosell From: cosell@bbn.com (Bernie Cosell) Newsgroups: comp.databases,rec.puzzles Subject: Re: SQL puzzle Message-ID: <59008@bbn.BBN.COM> Date: 19 Aug 90 14:07:26 GMT References: <125@guug.guug.de> <12518@encore.Encore.COM> Sender: news@bbn.com Followup-To: comp.databases Lines: 38 jkenton@pinocchio.encore.com (Jeff Kenton) writes: }From article <125@guug.guug.de>, by greil@guug.guug.de (Anton Greil): }> }> Can you solve the following puzzle by SQL? }> }> "Here is an arithmetical problem which is belonging to the great }> classics. Two natural numbers were selected which are greater }> than 1 and less than 100. The sum of these two numbers was told }> Mr. S, the product of the numbers was told Mr. P. }> }> Each of the two men doesn't know the number of the other. Mr. P }> rings up Mr. S: }> }> P: I can't find the two numbers. }> S: I knew, that you would not succeed. }> P: Oh ... But now, I know them! }> S: In this case, I know them too." }... Solved by following the clues: }> P: I can't find the two numbers. }Therefore, the PRODUCT has at least 3 prime factors, all less than 50. ... But he didn't ASK to have it solved by 'following the clues' [not to mention the explicit request about 'SQL', I assume from his mentioning that it is a classic that he is familiar with the traditional solution There is no problem with posting it, of course, but we have NOT yet solved the problem he posed. It is pretty mindboggling that one could specify an SQL query that would return JUST the pair of numbers that solves theproblem... The matter at hand is NOT to solve the puzzle, per se, but to come up with *SQL* to solve it... /Bernie\