Interactives

Cards and Math

Discover mathematical principles and probability theory through card games and interactive demonstrations.

Baby Hummer

Four cards, a few cuts and turns, and the card you noted ends up facing the other way from the rest. Try it, then see why parity makes it unavoidable.

cards magic trick

Cut and Turn Over

Ten cards, cut anywhere, turn the top two over, repeat. Watch an invariant hold, then fold the packet and find exactly five face up every time.

cards magic parity

CATO Target Puzzle

Reach a target arrangement of face-up and face-down cards using only cuts and turn-over-two moves. Some targets are impossible: can you tell which?

cards puzzle parity

Royal Flush Hummer

Ten high cards, paired and folded by a volunteer, and only the royal flush ends face up. See the odd/even bookkeeping that makes it work.

cards magic trick

de Bruijn Torus

Slide a 2×2 window around a 4×4 grid of bits that wraps at the edges. Every position shows a different pattern: the idea behind position-coding in robotics.

de-bruijn torus grid

Cross Window Puzzle

Can a 4×4 grid give every cell a unique cross-shaped neighbourhood? Hunt for two matching crosses, or colour your own grid and watch the collision appear.

de-bruijn puzzle grid

de Bruijn Comb

A comb exposes four of eight positions as it slides along a 16-bit cycle. Watch all sixteen four-bit reads come out distinct.

de-bruijn comb binary

DNA and the de Bruijn Graph

Type a DNA string, see which triplets light up on the sequencing array, and watch an Euler path through the de Bruijn graph read the sequence back.

de-bruijn graph dna

Middle Layer Graph

Explore the graph of r-sets and (r+1)-sets of a (2r+1)-element set, joined by containment: the setting of the middle levels conjecture.

graph hypercube subsets

Order Matters

Cut a 48-card stack as often as you like, deal three, and once the spectators line up low to high the performer names all three cards. A de Bruijn cycle of colours and orders.

cards magic trick

Partitioning People

Five spectators take five cards and group themselves by suit. Every possible grouping appears exactly once in the cycle, so the performer knows where the deck was cut.

cards magic trick

Lie Detector

Riffle-shuffle a red-black deck and a performer still knows which colour you are lying about. The Gilbreath principle, played out card by card.

cards magic trick

A Mind-Reading Effect

Twenty-five cards, one riffle shuffle and two deals into five piles, and the arrangement survives. A Gilbreath effect you can step through.

cards magic trick

The Gilbreath Principle

Deal off some cards, riffle them back into the rest, and see which properties of the original order survive the shuffle: all four parts of the theorem, live.

cards gilbreath riffle-shuffle

The Packet as a Computer

Deal a twelve-card packet into any number of piles, shuffle in a few fixed ways, cut anywhere: the packet still computes your card.

cards magic trick

Perfect Shuffles

In-shuffles and out-shuffles on twenty cards, one at a time. Follow a card, count the cycle, and see why eight out-shuffles restore a full deck.

cards shuffle perfect-shuffle

Monge and Milk Shuffles

Over-and-under versus top-and-bottom: two classic shuffles that undo each other, animated card by card on a twenty-card deck.

cards shuffle monge