# Cracker Barrel Triangle Puzzle

### This site

Puzzle Home
Definitions
Solutions
Other size triangles

Dan O'Brien puzzle page
UVA Class assignment
The Cracker Barrel Page

Home
Baseball Schedule Tools
Running / Biking pace chart
Games

I was asked the question as to whether the program would work for other size puzzles. The program was modified and tried to find a solution for a 6x6x6 puzzle but something appeared no be strange with the results at which time I took a more scientific approach. It was discovered that several possible moves were missing.

Then I attempted to find a mathematical formula for the number of possible moves for each size puzzle. Several things became apparent. By adding another row there are only two rows that have moves added. First the row (n - 2) has 2 moves added for each member of the row. Second, the last row has 2 moves added for the two members on either end for a total of 2 * 4 = 8. If there are more than four members of the row there are 4 moves added for each with the total represented by 4 * (n - 4). By adding all of these together we get 2 * (n - 2) + 8 + 4 * (n - 4) = 6n - 12 or 6 * (n - 2).

Knowing that the sum of the numbers such as 1 + 2 + 3 + .. + n = n * (n + 1) / 2, the two formulas were used to arrive at the formula 3 * (n - 1) * (n - 2) which gives the total number of moves for a n-sided triangle.
• 4x4x4 = 3 * (4 - 1) * (4 - 2) = 3 * 3 * 2 = 18
• 5x5x5 = 3 * (5 - 1) * (5 - 2) = 3 * 4 * 3 = 36
• 6x6x6 = 3 * (6 - 1) * (6 - 2) = 3 * 5 * 4 = 60
• 7x7x7 = 3 * (7 - 1) * (7 - 2) = 3 * 6 * 5 = 90

The number of solutions for a 4x4x4 triangle was 14 for slot 2 empty with no solutions for any of the other non-redundant slots being empty. For anything larger than a 5x5x5 only the case with slot 1 was attempted since the program takes too much time to run. Currently, I am still in the process of determining the 6x6x6 since it was necessary to kill the program prematurely after running for over a day. It was not half done yet and already had over 5 billion solutions. Only a handful of these have been checked and they appear to work correctly. Also, because of the large number of solutions only every millionth solution was printed. 7x7x7 is even more troublesome. This has been allowed to run for 3 days with no solution having been found. Whether one exists is still a questionmark.