Wednesday 27 June 2012

Fifteen Peg Puzzle Solution is Prime




The puzzle shown above, often called a triangular peg solitaire game is so common you may have last seen it on your table at Cracker Barrel Restaurants.
Below I will give a solution to a common form of the puzzle, so don't look too far below if you want to test out your skills without clues or a solution. If you want to play the online version of the game, try your luck here




If you get really interested, you can try games removing any one of the pegs instead of a corner (which is NOT the easiest possible solution).    If you get frustrated, here are some good hints about the game from an excellent page by George Bell.





Note the symmetry of the triangular board: there are three corner holes (red), three interior holes (green), and three holes at the midpoint of each edge (blue), plus six "other" holes (yellow).
The following rules of thumb are based on a mathematical analysis of the game and should help you solve the puzzle


  1. Avoid jumping into a corner. Of course, in some situations (such as beginning without a corner peg) this is the only jump possible.
  2. Avoid any jump which starts from one of the green interior holes. Such a move is almost always a dead end (none of the solutions on the next page include this jump).
  3. The easiest place to begin the game is with the missing peg (hole) at one of the blue midpoint locations. The hardest place to begin is with the missing peg at one of the green interior holes. 

Complete solution below:::


The truth is, there are thousands of possible solutions to the game. The solution I just came across is for the case in which you start with the top corner (the one hole) empty, and finish with a single peg in that hole (which I just learned is called a single vacancy complement solution). If you number the holes starting at an apex of the triangle with one, then two and three on the next row, and continue with 11 through 15 on the bottom row, then moves can be described with (x,y) coordinates where the term (x,y) means move the peg in hole x to hole y.
A winning solution to the 15-hole triangular peg solitaire game using this method is: (4,1), (6,4), (15,6), (3,10), (13,6), (11,13), (14,12), (12,5), (10,3), (7,2), (1,4), (4,6), (6,1).

Not only does this solution leave the final peg in the original empty hole, but the sum of all the x,y hole numbers in the solution is prime (179) and if I time this right it should be first posted on the 179th day of the year 2012. By the way, if you only sum the values of the landing holes, that's prime also (73).

I first came across this curious little fact at the Prime Curios page.

Haven't pursued it yet, but since there are thousands of solutions to this puzzle, I assume that there would be other sequences which produced a prime also.

Good luck, and share the ones that you find with me.




No comments: