# I’m Not Playing Games Here

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:

4->1
6->4
1->6
7->2
10->3
12->5
13->6
2->9
3->10
15->6
6->13
14->12
11->13

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
and
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 Technology
This post was promoted to the Main Feed by a Ricochet Editor at the recommendation of Ricochet members. Like this post? Want to comment? Join Ricochet’s community of conservatives and be part of the conversation. Get your first month free.

1. Podcaster
EJHill
@EJHill

Bet you leave ‘em laughing at the Cracker Barrel.

2. Contributor
Henry Racette
@HenryRacette

Bet you leave ‘em laughing at the Cracker Barrel.

Hey, there are lots of other places I’m still allowed to visit when I need my chicken fried steak fix (which is more often than one might imagine).

3. Member
Living High and Wide
@OldDanRhody

Henry Racette: Oh, and the kids say my middle name is “Fun Crusher.”

As they should.

As it should.

4. Member
Vince Guerra
@VinceGuerra

Good. Can you write a program to win at Mancala next that I can memorize to finally best my wife? She always beats me…always.

5. Member
OkieSailor
@OkieSailor

So your learning style is not tactile?  I’d guess you are more to the visual side. Doesn’t make you better or worse only different.  Neither Einstein nor Doofus.  We all have our own niches which makes us more interesting IMHO.

6. Member
Full Size Tabby
@FullSizeTabby

So your learning style is not tactile? I’d guess you are more to the visual side. Doesn’t make you better or worse only different. Neither Einstein nor Doofus. We all have our own niches which makes us more interesting IMHO.

I have been mildly interested in how differently people see and learn ever since in high school I, who found algebra easy to comprehend, could not grasp geometry, while other students who had struggled in algebra sailed through geometry. Those other students could visualize space and shapes in ways that I couldn’t. I needed it laid out in a linear A to B to C progression.

Our family is full of engineers, accountants, and mathematicians, so people all comfortable with numbers and “math,” but with some very different traits. My wife (accountant) can see in space to create patterns, which she mostly uses for quilt designs. Our daughter (mathematician) can recognize patterns in data and events like nobody’s business (it’s how she got her foot in the door at her current and only employer since college). But she’s not particularly interested in creating patterns and designs. Our son (engineer), Like me, is great at linear problem solving, but put it into three dimensional space and it’s harder for him. His wife (engineer) is similar, but her almost identical but mirrored twin sister (artist) is totally into visualizing space (oddly, the artist twin is right-handed, and the engineer twin is left-handed, the opposite of what I would expect).

My last boss (like me an engineer with a law degree) kept overreacting to certain information he was receiving as numbers in a spreadsheet in budget and performance reports. But when I began presenting the same information in a graphical form, he grasped the key points much better, and had more measured responses to the information.

7. Member
Vance Richards
@VanceRichards

Henry Racette: 29,760 ways to leave one peg

Which means you should be able to solve it before they bring out your biscuits . . . but I guess a computer program works also.

8. Coolidge

Henry Racette: Oh, and the kids say my middle name is “Fun Crusher.”

As they should.

As it should.

To my daughters, I was “Mr. Buzzkill” . . .

9. Coolidge

Here’s a video of Bobby Fischer on Johnny Carson.  He solves a tile puzzle in 17 seconds (starting at minute 11:30):

10. Member
WillowSpring
@WillowSpring

Henry Racette: 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,

I know the feeling.  My wife loves doing Suduku  and my first reaction when I see one of her puzzles, my first reaction is : “I can write a program to do that!”  I also think that would be more fun, but I haven’t gotten around to it.

11. Member
Rodin
@Rodin

WhenI saw the photo I remembered the puzzle. Played it when I was a kid and was quite proud that I mastered a repeatable 1 peg solution. I think it was the one you wrote up. Have no idea about the other 29,759.

12. Member
Miffed White Male
@MiffedWhiteMale

So it’s “more difficult” to leave > 4 pegs than it is to leave a single peg.

Why is “1” the challenge?  The challenge should be to leave more than four.

13. Podcaster
Dave Carter
@DaveCarter

This post also explains why I was a humanities major. Geez Louise, this is like eating ice cream too fast and getting a brain headache! I mean, I did respectably well just visualizing the puzzle, but when it’s broken down by the numbers like that, I want to go lie down. Who was it that said that there is nothing in the world so simple that it can’t be rendered incomprehensible by a graph of some sort? Anyway…. gonna pour a whiskey now. Buh bye.

14. Podcaster
EJHill
@EJHill

The Dave Carter Solution: Put 14 shot glasses of whiskey in a pyramid. Every time you jump a glass drink the whiskey. Keep trying until you no longer care how many shot glasses are left.

15. Podcaster
Dave Carter
@DaveCarter

The Dave Carter Solution: Put 14 shot glasses of whiskey in a pyramid. Every time you jump a glass drink the whiskey. Keep trying until you no longer care how many shot glasses are left.

I like the way you dri… I mean, think!

16. Coolidge
Phil Turmel
@PhilTurmel

I have resolutely avoided clicking the link to the code:  the trace of OCD in me would compel a complete code review and style critique.  Which would blow the whole work day.

If that was bait, Hank, it almost worked. (:

17. Contributor
Henry Racette
@HenryRacette

I have resolutely avoided clicking the link to the code: the trace of OCD in me would compel a complete code review and style critique. Which would blow the whole work day.

If that was bait, Hank, it almost worked. (:

Phil, it’s only 200 lines long, so I suspect you’d be done with it in an hour. However, given that I slapped it together knowing full well that I was wasting time doing it, it’s probably just as well that no one who knows how to program looks too closely at it. ;)

18. Member
Hartmann von Aue
@HartmannvonAue

Good. Can you write a program to win at Mancala next that I can memorize to finally best my wife? She always beats me…always.

Someone else even owns Mancala? What a relief!

19. Member
Vince Guerra
@VinceGuerra

Good. Can you write a program to win at Mancala next that I can memorize to finally best my wife? She always beats me…always.

Someone else even owns Mancala? What a relief!

I love it, but I always stress out making the first few moves because it all flows from there.

20. Member
Vince Guerra
@VinceGuerra

Henry Racette: 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,

I know the feeling. My wife loves doing Suduku and my first reaction when I see one of her puzzles, my first reaction is : “I can write a program to do that!” I also think that would be more fun, but I haven’t gotten around to it.

My wife and daughter got a game called ColorKu for Christmas last year. It’s basically Suduku with colored balls instead of numbers.

Every so often when they’re working in a board, just for fun I’ll slowly take a peek over their shoulders, then place a ball and walk away. They get really mad for some reason.

21. Coolidge
John Racette
@JohnRacette

I only do those puzzles while the TV is on. And they’re in a drawer in the other room. And I’m asleep. I’m very good at them.