Ricochet is the best place on the internet to discuss the issues of the day, either through commenting on posts or writing your own for our active and dynamic community in a fully moderated environment. In addition, the Ricochet Audio Network offers over 50 original podcasts with new episodes released every day.
In some circles I’m known as a pretty bright guy: I can reduce fractions in my head, I know the answers to most science questions found in a high-school textbook (up until the junior year, at any rate), and I can tell you in what centuries the United States fought most of its major wars — and against whom.
The kids I tutor will, albeit grudgingly, admit that I’m no dummy.
But they know my limitations, and one of them is puzzles. I just can’t bring myself to spend time with puzzles, computer games, or any other solitary brainteaser type activity. Even card and board games are low on my list of preferred activities, though I’ll play to be sociable when there’s no way to rope a kid into playing in my stead or otherwise gracefully dodge the obligation.
A couple of days ago my eleven year old nephew Jack, who has endured endless hours of my math drills, brought me that little puzzle with the fourteen pegs in the fifteen holes, the one you see on tables in folksy comfort-food bars every now and then.
You know the drill: jump one peg with another until you’re down to the fewest possible remaining pegs. If you leave one, you’re Einstein. Leave two, you’re, I don’t know, Feynman maybe. Three or more and you’re just some average schmo. Justin Bieber, say.
I generally leave three, sometimes four. I’ve left two a couple of times, though I don’t know how, but never just a solitary peg.
Young Jackalope (that’s what I call him), who delights in catching me in error when he can, proudly presented the puzzle with one peg remaining. He then set it up and solved it again, daring me to equal his performance.
I couldn’t. I think I left four pegs, then three a couple of times. Then I told him maybe we should practice dividing fractions, even though it was a long weekend, and he wisely disappeared.
So I did what any self-respecting nerd would do on a rainy Saturday afternoon. I went home and spent two hours writing a program to solve the stupid puzzle, so that my little cousin — and his older sister, and his sister’s friend Izzy, and his mom — couldn’t show me up.
Number the holes on the puzzle from one to fifteen in the obvious way, and put a peg in every hole except the first:
Here’s a sequence of moves that will leave one peg remaining, in the center of the bottom row:
It turns out that there are several ways to solve the puzzle such that only a single peg is left. In fact, there are 29,760 distinct “games’ that will leave one peg.
All that, and yet I’ve been unable to do it myself in the few dozen times I’ve played with the silly thing.
Incidentally, there are 568,630 distinct games that can be played. The most pegs it’s possible to leave is eight. Here are the number of possible way to play the game that leave a specified number of pegs on the board:
1 peg: 29,760
2 pegs: 139,614
3 pegs: 259,578
4 pegs: 123,664
5 pegs: 14,844
6 pegs: 844
7 pegs: 324
And how many ways are there of leaving the maximum possible eight pegs? Just two:
4->1 13->4 10->8 7->9 6->13 1->6
6->1 13->6 7->9 10->8 4->13 1->4.
(As you can see, thanks to symmetry the second game is really the first game played in mirror image.)
I brought my laptop today and showed the kids the list of 29,760 ways to leave one peg, and even ran through a few of the games on the puzzle to show that it worked. I thought they’d think it was pretty neat.
They didn’t. They wandered off to make slime in the basement.
In the unlikely event that anyone cares, you can find my hastily-written C++ code for solving the puzzle here. It uses recursion, which I don’t normally do very often (and it probably shows) because it’s not a style of programming well-suited to embedded control systems, and that’s where I spend most of my time.
Oh, and the kids say my middle name is “Fun Crusher.” That pleases me.Published in