## You're reading: Posts Tagged: puzzle

### The Double Back puzzle is a nice mix of Towers of Hanoi and Solitaire

This post is both a video and text. The content is largely the same in both versions, so you can pick one to look at.

I’d like to show you a puzzle, or game for one person, that Ed Kirkby came up with. Ed showed this to me at the Big MathsJam gathering last year.

I was walking around MathsJam and people were doing all sorts of stuff and Ed was quietly sat at a table with some cards in front of them, and a couple of people were gathered around with thoughtful faces, so I thought “oh that looks interesting” and I walked over and Ed explained the rules of this game to me.

And like most things at MathsJam, I didn’t immediately know the solution but it really got to me, so I went away and tried to find a solution myself. It was really fun and it was one of those pure experiences of mathematical discovery that you really remember.

I kept grabbing other people and saying, “have you seen Ed’s puzzle? Come over here. Ed, explain this puzzle to this person!” I did that for the duration of the weekend, and for a little while after I got back home.

I’ll show you what the puzzle is.

Take two sets of cards numbered 1 to 4, and lay them out in two rows. The game is to get them the other way round, so each row goes 4, 3, 2, 1.

The things you are allowed to do are to swap two cards that are adjacent numbers and in adjacent columns.

So you can swap the four and three here:

You can also swap to the other row.

You can’t swap the four and the two here because they’re not adjacent numbers.

It’s a permutations puzzle. And with a bit of thinking, a lot of just making random moves, eventually I worked out how to do it for four cards (or two lots of four cards, to be precise).

It took me a few more goes to be sure that I’d found the shortest solution — the fewest moves — but then five really stumped me.

When I tried six cards, I wasn’t sure it was possible at all: there was a point where I kept getting stuck.

So I was really unsure, and Ed was unsure as well – they didn’t know if there was a solution for every number of cards. They’d written some code that very slowly churned out solutions for small $n$, but didn’t have a general solution.

So I did my usual problem solving technique which was, if I couldn’t do it with four cards, do it with three cards, and very briefly with two cards. Then after a while I sort of started seeing a pattern.

I came away from Big MathsJam not knowing how to solve this puzzle.

I kept playing with it when I should have been working, and eventually I think I’ve sort of got the vibe of how it works and I’m pretty sure now I can solve it for any number of cards. I haven’t written down a really rigorous algorithm for doing it but I’ve got a general idea.

### Interactive version

Something that often happened when I was playing with cards was that I’d forget which way I was going, because when you don’t have a strategy you’re sort of making lots of moves to see where they’ll go, and then maybe you want to backtrack a bit, and you go like wait wait — which end did the aces start at? You’re continually picking up cards and moving them, and if you’re as clumsy as I am they scatter all over the place and you end up unsure if you’re in a valid state.

So it won’t surprise you to learn that I made an online version of this.

Big MathsJam happens in November, and by the time I’d got this online version working it was getting close to Christmas and I thought, “we need something that’s not playing cards to be the pieces – why shouldn’t it be baubles? They’re circles, they’re easy to draw.”

So I spent some time drawing a bauble image and making it look Christmassy. I didn’t quite get it ready for last Christmas, so I spent some more time improving the interface and I made it fully keyboard accessible.

And then I made a note to write a post about it in December 2023. And here we are!

I think this is a nice Christmas puzzle: I think the set-up and the rules are easy to remember, and it only needs a pack of cards, which you’ll probably have lying around.

So over Christmas, if there’s a quiet moment, if you get some playing cards in your Christmas cracker or just some pieces that you can put in an easy to identify order, try showing this to someone.

So there you go, that’s the Double Back puzzle, invented by Ed Kirkby, online version made by me.

Looking for something mathematical to amuse you, give your puzzling brain a workout or otherwise satisfy your mathematical curiosity every day for the next month? Look no further – here’s a round-up of our favourite mathsy advent calendars for 2022.

### Prime Run

Here’s a game I’ve been trying to make for a while.

For a while I’ve had a hunch that there’s fun to be had in moving between numbers by using something related to the prime numbers.

Over the years I’ve tried out a few different ideas, but none of them ever worked out – they were either too easy, too hard, or just not interesting. This time, I think I’ve found something close enough to the sweet spot that I’m happy to publish it.

Prime Run is a game about adding and subtracting prime numbers. You start at a random number, with a random target. Your goal is to reach the target, by adding or removing any prime factor of your current number.

### My adventures in 3D printing: Seven Triples puzzle

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

There are seven kinds of shape. There are three copies of each shape. The pieces like to group together in threes.

Can you arrange the pieces into seven groups of three so that for each possible pair of shapes, there is one group containing that pair?

Try to do it without paying attention to colours first, then try to rearrange the pieces so each group has a piece of each colour in it.

### Small Sets of Arc-Sided Tiles

Tim has previously written guest posts here about tiling by tricurves, and is now looking at ways of tiling with other shapes.

In an earlier post elsewhere I covered some basic arc-sided shapes that tile by themselves. Lately I’ve been playing with groups of curved tiling shapes, asking a question common for me: how to get the most play value as an open-ended puzzle? This means getting the most interesting possibilities from the simplest set. “Interesting” includes variety, complexity, challenge and aesthetic appeal. “Simplest” covers not only size of set and the shapes, but also the least total information needed to describe or construct the shapes.

### Making Tricurves

Tim Lexen has written a series of posts on the topic of Tricurves: Bending the Law of Sines, Combining Tricurves and Phantom Tiling. In this latest post, Tim has been working with our own Katie Steckles to turn Tricurves into real objects to play with.

When you discover an interesting mathematical shape or object, there’s a strong instinct to play with it – maybe by drawing sketches and doodles to test the limits of the idea. But in the case of Tricurves, drawing an accurate shape takes a little time, and it doesn’t lend itself well to idle experimentation.

Producing a physical version of a shape, in enough quantity to allow for experimentation, makes it much more tangible. In our own respective locations, we’ve each made use of laser cutting facilities to produce wooden Tricurve tiles to play with, and we encourage you to join in.

### “Transposition”, a sliding block puzzle by Jacob Siehler

This is just a quick post to tell you about a nice puzzle game I spotted on Mathstodon.

It’s called Transposition, and it’s a sliding block puzzle in the vein of the popular game Rush Hour. You’re given a grid that’s almost full of rectangular blocks, and you have to slide them around each other until the two coloured blocks have swapped places.

The puzzle was invented by mathematician Jacob Siehler, who says he used a computer search to generate a pool of puzzles, given the rules of the game. I took quite a while to solve all 5 “easy” puzzles – as with any logic puzzle, you need to play about for a while to get a feel for the mechanics. I hadn’t appreciated at first that the grey blocks don’t need to be in their starting places when you solve the board – only the coloured blocks need to in the right positions.

There are 26 puzzles at the moment, ranging from “easy” to “very hard”. Have a crack at it! I really enjoyed it.

Play: Transposition, by Jacob Siehler