The British weekly New Scientist includes a regular feature called "Enigma" that presents a short mathematical problem. Readers are invited to submit solutions, and on a stated date, one is drawn and awarded £15.
For years I have been somewhat annoyed at these problems because most of them seem to lend themselves to "brute force" solutions easily solvable by a short computer program. I usually know what the particular program needs to do and how to do it, so without actually writing a line of code (or doing anything else to solve the problem), I consider the problem "solved" nevertheless.
However, it has recently occurred to me that these computer solutions to the "Enigma" problems might be of interest in themselves in illustrating useful algorithms or programming techniques. For each "Enigma" problem I take on, I will post a solution and the program I used to determine that solution on the day after the deadline for submitting solutions.
Programs are written in ANSI C, and have been tested with the Microsoft C compiler and the Gnu C compiler. They make use only of the C standard libraries. I make no claims that these solutions are the fastest or most efficient, or even that they work correctly. When the answers are printed in the magazine (6 issues after the problem), the Postscript column below will indicate whether I got the right answer or what went terribly wrong.
Charles Petzold
17 June 2005
March 3, 2006: Due to work pressures, I won't be able to continue this project.
Problem Number | Issue Date | Solution Posted | Solution | Program | Postscript |
---|---|---|---|---|---|
1378 Exaudi Deus |
11 February 2006 | 16 March 2006 | 64 | enigma1378.c | |
1376 Square Facts and Faces |
28 January 2006 | 2 March 2006 | 9 faces, 4 triangles | enigma1376.txt | |
1374 Dominoes to the Power of Two |
14 January 2006 | 16 February 2006 | 0-6, 1-1, 3-3, 4-4, 6-6 | enigma1374.c | Wrong! (Issue of 2/25 says 1-1, 2-2, 3-3, 5-5, 0-2) |
1373 From Point to Corner |
7 January 2006 | 9 February 2006 | 21 and 28 | enigma1373.txt | Correct (Issue of 2/18) |
1372 Three Tours |
24/31 December 2005 | 2 February 2006 | Bethlehem to Hebron by Ass | enigma1372.c | Correct (Issue of 2/11) |
1371 Odd Big Base |
17 December 2005 | 26 January 2006 | 30 | enigma1371.c | Correct (Issue of 2/4) |
1370 Pair of Quadrilaterals |
10 December 2005 | 19 January 2006 | 11 cm | enigma1370.c | Correct (Issue of 1/28) |
1369 Magic Spell |
3 December 2005 | 12 January 2006 | JULY, FORD, MAINE, TWO, NINE | enigma1369.txt | Correct (Issue of 1/21) |
1368 Dutch Squares |
26 November 2005 | 5 January 2006 | 144,837 | enigma1368.txt | Correct (Issue of 1/14) |
1367 Roman Ladder |
19 November 2005 | 21 December 2005 | 33, 32, 31, 19, 9, and 1 |
enigma1367.c | Wrong! (Issue of 1/7 says 37, 39, 13, 3, 2, 1 |
1366 Done in Half the Time |
12 November 2005 | 15 December 2005 | 9:49 PM | enigma1366.c | Correct (Issue of 12/24 & 31) |
1365 European Champions Leagues |
5 November 2005 | 8 December 2005 | 8 | enigma1365.c | Correct (Issue of 12/17) |
1364 Four All |
29 October 2005 | 1 December 2005 | 4096, 4567, 4936, 8164 |
enigma1364.c | Correct (Issue of 12/10) |
1363 Hat Stand |
22 October 2005 | 24 November 2005 | PQSRT | enigma1363.txt | Correct (Issue of 12/3) |
1362 Eight-Fifths |
15 October 2005 | 17 November 2005 | 1260 Miles | enigma1362.c | Correct (Issue of 11/26) |
1361 Enigma Variation |
8 October 2005 | 10 November 2005 | 785,463 | enigma1361.c | Correct (Issue of 11/19) |
1360 An Enigma Gem |
1 October 2005 | 3 November 2005 | GEMNAI | enigma1360.c | Correct (Issue of 11/12) |
1359 The Weaker Sex |
24 September 2005 | 27 October 2005 | 5 couples; no games |
enigma1359.c | Correct (Issue of 11/5) |
1358 Five Fives |
17 September 2005 | 20 October 2005 | 88,724 | enigma1358.c | Correct (Issue of 10/29) |
1357 Diminishing Powers |
10 September 2005 | 13 October 2005 | 2, 9, and 10, then 1 and 5 |
enigma1357.c | Correct (Issue of 10/22) |
1356 Magic Spot |
3 September 2005 | 6 October 2005 | 1-0 3-0 5-0 6-0 3-3 6-5 |
enigma1356.c | Correct (Issue of 10/15) |
1355 Cube Words |
27 August 2005 | 30 September 2005 | cfe afd efa | enigma1355.c | Correct (Issue of 10/8) |
1354 Sound Idea |
20 August 2005 | 23 September 2005 | 10,145,892,367 | enigma1354.c | Correct (Issue of 10/1) |
1353 Three Cubed |
13 August 2005 | 16 September 2005 | 4096 8 729 2 1331 |
enigma1353.c | Correct (Issue of 9/24) |
1352 All But One |
6 August 2005 | 9 September 2005 | 32 | enigma1352.c | Correct (Issue of 9/17) |
1351 Let's Face It |
30 July 2005 | 2 September 2005 | 210 | enigma1351.c | Correct (Issue of 9/10) |
1350 All But One |
23 July 2005 | 25 August 2005 | 3754 | enigma1350.c | Correct (Issue of 9/3) |
1349 Alphabetic Magic |
16 July 2005 | 19 August 2005 | 45 and 21 | enigma1349.c | Correct (Issue of 8/27) |
1348 Team Promotions |
9 July 2005 | 12 August 2005 | 35 | enigma1348.c | Correct (Issue of 8/20) |
1347 Fair and Square |
2 July 2005 | 5 August 2005 | D = 21 U = 18 R = 4 |
enigma1347.c | Correct (Issue of 8/13) |
1346 Divide into Primes |
25 June 2005 | 29 July 2005 | 131p | enigma1346.c | Correct (Issue of 8/6) |
1345 Score? Date? |
18 June 2005 | 22 July 2005 | Scores are A-D, B-C, C-D |
enigma1345.c | Correct (Issue of 7/30) |
1344 Mixed Pairs |
11 June 2005 | 15 July 2005 | Miss Take's: 14 Miss Giving's: 12 |
enigma1344.c | Wrong (Issue of 7/23 says 12 and 10.) |
1343 Digital Dividend |
4 June 2005 | 8 July 2005 | 9,867,312 | enigma1343.c | Correct (Issue of 7/16) |
1342 GOSH |
28 May 2005 | 1 July 2005 | 33 pins | enigma1342.c | Correct (Issue of 7/9) |
1341 Two, Three, Four |
21 May 2005 | 24 June 2005 | THREE=15400 FOUR=6724 |
enigma1341.c | Correct (Issue of 7/2) |
1340 Stairs and Sums |
14 May 2005 | 17 June 2005 | 15.17 | enigma1340.c | Basically correct: (Issue of 6/25 says 38231 / 2520) |
© 2005, Charles Petzold (www.charlespetzold.com)
First Posted: June 2005 (and updated weekly thereafter)
Back to the Et cetera page.
Back to Home