COMPUTING SCIENCE

# Group Theory in the Bedroom

An insomniac's guide to the curious mathematics of mattress flipping

A Flying Mattress Ride

To make sense of all this turning and flipping, the first thing we
need is some clear notation. A mattress can be rotated around any of
three orthogonal axes. I could label the axes *x*, *y*
and *z*, but I'd just forget which is which, so it seems
better to adopt the terminology of aviation. If you think of a
mattress as an airplane flying toward the headboard of the bed, then
the three axes are designated *roll*, *pitch* and
*yaw* as shown in the illustration to the right. The roll
axis is parallel to the longest dimension of the mattress, the pitch
axis runs along the next-longest dimension, and the yaw axis passes
through the shortest dimension.

Turning the mattress by 180 degrees around any one of these three axes is a symmetry operation: If you start with the mattress properly installed on the bed and then apply one of these actions, you return to another state where the mattress fits the bed frame correctly. Assuming that the various surfaces of the mattress are not labeled in any way, the states before and after the symmetry operation are indistinguishable. Note that no rotation through an angle smaller than a half turn has this property; despite the advice of Phyl's Furniture Facts, a quarter turn around any axis leaves the mattress in a decidedly awkward position. And for a mattress that has the usual, rectangular, shape (technically, it's called an orthotope), there are no other symmetry axes. If you were to try making a half turn around one of the diagonals, you'd be left with a very catterwumpus bed.

A mattress has two sides suitable for sleeping on, and each of those sides has two possible orientations—with one end or the other toward the headboard. Thus there are four configurations overall. A golden rule of mattress flipping would be an operation that, when applied repeatedly, would cycle through all four configurations and then return to the original state. It's easy to see that none of the three basic symmetry operations, taken alone, accomplishes this trick. If you always flip the mattress end-over-end (that is, around the pitch axis), you alternate between just two of the four states and never reach the other two. Repeated roll turns or yaw turns also visit just two of the states (although not the same pairs of states). Hence any golden rule would have to involve some combination of motions—maybe a roll followed by a pitch followed by a roll the other way and then a yaw, or some such intricate dance move.

EMAIL TO A FRIEND :

**Of Possible Interest**

**Feature Article**: The Statistical Crisis in Science

**Computing Science**: Clarity in Climate Modeling

**Technologue**: Weighing the Kilogram