home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / puzzles / archive / competition / part3 < prev    next >
Encoding:
Internet Message Format  |  1996-04-26  |  56.3 KB

  1. Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by bloom-picayune.MIT.EDU (8.6.13/2.3JIK) with SMTP id OAA03536; Sat, 20 Apr 1996 14:53:39 -0400
  2. Received: from [199.164.164.1] by MIT.EDU with SMTP
  3.     id AA07796; Sat, 20 Apr 96 14:10:57 EDT
  4. Received: by questrel.questrel.com (940816.SGI.8.6.9/940406.SGI)
  5.     for news-answers-request@mit.edu id LAA25198; Sat, 20 Apr 1996 11:11:58 -0700
  6. Newsgroups: rec.puzzles,news.answers,rec.answers
  7. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!europa.eng.gtefsd.com!uunet!questrel!chris
  8. From: chris@questrel.questrel.com (Chris Cole)
  9. Subject: rec.puzzles Archive (competition), part 08 of 35
  10. Message-Id: <puzzles/archive/competition/part3_745653851@questrel.com>
  11. Followup-To: rec.puzzles
  12. Summary: This is part of an archive of questions
  13.  and answers that may be of interest to
  14.  puzzle enthusiasts.
  15.  Part 1 contains the index to the archive.
  16.  Read the rec.puzzles FAQ for more information.
  17. Sender: chris@questrel.questrel.com (Chris Cole)
  18. Reply-To: archive-comment@questrel.questrel.com
  19. Organization: Questrel, Inc.
  20. References: <puzzles/archive/Instructions_745653851@questrel.com>
  21. Date: Wed, 18 Aug 1993 06:04:51 GMT
  22. Approved: news-answers-request@MIT.Edu
  23. Expires: Thu, 1 Sep 1994 06:04:11 GMT
  24. Lines: 1462
  25. Xref: senator-bedfellow.mit.edu rec.puzzles:25012 news.answers:11532 rec.answers:1932
  26. Apparently-To: news-answers-request@mit.edu
  27.  
  28. Archive-name: puzzles/archive/competition/part3
  29. Last-modified: 17 Aug 1993
  30. Version: 4
  31.  
  32.  
  33. ==> competition/games/rubiks/rubiks.cube.p <==
  34. What is known about bounds on solving Rubik's cube?
  35.  
  36. ==> competition/games/rubiks/rubiks.cube.s <==
  37. The "official" world record was set by Minh Thai at the 1982 World
  38. Championships in Budapest Hungary, with a time of 22.95 seconds.
  39.  
  40. Keep in mind mathematicians provided standardized dislocation patterns
  41. for the cubes to be randomized as much as possible.
  42.  
  43. The fastest cube solvers from 19 different countries had 3 attempts each
  44. to solve the cube as quickly as possible.   Minh and several others have
  45. unofficially solved the cube in times between 16 and 19 seconds.
  46. However, Minh averages around 25 to 26 seconds after 10 trials, and my
  47. best average of ten trials is about 27 seconds (although it is usually
  48. higher).
  49.  
  50. Consider that in the World Championships 19 of the world's fastest cube
  51. solvers each solved the cube 3 times and no one solved the cube in less
  52. than 20 seconds...
  53.  
  54. God's algorithm is the name given to an as yet (as far as I know)
  55. undiscovered method to solve the rubik's cube in the least number of
  56. moves; as opposed to using 'canned' moves.
  57.  
  58. The known lower bound is 18 moves. This is established by looking at
  59. things backwards: suppose we can solve a position in N moves. Then by
  60. running the solution backwards, we can also go from the solved position
  61. to the position we started with in N moves. Now we count how many
  62. sequences of N moves there are from the starting position, making
  63. certain that we don't turn the same face twice in a row:
  64.  
  65.   N=0: 1 (empty) sequence;
  66.   N=1: 18 sequences (6 faces can be turned, each in 3 different ways)
  67.   N=2: 18*15 sequences (take any sequence of length 1, then turn any of the
  68.        five faces which is not the last face turned, in any of 3
  69.        different ways); N=3: 18*15*15 sequences (take any sequence of
  70.        length 2, then turn any of the five faces which is not the last
  71.        face turned, in any of 3 different ways); :  :  N=i: 18*15^(i-1)
  72.        sequences.
  73.  
  74. So there are only 1 + 18 + 18*15 + 18*15^2 + ... + 18*15^(n-1)
  75. sequences of moves of length n or less. This sequence sums to
  76. (18/14)*(15^n - 1) + 1.  Trying particular values of n, we find that
  77. there are about 8.4 * 10^18 sequences of length 16 or less, and about
  78. 1.3 times 10^20 sequences of length 17 or less.
  79.  
  80. Since there are 2^10 * 3^7 * 8! * 12!, or about 4.3 * 10^19, possible
  81. positions of the cube, we see that there simply aren't enough sequences
  82. of length 16 or less to reach every position from the starting
  83. position. So not every position can be solved in 16 or less moves -
  84. i.e. some positions require at least 17 moves.
  85.  
  86. This can be improved to 18 moves by being a bit more careful about
  87. counting sequences which produce the same position. To do this, note
  88. that if you turn one face and then turn the opposite face, you get
  89. exactly the same result as if you'd done the two moves in the opposite
  90. order. When counting the number of essentially different sequences of N
  91. moves, therefore, we can split into two cases:
  92.  
  93. (a) Last two moves were not of opposite faces. All such sequences can be
  94.     obtained by taking a sequence of length N-1, choosing one of the 4 faces
  95.     which is neither the face which was last turned nor the face opposite
  96.     it, and choosing one of 3 possible ways to turn it. (If N=1, so that the
  97.     sequence of length N-1 is empty and doesn't have a last move, we
  98.     can choose any of the 6 faces.)
  99.  
  100. (b) Last two moves were of opposite faces. All such sequences can be
  101.     obtained by taking a sequence of length N-2, choosing one of the 2
  102.     opposite face pairs that doesn't include the last face turned, and
  103.     turning each of the two faces in this pair (3*3 possibilities for how it
  104.     was turned). (If N=2, so that the sequence of length N-2 is empty and
  105.     doesn't have a last move, we can choose any of the 3 opposite face
  106.     pairs.)
  107.  
  108. This gives us a recurrence relation for the number X_N of sequences of
  109. length N:
  110.  
  111.   N=0: X_0                               = 1 (the empty sequence)
  112.   N=1: X_1 = 18 * X_0                    = 18
  113.   N=2: X_2 = 12 * X_1     + 27 * X_0     = 243
  114.   N=3: X_3 = 12 * X_2     + 18 * X_1     = 3240
  115.   :
  116.   :
  117.   N=i: X_i = 12 * X_(i-1) + 18 * X_(i-2)
  118.  
  119. If you do the calculations, you find that X_0 + X_1 + X_2 + ... + X_17 is
  120. about 2.0 * 10^19. So there are fewer essentially different sequences of
  121. moves of length 17 or less than there are positions of the cube, and so some
  122. positions require at least 18 moves.
  123.  
  124. The upper bound of 50 moves is I believe due to Morwen Thistlethwaite, who
  125. developed a technique to solve the cube in a maximum of 50 moves. It
  126. involved a descent through a chain of subgroups of the full cube group,
  127. starting with the full cube group and ending with the trivial subgroup
  128. (i.e.  the one containing the solved position only). Each stage involves a
  129. careful examination of the cube, essentially to work out which coset of the
  130. target subgroup it is in, followed by a table look-up to find a sequence to put
  131. it into that subgroup. Needless to say, it was not a fast technique!
  132.  
  133. But it was fascinating to watch, because for the first three quarters or
  134. so of the solution, you couldn't really see anything happening - i.e. the
  135. position continued to appear random! If I remember correctly, one of the
  136. final subgroups in the chain was the subgroup generated by all the double
  137. twists of the faces - so near the end of the solution, you would suddenly
  138. notice that each face only had two colours on it. A few moves more and the
  139. solution was complete. Completely different from most cube solutions, in
  140. which you gradually see order return to chaos: with Morwen's solution, the
  141. order only re-appeared in the last 10-15 moves.
  142.  
  143. * Mark's Update/Comments ----------------------------------------------
  144.  
  145. * Despite some accounts of Thistlethwaite's method, it is possible to
  146. * follow the progression of his algorithm. Clearly after Stage 2 is
  147. * completed the L and R faces will have L and R colours on them only.
  148. * After Stage 3 is complete the characteristics of the square's group
  149. * is clearly visible on all 6 sides. It is harder to understand what
  150. * is accomplished in Stage 1.
  151. *
  152. * ---------------------------------------------------------------------
  153.  
  154. With God's algorithm, of course, I would expect this effect to be even more
  155. pronounced: someone solving the cube with God's algorithm would probably
  156. look very much like a film of someone scrambling the cube, run in
  157. reverse!
  158.  
  159. Finally, something I'd be curious to know in this context: consider the
  160. position in which every cubelet is in the right position, all the corner
  161. cubelets are in the correct orientation, and all the edge cubelets are
  162. "flipped" (i.e. the only change from the solved position is that every edge
  163. is flipped). What is the shortest sequence of moves known to get the cube
  164. into this position, or equivalently to solve it from this position? (I know
  165. of several sequences of 24 moves that do the trick.)
  166.  
  167. * Mark's Update/Comments ----------------------------------------------
  168. *
  169. *  This is from my file cmoves.txt which includes the best known
  170. *   sequences for interesting patterns:
  171. *
  172. * p3  12 flip    R1 L1 D2 B3 L2 F2 R2 U3 D1 R3 D2 F3 B3 D3 F2 D3  (20)
  173. *                   R2 U3 F2 D3
  174. *
  175. * ---------------------------------------------------------------------
  176.  
  177. The reason I'm interested in this particular position: it is the unique
  178. element of the centre of the cube group. As a consequence, I vaguely suspect
  179. (I'd hardly like to call it a conjecture :-) it may lie "opposite" the
  180. solved position in the cube graph - i.e. the graph with a vertex for each
  181. position of the cube and edges connecting positions that can be transformed
  182. into each other with a single move. If this is the case, then it is a good
  183. candidate to require the maximum possible number of moves in God's
  184. algorithm.
  185.  
  186.     -- David Seal dseal@armltd.co.uk
  187.  
  188. To my knowledge, no one has ever demonstrated a specific cube position
  189. that takes 15 moves to solve.  Furthermore, the lower bound is known to
  190. be greater than 15, due to a simple proof.
  191.  
  192. * ---------------------------------------------------------------------
  193. * Mark>  Definitely sequences exist in the square's group of length 15
  194. *     >  e.g. Antipode 2   R2 B2 D2 F2 D2 F2 T2 L2 T2 D2 F2 T2 L2 T2 B2
  195. * ---------------------------------------------------------------------
  196.  
  197. The way we know the lower bound is by working backwards counting how
  198. many positions we can reach in a small number of moves from the solved
  199. position.  If this is less than 43,252,003,274,489,856,000 (the total
  200. number of positions of Rubik's cube) then you need more than that
  201. number of moves to reach the other positions of the cube.  Therefore,
  202. those positions will require more moves to solve.
  203.  
  204. The answer depends on what we consider a move.  There are three common
  205. definitions.  The most restrictive is the QF metric, in which only a
  206. quarter-turn of a face is allowed as a single move.  More common is
  207. the HF metric, in which a half-turn of a face is also counted as a
  208. single move.  The most generous is the HS metric, in which a quarter-
  209. turn or half-turn of a central slice is also counted as a single move.
  210. These metrics are sometimes called the 12-generator, 18-generator, and
  211. 27-generator metrics, respectively, for the number of primitive moves.
  212. The definition does not affect which positions you can get to, or even
  213. how you get there, only how many moves we count for it.
  214.  
  215. The answer is that even in the HS metric, the lower bound is 16,
  216. because at most 17,508,850,688,971,332,784 positions can be reached
  217. within 15 HS moves.  In the HF metric, the lower bound is 18, because
  218. at most 19,973,266,111,335,481,264 positions can be reached within 17
  219. HF moves.  And in the QT metric, the lower bound is 21, because at
  220. most 39,812,499,178,877,773,072 positions can be reached within 20 QT
  221. moves.
  222.  
  223.  -- jjfink@skcla.monsanto.com writes:
  224.  
  225.  
  226. Lately in this conference I've noted several messages related to Rubik's
  227. Cube and Square 1. I've been an avid cube fanatic since 1981 and I've
  228. been gathering cube information since.
  229.  
  230. Around Feb. 1990 I started to produce the Domain of the Cube Newsletter,
  231. which focuses on Rubik's Cube and all the cube variants produced to
  232. date. I include notes on unproduced prototype cubes which don't even
  233. exist, patent information, cube history (and prehistory), computer
  234. simulations of puzzles, etc. I'm up to the 4th issue.
  235.  
  236. Anyways, if you're interested in other puzzles of the scramble by
  237. rotation type you may be interested in DOTC. It's available free to
  238. anyone interested. I am especially interested in contributing articles
  239. for the newsletter, e.g. ideas for new variants, God's Algorithm.
  240.  
  241. Anyone ever write a Magic Dodecahedron simulation for a computer?
  242.  
  243. Drop me a SASE (say empire size) if you're interested in DOTC or if you
  244. would like to exchange notes on Rubik's Cube, Square 1 etc.
  245.  
  246. I'm also interested in exchanging puzzle simulations, e.g. Rubik's Cube,
  247. Twisty Torus, NxNxN Simulations, etc, for Amiga and IBM computers. I've
  248. written several Rubik's Cube solving programs, and I'm trying to make
  249. the definitive puzzle solving engine. I'm also interested in AI programs
  250. for Rubik's Cube and the like.
  251.  
  252. Ideal Toy put out the Rubik's Cube Newsletter, starting with
  253. issue #1 on May 1982. There were 4 issues in all.
  254.  
  255. They are:  #1, May    1982
  256.            #2, Aug    1982
  257.            #3, Winter 1983
  258.            #4, Aug    1983
  259.  
  260. There was another sort of magazine, published in several languages
  261. called Rubik's Logic and Fantasy in space. I believe there were 8
  262. issues in all. Unfortunately I don't have any of these! I'm willing
  263. to buy these off anyone interesting in selling. I would like to get the
  264. originals if at all possible...
  265.  
  266. I'm also interested in buying any books on the cube or related puzzles.
  267. In particular I am _very_ interested in obtaining the following:
  268.  
  269. Cube Games                               Don Taylor, Leanne Rylands
  270. Official Solution to Alexander's Star    Adam Alexander
  271. The Amazing Pyraminx                     Dr. Ronald Turner-Smith
  272. The Winning Solution                     Minh Thai
  273. The Winning Solution to Rubik's Revenge  Minh Thai
  274. Simple Solutions to Cubic Puzzles        James G. Nourse
  275.  
  276. I'm also interested in buying puzzles of the mechanical type.
  277. I'm still missing the Pyraminx Star (basically a Pyraminx with more tips
  278. on it), Pyraminx Ball, and the Puck.
  279.  
  280. If anyone out here is a fellow collector I'd like to hear from you.
  281. If you have a cube variant which you think is rare, or an idea for a
  282. cube variant we could swap notes.
  283.  
  284. I'm in the middle of compiling an exhaustive library for computer
  285. simulations of puzzles. This includes simulations of all Uwe Meffert's
  286. puzzles which he prototyped but _never_ produced. In fact, I'm in the
  287. middle of working on a Pyraminx Hexagon solver. What? Never heard of it?
  288. Meffert did a lot of other puzzles which never were made.
  289.  
  290. I invented some new "scramble by rotation" puzzles myself. My favourite
  291. creation is the Twisty Torus. It is a torus puzzle with segments (which
  292. slide around 360 degrees) with multiple rings around the circumference.
  293.  
  294. The computer puzzle simulation library I'm forming will be described
  295. in depth in DOTC #4 (The Domain of the Cube Newsletter). So if you
  296. have any interesting computer puzzle programs please email me and
  297. tell me all about them!
  298.  
  299. Also to the people interested in obtaining a subscription to DOTC,
  300. who are outside of Canada (which it seems is just about all of you!)
  301. please don't send U.S. or non-Canadian stamps (yeah, I know I said
  302. Self-Addressed Stamped Envelope before). Instead send me an
  303. international money order in Canadian funds for $6. I'll send you
  304. the first 4 issues (issue #4 is almost finished).
  305.  
  306. Mark Longridge
  307. Address: 259 Thornton Rd N, Oshawa Ontario Canada, L1J 6T2
  308. Email:   mark.longridge@canrem.com
  309.  
  310. One other thing, the six bucks is not for me to make any money. This
  311. is only to cover the cost of producing it and mailing it. I'm
  312. just trying to spread the word about DOTC and to encourage other
  313. mechanical puzzle lovers to share their ideas, books, programs and
  314. puzzles. Most of the programs I've written and/or collected are
  315. shareware for C64, Amiga and IBM. I have source for all my programs
  316. (all in C or Basic) and I am thinking of providing a disk with the
  317. 4th issue of DOTC. If the response is favourable I will continue
  318. to provide disks with DOTC.
  319.  
  320.     -- Mark Longridge <mark.longridge@canrem.com> writes:
  321.  
  322. It may interest people to know that in the latest issue of "Cubism For Fun" %
  323. (# 28 that I just received yesterday) there is an article by Herbert Kociemba
  324. from Darmstadt.  He describes a program that solves the cube.  He states that
  325. until now he has found no configuration that required more than 21 turns to
  326. solve.
  327.  
  328. He gives a 20 move manoeuvre to get at the "all edges flipped/
  329. all corners twisted" position:
  330.         DF^2U'B^2R^2B^2R^2LB'D'FD^2FB^2UF'RLU^2F'
  331. or in Varga's parlance:
  332.         dofitabiribirilobadafodifobitofarolotifa
  333.  
  334. Other things #28 contains are an analysis of Square 1, an article about
  335. triangular tilings by Martin Gardner, and a number of articles about other
  336. puzzles.
  337. --
  338. %  CFF is a newsletter published by the Dutch Cubusts Club NKC.
  339. Secretary:
  340.         Anneke Treep
  341.         Postbus 8295
  342.         6710 AG  Ede
  343.         The Netherlands
  344. Membership fee for 1992 is DFL 20 (about$ 11).
  345. --
  346.     -- dik t. winter <dik@cwi.nl>
  347.  
  348. References:
  349.  
  350. Mathematical Papers
  351. -------------------
  352.  
  353. Rubik's Revenge: The Group Theoretical Solution
  354. Mogens Esrom Larsen   A.M.M. Vol. 92 No. 6, June-July 1985, pages
  355. 381-390
  356.  
  357. Rubik's Groups
  358. E. C. Turner & K. F. Gold, American Mathematical Monthly,
  359. vol. 92 No. 9 November 1985, pp. 617-629.
  360.  
  361. Cubelike Puzzles - What Are They and How Do You Solve Them?
  362. J.A. Eidswick   A.M.M. Vol. 93 No. 3 March 1986, pp 157-176
  363.  
  364. The Slice Group in Rubik's Cube,  David Hecker, Ranan Banerji
  365. Mathematics Magazine, Vol. 58 No. 4 Sept 1985
  366.  
  367. The Group of the Hungarian Magic Cube
  368. Chris Rowley   Proceedings of the First Western Austrialian
  369.                 Conference on Algebra, 1982
  370.  
  371. Books
  372. -----
  373.  
  374. Rubik's Cubic Compendium
  375. Erno Rubik, Tamas Varga, et al, Edited by David Singmaster
  376. Oxford University Press, 1987
  377. Enslow Publishers Inc
  378.  
  379.  
  380.  
  381. ==> competition/games/rubiks/rubiks.magic.p <==
  382. How do you solve Rubik's Magic?
  383.  
  384. ==> competition/games/rubiks/rubiks.magic.s <==
  385. The solution is in a 3x3 grid with a corner missing.
  386.  
  387. +---+---+---+          +---+---+---+---+
  388. | 3 | 5 | 7 |          | 1 | 3 | 5 | 7 |
  389. +---+---+---+          +---+---+---+---+
  390. | 1 | 6 | 8 |          | 2 | 4 | 6 | 8 |
  391. +---+---+---+          +---+---+---+---+
  392. | 2 | 4 |              Original Shape
  393. +---+---+
  394.  
  395. To get the 2x4 "standard" shape into this shape, follow this:
  396. 1.  Lie it flat in front of you (4 going across).
  397. 2.  Flip the pair (1,2) up and over on top of (3,4).
  398. 3.  Flip the ONE square (2) up and over (1).
  399. [Note:  if step 3 won't go, start over, but flip the entire original shape
  400.         over (exposing the back).]
  401. 4.  Flip the pair (2,4) up and over on top of (5,6).
  402. 5.  Flip the pair (1,2) up and toward you on top of (blank,4).
  403. 6.  Flip the ONE square (2) up and left on top of (1).
  404. 7.  Flip the pair (2,4) up and toward you. 
  405.  
  406. Your puzzle won't be completely solved, but this is how to get the shape.
  407. Notice that 3,5,6,7,8 don't move.
  408.  
  409. ==> competition/games/scrabble.p <==
  410. What are some exceptional Scrabble Brand Crossword Game (TM) games?
  411.  
  412. ==> competition/games/scrabble.s <==
  413. The shortest Scrabble game:
  414.  
  415. The Scrabble Players News, Vol. XI No. 49, June 1983, contributed by
  416. Kyle Corbin of Raleigh, NC:
  417.  
  418.          [J]
  419.         J U S
  420.           S O X
  421.            [X]U
  422.  
  423. which can be done in 4 moves, JUS, SOX, [J]US, and [X]U.
  424.  
  425. In SPN Vol. XI, No. 52, December 1983, Alan Frank presented what
  426. he claimed is the shortest game where no blanks are used, also
  427. four moves:
  428.  
  429.                   C
  430.                  WUD
  431.                 CUKES
  432.              DEY
  433.               S
  434.  
  435. This was followed in SPN, Vol. XII No. 54, April 1984, by Terry Davis
  436. of Glasgow, KY:
  437.  
  438.               V
  439.                 V O[X]
  440.              [X]U,
  441.  
  442. which is three moves.  He noted that the use of two blanks prevents
  443. such plays as VOLVOX.  Unfortunately, it doesn't prevent SONOVOX.
  444.  
  445. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  446. Record for the highest Scrabble score in a single turn (in a legal position):
  447.  
  448. According to the Scrabble Players Newspaper (since renamed to 
  449. Scrabble Players News) issue 44, p13, the highest score for one
  450. turn yet discovered, using the Official Scrabble Players
  451. Dictionary, 1st ed. (the 2nd edition is now in use in club and
  452. tournament play) and the Websters 9th New Collegiate Dictionary,
  453. was the following:
  454.  
  455. d i s e q u i l i b r a t e D
  456. . . . . . . . e . . . . . . e
  457. . . . . . . . e . . . . . o m
  458. r a d i o a u t o g r a p(h)Y
  459. . . . . . . . . . . . w a s T
  460. . . . . . . . . . . b e . . h
  461. . . . . . . . . . . a . . g o
  462. . . . c o n j u n c t i v a L 
  463. . . . . . . . . . . . . . n o
  464. . . . . . . . f i n i k i n G
  465. . . . . . . . a . . . (l) e i
  466. . . . . . . . d . s p e l t Z
  467. . . . . . . w e . . . . . . e
  468. . . . . . . r . . . . . . o r
  469. m e t h o x y f l u r a n e S
  470.  
  471. for 1682 points.
  472.  
  473.  
  474. According to the May 1986 issue of GAMES, the highest known score achievable
  475. in one turn is 1,962 points.  The word is BENZOXYCAMPHORS formed across the
  476. three triple-word scores on the bottom of the board.  Apparently it was 
  477. discovered by Darryl Francis, Ron Jerome, and Jeff Grant.
  478.  
  479. As for other Scrabble trivia, the highest-scoring first move based on the
  480. Official Scrabble Players Dictionary is 120 points, with the words JUKEBOX,
  481. QUIZZED, SQUEEZE, or ZYMURGY.  If Funk & Wagnall's New Standard Dictionary
  482. is used then ZYXOMMA, worth 130 points, can be formed.
  483.  
  484. The highest-scoring game, based on Webster's Second and Third and on the
  485. Oxford English Dictionary, was devised by Ron Jerome and Ralph Beaman and
  486. totalled 4,142 points for the two players.  The highest-scoring words in
  487. the game were BENZOXYCAMPHORS, VELVETEEN, and JACKPUDDINGHOOD.
  488.  
  489. The following example of a SCRABBLE game produced a score of 2448 for one
  490. player and 1175 for the final word.  It is taken from _Beyond Language_ (1967)
  491. by Dmitri Borgman (pp. 217-218).  He credits this solution to Mrs. Josefa H.
  492. Byrne of San Francisco and implies that all words can be found in _Webster's
  493. Second Edition_.  The two large words (multiplied by 27 as they span 3 triple
  494. word scores) are ZOOPSYCHOLOGIST (a psychologist who treats animals rather
  495. than humans) and PREJUDICATENESS (the condition or state of being decided 
  496. beforehand).  The asterisks (*) represent the blank tiles. (Please excuse
  497. any typo's).
  498.  
  499.            Board                        Player1                 Player2
  500.  
  501. Z O O P S Y C H O L O G I S T    ABILITY             76   ERI, YE     9
  502. O N         H A   U     R O W    MAN, MI             10   EN          2
  503. *         R I B   R O V E   I    FEN, FUN            14   MANIA       7
  504. L           T I K E         G    TABU                12   RIB         6
  505. O             L                  NEXT                11   AM          4
  506. G             I                  AX                   9   END         6
  507. I             T                  IT, TIKE            10   LURE        6
  508. *             Y E                LEND, LOGIC*AL      79   OO*LOGICAL  8
  509. A               R                FUND, JUD           27   ATE, MA     7
  510. L E N D       M I                ROVE                14   LO          2
  511.     E         A             Q    DARE, DE            13   ES, ES, RE  6 
  512. W A X     F E N             U    RE, ROW             14   IRE, IS, SO 7
  513. E   T A B U   I             A    DARED, QUAD         22   ON          4
  514. E         N   A M   D A R E D    WAX, WEE            27   WIG         9
  515. P R E J U D I C A T E N E S S    CHIT, HA            14   ON          2
  516.                                  PREJUDICATENESS,
  517.                                    AN, MANIAC,
  518.                                    QUADS, WEEP      911   OOP         8
  519.                                  ZOOPSYCHOLOGIST,
  520.                                    HABILITY, TWIG,
  521.                                    ZOOLOGICAL      1175
  522.                                  --------------------------------------
  523.                                  Total:            2438              93
  524.  
  525.                                  F, N, V, T in 
  526.                                  loser's hand:      +10             -10
  527.                                  --------------------------------------
  528.                                  Final Score:      2448              83
  529.  
  530.  
  531. ---------------------------------------------------------------------------
  532. It is possible to form the following 14 7-letter OSPD words from the
  533. non-blank tiles:
  534.  
  535. HUMANLY
  536. FATUOUS
  537. AMAZING
  538. EERIEST
  539. ROOFING
  540. TOILERS
  541. QUIXOTE
  542. JEWELRY
  543. CAPABLE
  544. PREVIEW
  545. BIDDERS
  546. HACKING
  547. OVATION
  548. DONATED
  549.  
  550. ==> competition/games/set.p <==
  551. What is the size of the largest collection of cards from which NO "set"
  552. can be selected ?
  553.  
  554. ==> competition/games/set.s <==
  555. I can get 20:
  556.  
  557. 1ROL
  558. 1GDL
  559. 1GDM
  560. 1GOM
  561. 1GSL
  562. 1PDH
  563. 1PDM
  564. 1POL
  565. 1POM
  566. 2RSL
  567. 2PDM
  568. 3ROL
  569. 3ROM
  570. 3RSL
  571. 3RSH
  572. 3GDM
  573. 3GOL
  574. 3GSL
  575. 3GSM
  576. 3POM
  577.  
  578. This collection of 20 is a local maximum.
  579.  
  580. The small C progam shown below was used to check for all possible
  581. extensions to a collection of 21.
  582.  
  583. Of course this leaves open the question whether there exists a completely
  584. different collection of 21 from which no "set" can be selected.
  585.  
  586. -- Gene Miller
  587.  
  588. ------- C Program enclosed -------
  589. #define N 21
  590.  
  591. static int data[N][4]= {
  592.     1, 1, 2, 1, /* 00 */
  593.     1, 2, 1, 1, /* 01 */
  594.     1, 2, 1, 2, /* 02 */
  595.     1, 2, 2, 2, /* 03 */
  596.     1, 2, 3, 1, /* 04 */
  597.     1, 3, 1, 3, /* 05 */
  598.     1, 3, 1, 2, /* 06 */
  599.     1, 3, 2, 1, /* 07 */
  600.     1, 3, 2, 2, /* 08 */
  601.     2, 1, 3, 1, /* 09 */
  602.     2, 3, 1, 2, /* 10 */
  603.     3, 1, 2, 1, /* 11 */
  604.     3, 1, 2, 2, /* 12 */
  605.     3, 1, 3, 1, /* 13 */
  606.     3, 1, 3, 3, /* 14 */
  607.     3, 2, 1, 2, /* 15 */
  608.     3, 2, 2, 1, /* 16 */
  609.     3, 2, 3, 1, /* 17 */
  610.     3, 2, 3, 2, /* 18 */
  611.     3, 3, 2, 2, /* 19 */
  612.     0, 0, 0, 0  /* 20 */    /* leave space for Nth combo */
  613. };
  614.  
  615. main()
  616. {    
  617.     int x, y, z, w;
  618.  
  619.     for (x=1; x<=3; x++)    /* check all combos */
  620.     for (y=1; y<=3; y++)
  621.         for (z=1; z<=3; z++)
  622.         for (w=1; w<=3; w++)
  623.             printf ("%d %d %d %d -> sets=%d\n", x, y, z, w,
  624.             check (x, y, z, w));
  625. }
  626.  
  627. int check(x,y,z,w)
  628. int x, y, z, w;
  629. {
  630.     int i,j,k,m;
  631.     int errors, sets;
  632.  
  633.     for (i=0; i<N; i++)        /* check for pre-existing combos */
  634.     if (x==data[i][0] &&
  635.         y==data[i][1] &&
  636.         z==data[i][2] &&
  637.         w==data[i][3] ) {
  638.     return -1;        /* discard pre-existing*/
  639.     }
  640.  
  641.     data[N-1][0] = x;    /* make this the Nth combo */
  642.     data[N-1][1] = y;
  643.     data[N-1][2] = z;
  644.     data[N-1][3] = w;
  645.  
  646.     sets = 0;            /* start counting sets */
  647.     for (i=0; i<N; i++)        /* look for sets */
  648.     for (j=i+1; j<N; j++)
  649.         for (k=j+1; k<N; k++) {
  650.         errors = 0;
  651.         for (m=0; m<4; m++) {
  652.             if (data[i][m] == data[j][m]) {
  653.             if (data[k][m] != data[i][m]) errors++;
  654.             if (data[k][m] != data[j][m]) errors++;
  655.             }
  656.             else {
  657.             if (data[k][m] == data[i][m]) errors++;
  658.             if (data[k][m] == data[j][m]) errors++;
  659.             }
  660.         }
  661.         if (errors == 0)    /* no errors means is a set */
  662.             sets++; /* increment number of sets */
  663.         }
  664.     return sets;
  665. }
  666. -- 
  667.  
  668. I did some more experimenting. With the enclosed C program, I looked at many
  669. randomly generated collections. In an earlier version of this program I
  670. got one collection of 20 from a series of 100 trials. The rest were collections
  671. ranging in size from 16 to 19. Unfortunately, in an attempt to make this
  672. program more readable and more general, I changed the algorithm slightly and
  673. I haven't been able to achieve 20 since then. I can't remember enough about
  674. my changes to be able to get back to the previous version. In the most recent
  675. 1000 trials all of the maximaml collections range in size from 16 to 18.
  676.  
  677. I think that this experiment has shed very little light on what is the
  678. global maximum, since the search space is many orders of magnitude larger
  679. than what can be tried in a reasonable amount of time through random
  680. searching.
  681.  
  682. I assume that Mr. Ring found his collection of 20 by hand. This indicates
  683. that an intelligent search may be more fruitful than a purely random one.
  684.  
  685. ------------------ Program enclosed -------------
  686. int n;
  687. int data[81][4];
  688.  
  689. main()
  690. {
  691.     int i;
  692.  
  693.     for (i=0; i<1000; i++) {    /* Do 1000 independent trials */
  694.     printf ("Trial %d:\n", i);
  695.     try();
  696.     }
  697. }
  698.  
  699. try()
  700. {    
  701.     int i;
  702.     int x, y, z, w;
  703.  
  704.     n = 0;            /* set collection size to zero */
  705.     for (i=0; i<100; i++) {    /* try 100 random combos */
  706.     x = 1 + rand()%3;
  707.     y = 1 + rand()%3;
  708.     z = 1 + rand()%3;
  709.     w = 1 + rand()%3;
  710.     check (x, y, z, w);
  711.     }
  712.  
  713.     for (x=1; x<=3; x++)    /* check all combos */
  714.     for (y=1; y<=3; y++)
  715.         for (z=1; z<=3; z++)
  716.         for (w=1; w<=3; w++)
  717.             check (x, y, z, w);
  718.  
  719.     printf ("    collection size=%d\n", n);
  720. }
  721.  
  722. int check(x, y, z, w)    /* check whether a new combo can be added */
  723. int x, y, z, w;
  724. {
  725.     int i,j,k,m;
  726.     int errors, sets;
  727.  
  728.     for (i=0; i<n; i++)        /* check for pre-existing combos */
  729.     if (x==data[i][0] &&
  730.         y==data[i][1] &&
  731.         z==data[i][2] &&
  732.         w==data[i][3] ) {
  733.     return -1;        /* discard pre-existing*/
  734.     }
  735.  
  736.     data[n][0] = x;    /* make this the nth combo */
  737.     data[n][1] = y;
  738.     data[n][2] = z;
  739.     data[n][3] = w;
  740.  
  741.     sets = 0;            /* start counting sets */
  742.     for (i=0; i<=n; i++)        /* look for sets */
  743.     for (j=i+1; j<=n; j++)
  744.         for (k=j+1; k<=n; k++) {
  745.         errors = 0;
  746.         for (m=0; m<4; m++) {
  747.             if (data[i][m] == data[j][m]) {
  748.             if (data[k][m] != data[i][m]) errors++;
  749.             if (data[k][m] != data[j][m]) errors++;
  750.             }
  751.             else {
  752.             if (data[k][m] == data[i][m]) errors++;
  753.             if (data[k][m] == data[j][m]) errors++;
  754.             }
  755.         }
  756.         if (errors == 0)    /* no errors means is a set */
  757.             sets++; /* increment number of sets */
  758.         }
  759.     if (sets == 0) {
  760.     n++;        /* increment collection size */
  761.     printf ("%d %d %d %d\n", x, y, z, w);
  762.     }
  763.     return sets;
  764. }
  765. ------------------ end of enclosed program -------------
  766. -- Gene
  767. -- 
  768. Gene Miller            Multimedia Communications
  769. NYNEX Science & Technology    Phone:  914 644 2834
  770. 500 Westchester Avenue        Fax:    914 997 2997, 914 644 2260
  771. White Plains, NY 10604        Email:  gene@nynexst.com
  772.  
  773. ==> competition/games/soma.p <==
  774. What is the solution to Soma Cubes?
  775.  
  776. ==> competition/games/soma.s <==
  777. The soma cube is dissected in excruciating detail in volume 2 of
  778. "Winning Ways" by Conway, Berlekamp and Guy, in the same chapter as the
  779. excruciatingly detailed dissection of Rubik's Cube.
  780.  
  781. ==> competition/games/square-1.p <==
  782. Does anyone have any hints on how to solve the Square-1 puzzle?
  783.  
  784. ==> competition/games/square-1.s <==
  785.                 SHAPES
  786.  
  787. 1. There are 29 different shapes for a side, counting reflections:
  788.     1 with 6 corners, 0 edges
  789.     3 with 5 corners, 2 edges
  790.    10 with 4 corners, 4 edges
  791.    10 with 3 corners, 6 edges
  792.     5 with 2 corners, 8 edges
  793.  
  794. 2. Naturally, a surplus of corners on one side must be compensated
  795.    by a deficit of corners on the other side.  Thus there are 1*5 +
  796.    3*10 + C(10,2) = 5 + 30 + 55 = 90 distinct combinations of shapes,
  797.    not counting the middle layer.
  798.  
  799. 3. You can reach two squares from any other shape in at most 7 transforms,
  800.    where a transform consists of (1) optionally twisting the top, (2)
  801.    optionally twisting the bottom, and (3) flipping.
  802.  
  803. 4. Each transform toggles the middle layer between Square and Kite,
  804.    so you may need 8 transforms to reach a perfect cube.
  805.  
  806. 5. The shapes with 4 corners and 4 edges on each side fall into four
  807.    mutually separated classes.  Side shapes can be assigned values:
  808.    0: Square, Mushroom, and Shield; 1: Left Fist and Left Paw; 2:
  809.    Scallop, Kite, and Barrel; 3. Right Fist and Right Paw.  The top
  810.    and bottom's sum or difference, depending on how you look at them,
  811.    is a constant.  Notice that the side shapes with bilateral symmetry
  812.    are those with even values.
  813.  
  814. 6. To change this constant, and in particular to make it zero, you must
  815.    attain a position that does not have 4 corners and 4 edges on each
  816.    side.  Almost any such position will do, but returning to 4 corners
  817.    and 4 edges with the right constant is left to your ingenuity.
  818.  
  819. 7. If the top and bottom are Squares but the middle is a Kite, just flip
  820.    with the top and bottom 30deg out of phase and you will get a cube.
  821.  
  822.                 COLORS
  823.  
  824. 1. I do not know the most efficient way to restore the colors.  What
  825.    follows is my own suboptimal method.  All flips keep the yellow
  826.    stripe steady and flip the blue stripe.
  827.  
  828. 2. You can permute the corners without changing the edges, so first
  829.    get the edges right, then the corners.
  830.  
  831. 3. This transformation sends the right top edge to the bottom
  832.    and the left bottom edge to the top, leaving the other edges
  833.    on the same side as they started:  Twist top 30deg cl, flip,
  834.    twist top 30deg ccl, twist bottom 150deg cl, flip, twist bottom
  835.    30deg cl, twist top 120deg cl, flip, twist top 30deg ccl, twist
  836.    bottom 150deg cl, flip, twist bottom 30deg cl.  Cl and ccl are
  837.    defined looking directly at the face.  With this transformation
  838.    you can eventually get all the white edges on top.
  839.  
  840. 4. Check the parity of the edge sequence on each side.  If either is
  841.    wrong, you need to fix it.  Sorry -- I don't know how!  (See any
  842.    standard reference on combinatorics for an explanation of parity.)
  843.  
  844. 5. The following transformation cyclically permutes ccl all the top edges
  845.    but the right one and cl all the bottom edges but the left one.  Apply
  846.    the transformation in 3., and turn the whole cube 180deg.  Repeat.
  847.    This is a useful transformation, though not a cure-all.
  848.  
  849. 6. Varying the transformation in 3. with other twists will produce other
  850.    results.
  851.  
  852. 7. The following transformation changes a cube into a Comet and Star:
  853.    Flip to get Kite and Kite.  Twist top and bottom cl 90deg and flip to get
  854.    Barrel and Barrel.  Twist top cl 30 and bottom cl 60 and flip to get
  855.    Scallop and Scallop.  Twist top cl 60 and bottom cl 120 and flip to
  856.    get Comet and Star.  The virtue of the Star is that it contains only
  857.    corners, so that you can permute the corners without altering the edges.
  858.  
  859. 8. To reach a Lemon and Star instead, replace the final bottom cl 120 with
  860.    a bottom cl 60.  In both these transformation the Star is on the bottom.
  861.  
  862. 9. The following transformation cyclically permutes all but the bottom
  863.    left rear.  It sends the top left front to the bottom, and the bottom
  864.    left front to the top.  Go to Comet and Star.  Twist star cl 60.
  865.    Go to Lemon and Star -- you need not return all the way to the cube, but
  866.    do it if you're unsure of yourself by following 7 backwards.  Twist star
  867.    cl 60.  Return to cube by following 8 backwards.  With this transformation
  868.    you should be able to get all the white corners on top.
  869.  
  870. 10. Check the parity of the corner sequences on both sides.  If the bottom
  871.    parity is wrong, here's how to fix it:  Go to Lemon and Star.  The
  872.    colors on the Star will run WWGWWG.  Twist it 180 and return to cube.
  873.  
  874. 11. If the top parity is wrong, do the same thing, except that when you
  875.    go from Scallop and Scallop to Lemon and Star, twist the top and bottom
  876.    ccl instead of cl.  The colors on the Star should now run GGWGGW.
  877.  
  878. 12. Once the parity is right on both sides, the basic method is to
  879.    go to Comet and Star, twist the star 120 cl (it will be WGWGWG),
  880.    return to cube, twist one or both sides, go to Comet and Star,
  881.    undo the star twist, return to cube, undo the side twists.
  882.    With no side twists, this does nothing.  If you twist the top,
  883.    you will permute the top corners.  If you twist the bottom,
  884.    you will permute the bottom corners.  Eventually you will get
  885.    both the top and the bottom right.  Don't forget to undo the
  886.    side twists -- you need to have the edges in the right places.
  887.  
  888. Happy twisting....
  889. -- 
  890. Col. G. L. Sicherman
  891. gls@windmill.att.COM
  892.  
  893. ==> competition/games/think.and.jump.p <==
  894. THINK & JUMP:  FIRST THINK, THEN JUMP UNTIL YOU
  895.                ARE LEFT WITH ONE PEG!                      O - O   O - O
  896.                                                           / \ / \ / \ / \
  897.                                                          O---O---O---O---O
  898. BOARD DESCRIPTION:  To the right is a model of            \ / \ / \ / \ /
  899.                     the Think & Jump board.  The       O---O---O---O---O---O
  900.                     O's represent holes which         / \ / \ / \ / \ / \ / \
  901.                     contain pegs.                    O---O---O---O---O---O---O
  902.                                                       \ / \ / \ / \ / \ / \ /
  903.                                                        O---O---O---O---O---O
  904. DIRECTIONS:  To play this brain teaser, you begin         / \ / \ / \ / \
  905.              by removing the center peg.  Then,          O---O---O---O---O
  906.              moving any direction in the grid,            \ / \ / \ / \  /
  907.              jump over one peg at a time,                  O - O   O - O
  908.              removing the jumped peg - until only
  909.              one peg is left.  It's harder then it looks. 
  910.          But it's more fun than you can imagine.
  911.  
  912. SKILL CHART:
  913.  
  914.     10 pegs left - getting better
  915.      5 pegs left - true talent
  916.      1 peg  left - you're a genius
  917.  
  918. Manufactured by Pressman Toy Corporation, NY, NY.
  919.  
  920. ==> competition/games/think.and.jump.s <==
  921. Three-color the board in the obvious way.  The initial configuration has 12
  922. of each color, and each jump changes the parity of all three colors.  Thus,
  923. it is impossible to achieve any position where the colors do not have the
  924. same parity; in particular, (1,0,0).
  925.  
  926. If you remove the requirement that the initially-empty cell must be at the
  927. center, the game becomes solvable.  The demonstration is left as an exercise.
  928.  
  929. Karl Heuer   rutgers!harvard!ima!haddock!karl   karl@haddock.ima.isc.com
  930.  
  931.  
  932.  
  933.  
  934. Here is one way of reducing Think & Jump to two pegs.
  935.  
  936.  
  937. Long simplifies Balsley's scintillating snowflake solution:
  938.  
  939. 1  U-S           A - B   C - D
  940. 2  H-U          / \ / \ / \ / \
  941. 3  V-T         E---F---G---H---I
  942. 4  S-H          \ / \ / \ / \ /
  943. 5  D-M       J---K---L---M---N---O
  944. 6  F-S      / \ / \ / \ / \ / \ / \
  945. 7  Q-F     P---Q---R---S---T---U---V
  946. 8  A-L      \ / \ / \ / \ / \ / \ /
  947. 9  S-Q       W---X---Y---Z---a---b
  948. 10 P-R          / \ / \ / \ / \
  949. 11 Z-N         c---d---e---f---g
  950. 12 Y-K          \ / \ / \ / \ /
  951. 13 h-Y           h - i   j - k
  952. 14 k-Z
  953.  
  954. The board should now be in the snowflake pattern, i.e. look like
  955.  
  956.          o - *   * - o
  957.         / \ / \ / \ / \
  958.        *---o---*---o---*
  959.         \ / \ / \ / \ /
  960.      *---*---*---*---*---*
  961.     / \ / \ / \ / \ / \ / \
  962.    o---o---o---o---o---o---o
  963.     \ / \ / \ / \ / \ / \ /
  964.      *---*---*---*---*---*
  965.         / \ / \ / \ / \
  966.        *---o---*---o---*
  967.         \ / \ / \ / \ /
  968.          o - *   * - o
  969.  
  970. where o is empty and * is a peg.  The top and bottom can now be reduced
  971. to single pegs individually.  For example, we could continue
  972.  
  973. 15 g-T
  974. 16 Y-a
  975. 17 i-Z
  976. 18 T-e
  977. 19 j-Y
  978. 20 b-Z
  979. 21 c-R
  980. 22 Z-X
  981. 23 W-Y
  982. 24 R-e
  983.  
  984. which finishes the bottom.  The top can be done in a similar manner.
  985. -- 
  986. Chris Long
  987.  
  988. ==> competition/games/tictactoe.p <==
  989. In random tic-tac-toe, what is the probability that the first mover wins?
  990.  
  991. ==> competition/games/tictactoe.s <==
  992. Count cases.
  993.  
  994. First assume that the game goes on even after a win.  (Later figure
  995. out who won if each player gets a row of three.)  Then there are
  996. 9!/5!4! possible final boards, of which
  997.  
  998.     8*6!/2!4! - 2*6*4!/0!4! - 3*3*4!/0!4! - 1 = 98
  999.  
  1000. have a row of three Xs.  The first term is 8 rows times (6 choose 2)
  1001. ways to put down the remaining 2 Xs.  The second term is the number
  1002. of ways X can have a diagonal row plus a horizontal or vertical row.
  1003. The third term is the number of ways X can have a vertical and a
  1004. horizontal row, and the 4th term is the number of ways X can have two
  1005. diagonal rows.  All the two-row configurations must be subtracted to
  1006. avoid double-counting.
  1007.  
  1008. There are 8*6!/1!5! = 48 ways O can get a row.  There is no double-
  1009. counting problem since only 4 Os are on the final board.
  1010.  
  1011. There are 6*2*3!/2!1! = 36 ways that both players can have a
  1012. row.  (6 possible rows for X, each leaving 2 possible rows for O
  1013. and (3 choose 2) ways to arrange the remaining row.)  These
  1014. cases need further consideration.
  1015.  
  1016. There are 98 - 36 = 62 ways X can have a row but not O.
  1017.  
  1018. There are 48 - 36 = 12 ways O can have a row but not X.
  1019.  
  1020. There are 126 - 36 - 62 - 12 = 16 ways the game can be a tie.
  1021.  
  1022. Now consider the 36 configurations in which each player has a row.
  1023. Each such can be achieved in 5!4! = 2880 orders.  There are 3*4!4!
  1024. = 1728 ways that X's last move completes his row.  In these cases O
  1025. wins.  There are 2*3*3!3! = 216 ways that Xs fourth move completes
  1026. his row and Os row is already done in three moves.  In these cases O
  1027. also wins.  Altogether, O wins 1728 + 216 = 1944 out of 2880 times
  1028. in each of these 36 configurations.  X wins the other 936 out of
  1029. 2880.
  1030.  
  1031. Altogether, the probability of X winning is ( 62 + 36*(936/2880) ) / 126. 
  1032.  
  1033. win:   737 / 1260  ( 0.5849206... )
  1034. lose:  121 / 420   ( 0.2880952... )
  1035. draw:  8 / 63      ( 0.1269841... )
  1036.  
  1037. The computer output below agress with this analysis.
  1038.  
  1039. 1000000 games:  won 584865, lost 288240, tied 126895
  1040.  
  1041. Instead, how about just methodically having the program play every
  1042. possible game, tallying up who wins?
  1043.  
  1044. Wonderful idea, especially since there are only 9! ~ 1/3 million
  1045. possible games.  Of course some are identical because they end in
  1046. fewer than 8 moves.  It is clear that these should be counted
  1047. multiple times since they are more probable than games that go
  1048. longer.
  1049.  
  1050. The result:
  1051. 362880 games:  won 212256, lost 104544, tied 46080
  1052.  
  1053. #include <stdio.h>
  1054.  
  1055. int    board[9];
  1056. int    N, move, won, lost, tied;
  1057.  
  1058. int    perm[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  1059.  
  1060. int    rows[8][3] = {
  1061.   { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 }, { 0, 3, 6 },
  1062.   { 1, 4, 7 }, { 2, 5, 8 }, { 0, 4, 8 }, { 2, 4, 6 }
  1063. };
  1064.  
  1065.  
  1066. main()
  1067. {
  1068.   do {
  1069.     bzero((char *)board, sizeof board);
  1070.     for ( move=0; move<9; move++ ) {
  1071.       board[perm[move]] = (move&1) ? 4 : 1;
  1072.       if ( move >= 4 && over() )
  1073.     break;
  1074.     }
  1075.     if ( move == 9 )
  1076.       tied++;
  1077. #ifdef DEBUG
  1078.     printf("%1d%1d%1d\n%1d%1d%1d  w %d, l %d, t %d\n%1d%1d%1d\n\n",
  1079.        board[0], board[1], board[2],
  1080.        board[3], board[4], board[5], won, lost, tied,
  1081.        board[6], board[7], board[8]);
  1082. #endif
  1083.     N++;
  1084.   } while ( nextperm(perm, 9) );
  1085.  
  1086.   printf("%d games:  won %d, lost %d, tied %d\n", N, won, lost, tied);
  1087.   exit(0);
  1088. }
  1089.  
  1090. int    s;
  1091. int    *row;
  1092.  
  1093. over()
  1094. {
  1095.   for ( row=rows[0]; row<rows[8]; row+=3 ) {
  1096.     s = board[row[0]] + board[row[1]] + board[row[2]];
  1097.     if ( s == 3 )
  1098.       return ++won;
  1099.     if ( s == 12 )
  1100.       return ++lost;
  1101.   }
  1102.   return 0;
  1103. }
  1104.  
  1105. nextperm(c, n)
  1106. int    c[], n;
  1107. {
  1108.   int    i = n-2, j=n-1, t;
  1109.  
  1110.   while ( i >= 0 && c[i] >= c[i+1] )
  1111.     i--;
  1112.   if ( i < 0 )
  1113.     return 0;
  1114.   while ( c[j] <= c[i] )
  1115.     j--;
  1116.   t = c[i];  c[i] = c[j];  c[j] = t;
  1117.   i++;  j = n-1;
  1118.   while ( i < j ) {
  1119.     t = c[i];  c[i] = c[j];  c[j] = t;
  1120.     i++;  j--;
  1121.   }
  1122.   return 1;
  1123. }
  1124.  
  1125.  
  1126.  
  1127. ==> competition/tests/analogies/long.p <==
  1128. 1. Host : Guest :: Cynophobia : ?
  1129. 2. Mountain : Plain :: Acrocephalic : ?
  1130. 3. Lover : Believer :: Philofelist : ?
  1131. 4. 4 : 6 :: Bumblebee : ?
  1132. 5. 2 : 1 :: Major : ?
  1133. 6. 1 : 24 :: Group : ?
  1134. 7. 4 : 64 :: Crotchet : ?
  1135. 8. Last : First :: Grave : ?
  1136. 9. 7 : 9 :: Throne : ?
  1137. 10. Pride : Hatred :: Beelzebub : ?
  1138. 11. Dollar : Bond :: Grant : ?
  1139. 12. Ek : Sankh :: 1 : ?
  1140.  
  1141. ==> competition/tests/analogies/long.s <==
  1142. 1. Lyssophobia
  1143.  
  1144. Cynophobia is the fear of dogs; lyssophobia is the fear of rabies.  As
  1145. Rodney Adams pointed out, a word meaning the fear of fleas would be
  1146. even better, but I've been unable to locate such a word (although
  1147. surely one must exists).
  1148.  
  1149. 2. Homalocephalic
  1150.  
  1151. Acrocephalic is having a pointed head; homalocephalic is having a flat
  1152. head.  Rodney Adamas suggested "planoccipital", but on checking this
  1153. apparently refers to having a flat back of the skull, so he only gets
  1154. partial credit.
  1155.  
  1156. 3. Galeanthropist
  1157.  
  1158. A philofelist is a cat-lover (also commonly called an ailurophile);
  1159. a galeanthropist is a person who believes they are a cat.
  1160.  
  1161. 4. Blue Bird
  1162.  
  1163. A Camp Fire Girl who is 4 is in the Bumblebee Club; a Campfire Girl
  1164. who is 6 in the Blue Bird Club.  I should have had "4 or 5" instead
  1165. of "4" to remove ambiguity (e.g. Mark Brader suggested "triplane").
  1166.  
  1167. 5. Brigadier
  1168.  
  1169. A 2-star general in the army is a major general; a 1-star general
  1170. in the army is a brigadier general.
  1171.  
  1172. 6. Field Army
  1173.  
  1174. Army groupings; there are 24 "groups" in a "field army".
  1175.  
  1176. 7. Hemidemisemiquaver
  1177.  
  1178. A crotchet is a quarter-note; a hemidemisemiquaver is a sixty-fourth
  1179. note.  Rodney Adams and Mark Brader both got this.
  1180.  
  1181. 8. Prestissimo
  1182.  
  1183. In music prestissimo means extremely fast; grave means very slow to
  1184. the point of solemnity.  This question was poorly worded (I received
  1185. both "womb" and "cradle" as answers).
  1186.  
  1187. 9. Seraph
  1188.  
  1189. In the ninefold hierarchy of angels, a throne ranks 7th and a seraph
  1190. 9th (9th being most powerful).  Rodney Adams got this one.
  1191.  
  1192. 10. Sonneillon
  1193.  
  1194. In Father Sebastien Machaelis's (one of the more famous exorcists)
  1195. hierarchy of devils, Beelzebub is responsible for pride, Sonneillon
  1196. for hatred.
  1197.  
  1198. 11. Roosevelt
  1199.  
  1200. Grant is on the $50 bill; Roosevelt on the $50 savings bond.
  1201.  
  1202. 12. 10^14
  1203.  
  1204. Ek is 1 in Hindi; sankh is 10^14 (one hundred quadrillion).
  1205. -- 
  1206. Chris Long, 265 Old York Rd., Bridgewater, NJ  08807-2618
  1207.  
  1208. ==> competition/tests/analogies/pomfrit.p <==
  1209. 1. NATURAL: ARTIFICIAL :: ANKYLOSIS: ?
  1210. 2.  RESCUE FROM CHOKING ON FOOD, etc.: HEIMLICH :: ADJUSTING MIDDLE EAR PRESSURE: ?
  1211. 3. LYING ON OATH: PERJURY :: INFLUENCING A JURY: ?
  1212. 4. RECTANGLE: ELLIPSE :: MERCATOR: ?
  1213. 5. CLOSED: CLEISTOGAMY :: OPEN: ?
  1214. 6. FO'C'SLE: SYNCOPE :: TH'ARMY: ?
  1215. 7. FILMS: OSCAR :: MYSTERY NOVELS: ?
  1216. 8. QUANTITATIVE DATA: STATISTICS :: HUMAN SETTLEMENTS: ?
  1217. 9. 7: 19 : : SEPTIMAL: ?
  1218. 10. 3 TO 2: SESQUILATERAL :: 7 TO 5: ?
  1219. 11. SICILY: JAPAN :: MAFIA: ?
  1220. 12. CELEBRITIES: SYCOPHANTIC :: ANCESTORS: ?
  1221. 13. 95: 98 :: VENITE: ?
  1222. 14. MINCES: EYES :: PORKIES: ?
  1223. 15. POSTAGE STAMPS: PHILATELIST: MATCHBOX LABELS: ?
  1224. 16. MALE: FEMALE :: ARRENOTOKY: ?
  1225. 17 TAILOR: DYER :: SARTORIAL: ?
  1226. 18. HERMES: BACCHUS :: CADUCEUS: ?
  1227. 19. 2823: 5331 :: ELEPHANT: ?
  1228. 20. CENTRE OF GRAVITY: BARYCENTRIC :: ROTARY MOTION: ?
  1229. 21. CALIFORNIA: EUREKA :: NEW YOKK: ?
  1230. 22. MARRIAGE: DIGAMY :: COMING OF CHRIST: ?
  1231. 23. 6: 5 :: PARR: ?
  1232. 24. GROUP: INDIVIDUAL :: PHYLOGENESIS: ?
  1233. 25. 12: 11 :: EPSOM: ?
  1234.  
  1235. ==> competition/tests/analogies/pomfrit.s <==
  1236. 1. ARTHRODESIS
  1237. 2. VALSALVA
  1238. 3. EMBRACERY
  1239. 4. MOLLWEIDE
  1240. 5. CHASMOGAMY
  1241. 6. SYNAL(O)EPHA
  1242. 7. EDGAR
  1243. 8. EKISTICS
  1244. 9. DECENNOVAL
  1245. 10. SUPERBIQUINTAL
  1246. 11. YAKUZA
  1247. 12. FILIOPETISTIC
  1248. 13. CANTATE
  1249. 14. LIES
  1250. 15. PHILLUMENIST
  1251. 16. THELYTOKY
  1252. 17. TINCTORIAL
  1253. 18. THYRSUS
  1254. 19. ANTIQUARIAN
  1255. 20. TROCHILIC
  1256. 21. EXCELSIOR (mottos)
  1257. 22. PAROUSIA
  1258. 23. HOWARD (wives of Henry VIII)
  1259. 24. ONTOGENESIS
  1260. 25. GLAUBER (salts)
  1261.  
  1262.  
  1263.  
  1264. ==> competition/tests/analogies/quest.p <==
  1265. 1. Mother: Maternal :: Stepmother: ?
  1266. 2. Club: Axe :: Claviform: ?
  1267. 3. Cook Food: Pressure Cooker :: Kill Germs: ?
  1268. 4. Water: Air :: Hydraulic: ?
  1269. 5. Prediction: Dirac :: Proof: ?
  1270. 6. Raised: Sunken :: Cameo: ?
  1271. 7. 1: 14 :: Pound: ?
  1272. 8. Malay: Amok :: Eskimo Women: ?
  1273. 9. Sexual Intercourse: A Virgin :: Bearing Children: ?
  1274. 10. Jaundice, Vomiting, Hemorrhages: Syndrome :: Jaundice: ?
  1275. 11. Guitar: Cello :: Segovia: ?
  1276. 12. Bars: Leaves :: Eagle: ?
  1277. 13. Roll: Aileron :: Yaw: ?
  1278. 14. 100: Century :: 10,000: ?
  1279. 15. Surface: Figure :: Mobius: ?
  1280. 16. Logic: Philosophy :: To Know Without Conscious Reasoning: ?
  1281. 17. Alive: Parasite :: Dead: ?
  1282. 18. Sea: Land :: Strait: ?
  1283. 19. Moses: Fluvial :: Noah: ?
  1284. 20. Remnant: Whole :: Meteorite: ?
  1285. 21. Opossum, Kangaroo, Wombat: Marsupial :: Salmon, Sturgeon, Shad: ?
  1286. 22. Twain/Clemens: Allonym :: White House/President: ?
  1287. 23. Sculptor: Judoka :: Fine: ?
  1288. 24. Dependent: Independent :: Plankton: ?
  1289. 25. Matthew, Mark, Luke, John: Gospels :: Joshua-Malachi: ?
  1290. 26. Luminous Flux: Lumen :: Sound Absorption: ?
  1291. 27. 2: 3 :: He: ?
  1292. 28. Growth: Temperature :: Pituitary Gland: ?
  1293. 29. Spider: Arachnoidism :: Snake: ?
  1294. 30. Epigram: Anthology :: Foreign Passages: ?
  1295. 31. Pathogen: Thermometer :: Lethal Wave: ?
  1296. 32. Russia: Balalaika :: India: ?
  1297. 33. Involuntary: Sternutatory :: Voluntary: ?
  1298. 34. Unusual Hunger: Bulimia :: Hunger for the Unusual: ?
  1299. 35. Blind: Stag :: Tiresias: ?
  1300. 36. River: Fluvial :: Rain: ?
  1301. 37. Country: City :: Tariff: ?
  1302. 38. $/Dollar: Logogram :: 3, 5, 14, 20/Cent: ?
  1303. 39. Lung Capacity: Spirometer :: Arterial Pressure: ?
  1304. 40. Gold: Ductile :: Ceramic: ?
  1305. 41. 7: 8 :: Uranium: ?
  1306. 42. Judaism: Messiah :: Islam: ?
  1307. 43. Sight: Amaurosis :: Smell: ?
  1308. 44. Oceans: Cousteau :: Close Encounters of the Third Kind: ?
  1309. 45. Diamond/Kimberlite: Perimorph :: Fungus/Oak: ?
  1310. 46. Compulsion to Pull One's Hair: Trichotillomania :: 
  1311.     Imagine Oneself As a Beast: ?
  1312. 47. Cross: Neutralism :: Hexagram: ?
  1313. 48. Wing: Tail :: Fuselage: ?
  1314. 49. Bell: Loud :: Speak: ?
  1315. 50. Benevolence: Beg :: Philanthropist: ?
  1316. 51. 10: Decimal :: 20: ?
  1317. 52. Five-sided Polyhedron: Pentahedron :: ?
  1318.     Faces of Parallelepiped Bounded by a Square: ?
  1319. 53. Motor: Helicopter :: Airflow: ?
  1320. 54. Man: Ant :: Barter: ?
  1321. 55. United States: Soviet Union :: Cubism: ?
  1322. 56. State: Stipend :: Church: ?
  1323. 57. Motorcycle: Bicycle :: Motordrome: ?
  1324. 58. Transparent: Porous :: Obsidian: ?
  1325. 59. pi*r^2*h: 1/3*pi*r^2*h :: Cylinder: ?
  1326.  
  1327. ==> competition/tests/analogies/quest.s <==
  1328. Annotated solutions.
  1329.  
  1330. If there is more than one word that fits the analogy, we list the best
  1331. word first.  Goodness of fit considers many factors, such as parallel
  1332. spelling, pronunciation or etymology.  In general, a word that occurs
  1333. in Merriam-Webster's Third New International Dictionary is superior to
  1334. one that does not.  If we are unsure of the answer, we mark it with
  1335. a question mark.
  1336.  
  1337. Most of these answers are drawn from Herbert M. Baus, _The Master
  1338. Crossword Puzzle Dictionary_, Doubleday, New York, 1981.  The notation
  1339. in parentheses refers to the heading and subheading, if any, in Baus.
  1340.  
  1341. 1. Mother: Maternal :: Stepmother: Novercal (STEPMOTHER, pert.)
  1342. 2. Club: Axe :: Claviform: Dolabriform, Securiform (AXE, -shaped)
  1343.     "Claviform" is from Latin "clava" for "club"; "securiform" is from
  1344.     Latin "secura" for "axe"; "dolabriform" is from Latin "dolabra" for "to
  1345.     hit with an axe."  Thus "securiform" has the more parallel etymology.
  1346.     However, only "dolabriform" occurs in Merriam-Webster's Third New
  1347.     International Dictionary.
  1348. 3. Cook Food: Pressure Cooker :: Kill Germs: Autoclave (PRESSURE, cooker)
  1349. 4. Water: Air :: Hydraulic: Pneumatic (AIR, pert.)
  1350. 5. Prediction: Dirac :: Proof: Anderson (POSITRON, discoverer)
  1351. 6. Raised: Sunken :: Cameo: Intaglio (GEM, carved)
  1352. 7. 1: 14 :: Pound: Stone (ENGLAND, weight)
  1353. 8. Malay: Amok :: Eskimo Women: Piblokto (ESKIMO, hysteria)
  1354. 9. Sexual Intercourse: A Virgin :: Bearing Children: A Nullipara
  1355. 10. Jaundice, Vomiting, Hemorrhages: Syndrome :: Jaundice: Symptom (EVIDENCE)
  1356. 11. Guitar: Cello :: Segovia: Casals (SPAIN, cellist)
  1357. 12. Bars: Leaves :: Eagle: Stars (INSIGNIA)
  1358. 13. Roll: Aileron :: Yaw: Rudder (AIRCRAFT, part)
  1359. 14. 100: Century :: 10,000: Myriad, Banzai? (NUMBER)
  1360.      "Century" usually refers to one hundred years, while "myriad" refers
  1361.      to 10,000 things, but "century" can also mean 100 things.  "Banzai"
  1362.      is Japanese for 10,000 years.
  1363. 15. Surface: Figure :: Mobius: Klein
  1364. 16. Logic: Philosophy ::
  1365.     To Know Without Conscious Reasoning: Theosophy (MYSTICISM)
  1366.      There are many schools of philosophy that tout the possibility of
  1367.      knowledge without conscious reasoning (e.g., intuitionism).
  1368.      "Theosophy" is closest in form to the word "philosophy."
  1369. 17. Alive: Parasite :: Dead: Saprophyte (SCAVENGER)
  1370. 18. Sea: Land :: Strait: Isthmus (CONNECTION)
  1371. 19. Moses: Fluvial :: Noah: Diluvial (FLOOD, pert.)
  1372. 20. Remnant: Whole :: Meteorite: Meteoroid? (METEOR)
  1373.      A meteorite is the remains of a meteoroid after it has
  1374.      partially burned up in the atmosphere.  The original meteoroid
  1375.      may have come from an asteroid, comet, dust cloud, dark matter,
  1376.      supernova, interstellar collision or other sources as yet unknown.
  1377. 21. Opossum, Kangaroo, Wombat: Marsupial ::
  1378.     Salmon, Sturgeon, Shad: Andromous (SALMON)
  1379. 22. Twain/Clemens: Allonym :: White House/President: Metonym (FIGURE, of speech)
  1380. 23. Sculptor: Judoka :: Fine: Martial (SELF, -defense)
  1381. 24. Dependent: Independent :: Plankton: Nekton (ANIMAL, free-swimming)
  1382. 25. Matthew, Mark, Luke, John: Gospels ::
  1383.     Joshua-Malachi: Nebiim (HEBREW, bible books)
  1384. 26. Luminous Flux: Lumen :: Sound Absorption: Sabin (SOUND, absorption unit)
  1385. 27. 2: 3 :: He: Li (ELEMENT)
  1386. 28. Growth: Temperature :: Pituitary Gland: Hypothalamus (BRAIN, part)
  1387. 29. Spider: Arachnoidism :: Snake: Ophidism, Ophidiasis, Ophiotoxemia
  1388.      None of these words is in Webster's Third.
  1389. 30. Epigram: Anthology :: Foreign Passages: Chrestomathy, Delectus (COLLECTION)
  1390.      These words are equally good answers.
  1391. 31. Pathogen: Thermometer :: Lethal Wave: Dosimeter? (X-RAY, measurement)
  1392.      What does "lethal wave" refer to?  If it is radiation, then
  1393.      a dosimeter measures the dose, not the effect, as does a thermometer.
  1394. 32. Russia: Balalaika :: India: Sitar, Sarod (INDIA, musical instrument)
  1395.      Both are guitar-like instruments (lutes) native to India.
  1396. 33. Involuntary: Sternutatory :: Voluntary: Expectorant? (SPIT)
  1397.      A better word would be an agent that tends to cause snorting or
  1398.      exsufflation, which is the voluntary, rapid expulsion of air from
  1399.      the lungs.
  1400. 34. Unusual Hunger: Bulimia ::
  1401.     Hunger for the Unusual: Allotriophagy, Pica (HUNGER, unusual)
  1402.     These words are synonyms.
  1403. 35. Blind: Stag :: Tiresias: Actaeon (STAG, changed to)
  1404. 36. River: Fluvial :: Rain: Pluvial (RAIN, part.)
  1405. 37. Country: City :: Tariff: Octroi (TAX, kind)
  1406. 38. $/Dollar: Logogram :: 3, 5, 14, 20/Cent: Cryptogram (CODE)
  1407. 39. Lung Capacity: Spirometer ::
  1408.     Arterial Pressure: Sphygmomanometer (PULSE, measurer)
  1409. 40. Gold: Ductile :: Ceramic: Fictile (CLAY, made of)
  1410. 41. 7: 8 :: Uranium: Neptunium (ELEMENT, chemical)
  1411. 42. Judaism: Messiah :: Islam: Mahdi (MOHAMMEDAN, messiah)
  1412. 43. Sight: Amaurosis :: Smell: Anosmia, Anosphresia (SMELL, loss)
  1413.      These words are synonyms.
  1414. 44. Oceans: Cousteau :: Close Encounters of the Third Kind: Spielburg, Truffaut
  1415.      Steven Spielburg was the person most responsible for the movie;
  1416.      Francois Truffaut was a French person appearing in the movie.
  1417. 45. Diamond/Kimberlite: Perimorph ::
  1418.     Fungus/Oak: Endophyte, Endoparasite (PARASITE, plant)
  1419.      An endoparasite is parasitic, while an endophyte may not be.  Which
  1420.      answer is best depends upon the kind of fungus.
  1421. 46. Compulsion to Pull One's Hair: Trichotillomania :: 
  1422.     Imagine Oneself As a Beast: Zoanthropy, Lycanthropy
  1423.      Neither word is exactly right: "zoanthropy" means imagining oneself
  1424.      to be an animal, while "lycanthropy" means imagining oneself to be
  1425.      a wolf.
  1426. 47. Cross: Neutralism :: Hexagram: Zionism (ISRAEL, doctrine)
  1427. 48. Wing: Tail :: Fuselage: Empennage, Engines, Waist? (TAIL, kind)
  1428.      "Empennage" means the tail assemply of an aircraft, which is more a
  1429.      synonym for "tail" than "wing" is for "fuselage."  The four primary
  1430.      forces on an airplane are: lift from the wings, negative lift from
  1431.      the tail, drag from the fuselage, and thrust from the engines.  The
  1432.      narrow part at the end of the fuselage is called the "waist."
  1433. 49. Bell: Loud :: Speak: Hear, Stentorian?
  1434.      The Sanskrit root of "bell" means "he talks" or "he speaks"; the
  1435.      Sanskrit root of "loud" means "he hears".  A bell that makes a lot
  1436.      of noise is loud; a speaker who makes a lot of noise is stentorian.  
  1437. 50. Benevolence: Beg :: Philanthropist: Mendicant, Mendicate?
  1438.      If the analogy is attribute: attribute :: noun: noun, the answer
  1439.      is "mendicant";  if the analogy is noun: verb :: noun: verb the
  1440.      answer is "mendicate."
  1441. 51. 10: Decimal :: 20: Vigesimal (TWENTY, pert.)
  1442. 52. Five-sided Polyhedron: Pentahedron ::
  1443.     Faces of Parallelepiped Bounded by a Square: ?
  1444.      Does this mean a parallelepiped all of whose faces are bounded by
  1445.      a square (and what does "bounded" mean), or does it mean all six
  1446.      parallelograms that form the faces of a parallelepiped drawn in a
  1447.      plane inside of a square?
  1448. 53. Motor: Helicopter :: Airflow: Autogiro (HELICOPTER)
  1449. 54. Man: Ant :: Barter: Trophallaxis
  1450. 55. United States: Soviet Union :: Cubism: ? (ART, style)
  1451.      If the emphasis is on opposition and collapse, there were several
  1452.      movements that opposed Cubism and that died out (e.g., Purism,
  1453.      Suprematism, Constructivism).  If the emphasis is on freedom of
  1454.      perspective versus constraint, there were several movements that
  1455.      emphasized exact conformance with nature (e.g., Naturalism, Realism,
  1456.      Photo-Realism).  If the emphasis is on dominating the art
  1457.      scene, the only movement that was contemporary with Cubism and
  1458.      of the same popularity as Cubism was Surrealism.  A better answer
  1459.      would be an art movement named "Turkey-ism", since the Soviet Union
  1460.      offered to exchange missiles in Cuba for missiles in Turkey during
  1461.      the Cuban Missile Crisis.
  1462. 56. State: Stipend :: Church: Prebend (STIPEND)
  1463. 57. Motorcycle: Bicycle :: Motordrome: Velodrome (CYCLE, track)
  1464. 58. Transparent: Porous :: Obsidian: Pumice (GLASS, volcanic)
  1465. 59. pi*r^2*h: 1/3*pi*r^2*h :: Cylinder: Cone
  1466.  
  1467. ==> competition/tests/math/putnam/putnam.1967.p <==
  1468.  
  1469. In article <5840002@hpesoc1.HP.COM>, nicholso@hpesoc1.HP.COM (Ron Nicholson) writes:
  1470. > Say that we have a hallway with n lockers, numbered from sequentialy
  1471. > from 1 to n.  The lockers have two possible states, open and closed. 
  1472. > Initially all the lockers are closed.  The first kid who walks down the
  1473. > hallway flips every locker to the opposite state, that is, opens them
  1474. > all.  The second kid flips the first locker door and every other locker
  1475. > door to the opposite state, that is, closes them.  The third kid flips
  1476. > every third door, opening some, closing others.  The forth kid does every
  1477. > fourth door, etc.
  1478. > After n kid have passed down the hallway, which lockers are open, and
  1479. > which are closed?
  1480.  
  1481. B4.  (a) Kids run down a row of lockers, flipping doors (closed doors
  1482. are opened and opened doors are closed).  The nth boy flips every nth
  1483. lockers' door.  If all the doors start out closed, which lockers will
  1484. remain closed after infinitely many kids?
  1485.  
  1486. ==> competition/tests/math/putnam/putnam.1967.s <==
  1487. B4.  (a) Only lockers whose numbers have an odd number of factors will remain
  1488. closed, which are the squares.
  1489.  
  1490.