### How many ways to shuffle a pack of cards?

This is an excerpt from friend of The Aperiodical, Matt Parker’s book, “Things to Make and Do in the Fourth Dimension”, which is out now in paperback.

There’s a lovely function in mathematics called the factorial function, which involves multiplying the input number by every number smaller than it. For example: $\operatorname{factorial}(5) = 5 \times 4 \times 3 \times 2 \times 1 = 120$. The values of factorials get alarmingly big so, conveniently, the function is written in shorthand as an exclamation mark. So when a mathematician writes things like $5! = 120$ and $13! = 6,\!227,\!020,\!800$ the exclamation mark represents both factorial and pure excitement. Factorials are mathematically interesting for several reasons, possibly the most common being that they represent the ways objects can be shuffled. If you have thirteen cards to shuffle, then there are thirteen possible cards you could put down first. You then have the remaining twelve cards as options for the second one, eleven for the next, and so on – giving just over 6 billion possibilities for arranging a mere thirteen cards.

### I’ve made my own numbers-in-a-grid game

For the past couple of weeks, I’ve been obsessively playing the game Twenty on my phone. The fact that my wife has consistently been ahead of my high scores has nothing to do with it.

The main source of strife in my marriage.

Twenty is another in the current spate of “numbers-in-a-grid” games that also includes Threes, 10242048 (and its $2^{48}$ clones), Just Get 10, and Quento.

The basic idea is that you have a grid of numbered tiles, and you combine them to build up your score. While there are lots of unimaginative derivatives of the bigger games, there’s a surprisingly large range of different games following this template.

With so many different games being created, I thought that a chap like me should be able to come up with a numbers-in-a-grid game of my own. Yet, for a long time, I just couldn’t come up with anything that was any good.

Yesterday I had a really nice shower, and the accompanying feeling that I’d come up with a really good idea – make a game to do with arithmetic progressions.

### #thatlogicproblem round-up

C: $K_A m; \\ K_B d.$

A: $\neg K_A d; \\ m \vDash \neg K_B m.$

B: $d \not\vDash K_B m; \\ (K_A(\neg K_B m)) \vDash K_B (m,d).$

A: $m \wedge K_B(m,d) \vDash K_A (m,d).$

Albert, Bernard and Cheryl have had a busy week. They’re the stars of #thatlogicproblem, a question from a Singapore maths test that was posted to Facebook by a TV presenter and quickly sent the internet deduction-crazy.

First of all: no, it’s not meant to be answered by an average Singaporean student. It’s a hard question from a schools Olympiad test.

### Pi Day 2015: The Aperiodical goes π mad

Happy π day everyone! I hope you’re having a great day, and having lots of fun mathematical parties.

You may have noticed that here at The Aperiodical, we’ve been posting exciting π-related items all week – and here’s a list of them all, collected into one handy place. Enjoy!

### Wolfram|Alpha can’t. But CP can!

For a while, I’ve been following this cool Twitter account that tweets questions Wolfram|Alpha can’t answer. The genius of it is that the questions all look like things that you could half-imagine the solution algorithm for at a glance, and many of them look like the kinds of questions Wolfram like to give as examples when they’re showing off how clever their system is.

Questions like this:

The answer to that is 278. How do I know that? I know that because I went on a little problem-solving binge answering the questions that Wolfram|Alpha can’t.

### From the Mailbag: Golfing Combinatorics

Sam’s dad is in a mathematical conundrum – so she’s asked Katie, one of our editors, if maths can save the day.

Dear The Aperiodical,

My dad is going away on a golfing holiday with seven of his friends and, since I know a little bit about mathematics, he’s asked me to help him work out the best way to arrange the teams for the week. I’ve tried to work out a solution, but can’t seem to find one that fits.

They’ll be playing 5 games during the week, on 5 different days, and they’d like to split the group of 8 people into two teams of four each day. The problem is, they’d each like to play with each of their friends roughly the same amount – so each golfer should be on the same team as each other golfer at least twice, but no more than three times.

Can you help me figure it out?

Sam Coates, Manchester

### Apiological: mathematical speculations about bees (Part 1: Honeycomb geometry)

Bees have encouraged mathematical speculation for two millennia, since classical scholars tried to explain the geometrically appealing shape of honeycombs. How do bees tackle complex problems that humans would express mathematically? In this series we’ll explore three situations where understanding the maths could help explain the uncanny instincts of bees.

# Honeycomb geometry

A curvy wild honeycomb.

Honeybees collect nectar from flowers and use it to produce honey, which they then store in honeycombs made of beeswax (in turn derived from honey). A question that has puzzled many inquiring minds across the ages is: why are honeycombs made of hexagonal cells?

The Roman scholar Varro, in his 1st century BC book-long poem De Agri Cultura (“On Agriculture”), briefly states

“Does not the chamber in the comb have six angles, the same number as the bee has feet? The geometricians prove that this hexagon inscribed in a circular figure encloses the greatest amount of space.”