This is part of live presentation series called Mathematical Games in which we explore a variety of games and puzzles using Wolfram Language. In this episode, we explore the mathematical games and puzzles involving cards.
demonstrations.wolfram.com
demonstrations.wolfram.com
Many Demonstrations involve cards
Haberdasher Problem solved! (after 122 years)
Haberdasher Problem solved! (after 122 years)
Dudeney’s Dissection is Optimal https://arxiv.org/abs/2412.03865 (5 Dec 2024)
Erik D. Demaine, Tonan Kamata, Ryuhei Uehara
Erik D. Demaine, Tonan Kamata, Ryuhei Uehara
Sofa Problem solved?
Sofa Problem solved?
A new paper by Zhipeng Deng based on his Community post claims the Gerver Sofa is optimal for the biggest couch that can move around a corner.
Cards and related items in Gardner’s books.
Cards and related items in Gardner’s books.
One of few topics covered by Gardner in each of his fifteen books
1. Card tricks, Polyominoes, the Binary system
2. Eleusis, the induction game
3. The 24-color Squares
4. Scarne on Gambling
5. The Ternary system, Polyiamonds, Combinatorial Theory
6. Card Shuffles
7. Playing cards, polyhexes, polyominoes, Colored Triangles
8. Dominoes
9. Sparse Rulers, Gambling.
10. Mathematical tricks with cards, Nim, Graceful graphs
11. The binary Gray code, I-ching
12. Combinatorial card problems, tangrams, Tiling with polyforms, Catalan numbers
13. The New Eleusis
14. The 30 Color Cubes
15. Dinner guests, School girls and Handcuffed Prisoners.
2. Eleusis, the induction game
3. The 24-color Squares
4. Scarne on Gambling
5. The Ternary system, Polyiamonds, Combinatorial Theory
6. Card Shuffles
7. Playing cards, polyhexes, polyominoes, Colored Triangles
8. Dominoes
9. Sparse Rulers, Gambling.
10. Mathematical tricks with cards, Nim, Graceful graphs
11. The binary Gray code, I-ching
12. Combinatorial card problems, tangrams, Tiling with polyforms, Catalan numbers
13. The New Eleusis
14. The 30 Color Cubes
15. Dinner guests, School girls and Handcuffed Prisoners.
A Normal Deck of Playing Cards or Rummikub tiles
A Normal Deck of Playing Cards or Rummikub tiles
The standard deck of cards is basically a 4×13 rectangle, tweakable in many ways, usually by adding wild cards or stripping out values.
In[]:=
StyleGridSortBy[Sort[#],StringReverse[#]&]&/@PartitionRandomSampleStringJoin/@TuplesInsert[Characters["23456789JQKA"],"10",9],"♣","♦","♥","♠",13,30
Out[]=
2♥ | 3♥ | 4♥ | 6♥ | 8♦ | A♦ | Q♦ | 10♣ | 6♣ | 4♠ | 8♠ | 9♠ | Q♠ |
10♥ | 2♦ | 5♥ | 6♦ | 7♦ | 8♥ | 4♣ | 7♣ | A♣ | 6♠ | 7♠ | J♠ | K♠ |
3♦ | A♥ | J♥ | K♥ | K♦ | 2♣ | 3♣ | K♣ | Q♣ | 10♠ | 2♠ | 3♠ | A♠ |
10♦ | 4♦ | 5♦ | 7♥ | 9♥ | 9♦ | J♦ | Q♥ | 5♣ | 8♣ | 9♣ | J♣ | 5♠ |
Many games, such as Solitaire for Two, Trumpet, Sextet, Links and Empire introduce new suits:
In[]:=
StyleGridSortBy[Sort[#],StringReverse[#]&]&/@PartitionRandomSampleStringJoin/@TuplesInsert[Characters["23456789JQKA"],"10",9],"♣","♦","♥","♠","⚓","☸",13,30
Out[]=
4♥ | 4♦ | 6♥ | 7♥ | A♥ | Q♥ | 5☸ | J☸ | K⚓ | 5♣ | K♣ | 4♠ | A♠ |
5♥ | J♦ | 2☸ | 2⚓ | 6☸ | 7⚓ | 9☸ | 10♣ | 4♣ | 7♣ | 10♠ | 5♠ | 7♠ |
5♦ | 8♦ | 9♥ | 9♦ | 3☸ | 3⚓ | 9⚓ | A⚓ | Q⚓ | J♣ | 3♠ | 8♠ | K♠ |
2♦ | 3♥ | 3♦ | 7♦ | A♦ | J♥ | 10☸ | 10⚓ | 4⚓ | 8⚓ | A☸ | 2♣ | 8♣ |
2♥ | 8♥ | K♦ | Q♦ | 7☸ | 8☸ | J⚓ | K☸ | Q☸ | 6♣ | 9♣ | 6♠ | 9♠ |
10♥ | 10♦ | 6♦ | K♥ | 4☸ | 5⚓ | 6⚓ | 3♣ | A♣ | Q♣ | 2♠ | J♠ | Q♠ |
The tiles of Rummikub are basically the same as playing cards.
In[]:=
Grid[Partition[RandomSample[Flatten[Table[Framed[Style[ToString[j],{Blue,Red,Darker[Yellow],Black}[[k]],24,Bold],ImageSize->{36,28},Alignment->Center],{j,1,13},{k,1,4}]]],13]]
Out[]=
Gardner discusses many card games.
Dominoes
Dominoes
Gardner: “a standard set of dominoes consists of 28 oblong black: tiles, each divided into two squares that are either blank or
marked with white spots. No two tiles are alike, and together they represent the 28 possible ways in which numbers from 0 to 6 can
be combined two at a time. The tiles can be regarded as line segments that are placed end to end to form linear chains; in this
sense all domino games are strictly one-dimensional. When the domino concept is extended to two- and three-dimensional pieces,
all sorts of colorful and little-known recreations arise.”
marked with white spots. No two tiles are alike, and together they represent the 28 possible ways in which numbers from 0 to 6 can
be combined two at a time. The tiles can be regarded as line segments that are placed end to end to form linear chains; in this
sense all domino games are strictly one-dimensional. When the domino concept is extended to two- and three-dimensional pieces,
all sorts of colorful and little-known recreations arise.”
The number of dominoes is a triangular number.
For some reason, sets mostly end at 6, 9, 12, 15 or 18.
For some reason, sets mostly end at 6, 9, 12, 15 or 18.
You can also get rid of doubles and the 0 tiles.
Double-7 would be an interesting set, especially on a split square, with 36 tiles.
Similarly, double 14 would be a nice set. With double 7 or 1-8 you can make a Room square.
The below grid was used by Cayley to solve the Kirkman Schoolgirl’s problem:
Similarly, double 14 would be a nice set. With double 7 or 1-8 you can make a Room square.
The below grid was used by Cayley to solve the Kirkman Schoolgirl’s problem:
In addition to pips and numbers, binary can be used, as seen in Double-seven binary-coding Hexdominoes.
A Domino Puzzle
A Domino Puzzle
A classic logic puzzle involves delineating a set of dominoes that has been arranged within a grid. Here, a grid is given on the left, and the full set of double-5 dominoes is given in a triangular array on the right. As lines between squares are clicked, dominoes in the triangular array will turn black when they are represented once, and red when they are represented more than once. Goal: turn all the dominoes in the triangular array black.
What is the right number of cards?
What is the right number of cards?
According to some sites, Magic the Gathering now has 99799 different cards, each with rules.
As a general rule, I aim for 21 to 121 cards. For shuffling, 40 to 70 cards is best.
It’s sometimes convenient to hit “nice” numbers.
Many purists prefer a “complete set”. If the game it based on square numbers to 36 ... then it should have all of those numbers.
Also, it helps if the cards are “fair”, where each card can have equal power. But ranking is also good.
Also, it helps if the cards are “fair”, where each card can have equal power. But ranking is also good.
Square
Square
Factorial
Factorial
Triangular
Triangular
Centered Hexagonal
Centered Hexagonal
5-smooth
5-smooth
Is there a Modulus based game?
Is there a Modulus based game?
Here’s a simple idea I haven’t seen in a game, but I could have missed it.
The 24 colored squares and 24 colored triangles
The 24 colored squares and 24 colored triangles
Gardner: “When the domino concept is extended to two- and three-dimensional pieces,
all sorts of colorful and little-known recreations arise. Percy Alexander MacMahon, a British authority on combinatorial analysis,
devoted considerable thought to these superdominoes, and it is from his book New Mathematical Pastimes, published in
1921, that much of the following material is taken. ”
all sorts of colorful and little-known recreations arise. Percy Alexander MacMahon, a British authority on combinatorial analysis,
devoted considerable thought to these superdominoes, and it is from his book New Mathematical Pastimes, published in
1921, that much of the following material is taken. ”
Three colors produce a set of 11 distinct triangles and four colors the set of 24 triangles shown in Figure 108. To work
with such a set, cut from cardboard, it is convenient to divide each triangle into three identical triangular parts as shown and
then color each part, using four contrasting colors for the four differently labeled regions. Because triangles are not to be
turned over (the set includes mirror-image pairs), only one side of the cardboard should be colored.
with such a set, cut from cardboard, it is convenient to divide each triangle into three identical triangular parts as shown and
then color each part, using four contrasting colors for the four differently labeled regions. Because triangles are not to be
turned over (the set includes mirror-image pairs), only one side of the cardboard should be colored.
Kadon Enterprises sells variations of these:
We can create the counts for coloring the squares.
We can create the counts for coloring the triangles. Also sold as Triominoes.
We can create the counts for coloring hexagons.
The 30 Color Cubes
The 30 Color Cubes
Color dominoes obviously generalize to solids of three or more dimensions. If each of the n faces of a regular solid is
given one of n colors, in how many different ways (not counting rotations but including reflections) can the solid be n-colored?
The answer is given by the simple formula F!/2E, where F is the number of faces and E is the number of edges.
Of the five Platonic solids, only the cube tiles space, and so it is natural that MacMahon chose to explore sets of “color
cubes” and their domino-tiling properties. A cube has six faces and 12 edges. Plugging these values into the formula gives 6!/
24, or 30. Thus there are just 30 ways to color a cube with six colors so that all six appear on each cube, with each face
a single color. Such a set is known as the 30 color cubes, and MacMahon was the first to investigate its properties.
given one of n colors, in how many different ways (not counting rotations but including reflections) can the solid be n-colored?
The answer is given by the simple formula F!/2E, where F is the number of faces and E is the number of edges.
Of the five Platonic solids, only the cube tiles space, and so it is natural that MacMahon chose to explore sets of “color
cubes” and their domino-tiling properties. A cube has six faces and 12 edges. Plugging these values into the formula gives 6!/
24, or 30. Thus there are just 30 ways to color a cube with six colors so that all six appear on each cube, with each face
a single color. Such a set is known as the 30 color cubes, and MacMahon was the first to investigate its properties.
How many ways to number each die?
How many ways to number each die?
Binary
Binary
Gardner-
“We are now ready to understand why Leibniz, who thought he had invented
the binary system in the late 17th century, was so staggered when he first
learned of the Fu Hsi sequence from Father Joachim Bouvet, a Jesuit missionary
in China. Substitute 0 for each unbroken line, 1 for each broken line, then take
the hexagrams in order, reading upward on each, and you get the sequence
000000, 000001, 000010, 00001 1, . . . , 11 11 11. It is none other than the
counting numbers from O through 63 expressed in binary notation! ”
“We are now ready to understand why Leibniz, who thought he had invented
the binary system in the late 17th century, was so staggered when he first
learned of the Fu Hsi sequence from Father Joachim Bouvet, a Jesuit missionary
in China. Substitute 0 for each unbroken line, 1 for each broken line, then take
the hexagrams in order, reading upward on each, and you get the sequence
000000, 000001, 000010, 00001 1, . . . , 11 11 11. It is none other than the
counting numbers from O through 63 expressed in binary notation! ”
The game Chekit uses hexagonal tiles for binary 0-63.
A Projective Set card has six binary attributes, or bits, generally represented by colored dots.
For each color of dot, each card either has that dot or does not.
There is one card for each possible combination of dots except the combination of no dots at all, making 63 cards total.
For each color of dot, each card either has that dot or does not.
There is one card for each possible combination of dots except the combination of no dots at all, making 63 cards total.
Binary XOR
Binary XOR
You are given a random collection of nine cards with up to six black squares in each.
Can you pick three to seven cards so that the total number of black squares in each of the six positions is even?
This is equivalent to finding a set of numbers whose bitwise XOR equals 0.
Even if just seven cards are laid down, there is always a solution.
Can you pick three to seven cards so that the total number of black squares in each of the six positions is even?
This is equivalent to finding a set of numbers whose bitwise XOR equals 0.
Even if just seven cards are laid down, there is always a solution.
Permutations (Flix Mix)
Permutations (Flix Mix)
At least two color dots must overlap. The actual game doesn’t use a complete set.
Might be better on hexagons
In a more colorful form. This could also be done as six triangles in each hexagon.
Scrabble and Anagrams
Scrabble and Anagrams
Scrabble tiles work like cards:
Anagrams, Bananagrams and many other letter-based games are even more like cards, since there isn’t a board:
A variant like the International phonetic alphabet is usually too tricky due to lack of usage.
Myself, I don’t know how to spell “International phonetic alphabet” phonetically.
Myself, I don’t know how to spell “International phonetic alphabet” phonetically.
The Set of Sets in SET
The Set of Sets in SET
Spot-it
Spot-it
Given two cards, each with 8 symbols, find two matching symbols:
This game is not a complete set! It’s sold with 55 cards, meaning 2 cards are missing.
The Springer Difference Set, Ganymede circle or n-switch
The Springer Difference Set, Ganymede circle or n-switch
The game of Spot-it uses a Springer difference set:
As a difference set, all possible differences are given by the set:
Any two cards of the 57 card set share a number:
Any two cards of the 73 card set share a number:
Any two cards of the 133 card set share a number:
Any two cards of the 381 card set share a number:
Difference Sets in Configurations
Difference Sets in Configurations
The {0,1,4,14,16}_21 difference set in circles and lines. All pairs of points 0-20 are connected by a circle or line.
The {0,1,3,9}_13 difference set as a configuration of parabolas
The {0,1,3,9}_13 difference set as a configuration of parabolas
Catalan Numbers
Catalan Numbers
“It was Leonhard Euler who first discovered the Catalan numbers after
asking himself: In how many ways can a fixed convex polygon be divided into
triangles by drawing diagonals that do not intersect?” -- Gardner
asking himself: In how many ways can a fixed convex polygon be divided into
triangles by drawing diagonals that do not intersect?” -- Gardner
There are 2 triangulations for a square, 5 for a pentagon, 14 for a hexagon, 42 for a heptagon, and 132 for an octagon.
The numbers 2, 5, 14, 42, 132,..., are the Catalan numbers.
The numbers 2, 5, 14, 42, 132,..., are the Catalan numbers.
How many distinct triangulations with rotations excluded? A001683 1, 1, 1, 1, 4, 6, 19, 49, 150, 442
The 49 triangulations of the nonagon might be an interesting card set:
A self-dual configuration
A self-dual configuration
In this set of 51 cards, every triple has a dot product of zero with exactly four other triples. Every point is a line, every line is a point.
The Klein Configuration
The Klein Configuration
In an abstract projective space, there are 60 points and 60 planes such that 15 points are on each plane and 15 planes go through each point. The configuration is built from what Klein called the 15 fundamental tetrahedra, which define 60 distinct planes. An abstract presentation is here.
The following can be considered the points OR planes.
Each point is on 15 planes, and vice-versa:
Which pairs have a dot product of zero?
Magic Sets
Magic Sets
You can arrange 1-19 in a hexagon so that all directions add to 38. The answer is unique.
You can also arrange coins with -8 to 8 so that every triple summing to 0 is on a line.
In the above set, the 0 is most powerful, since it is in the most triples.
Adding Modulus X, for any X>8, would make the numbers fair.
Adding Modulus X, for any X>8, would make the numbers fair.
Krypto and the 24 game
Krypto and the 24 game
The Krypto deck consists of 56 cards: three of each of the numbers 1-6, four each of the numbers 7-10, two each of 11-17, one each of 18-25.
Four or five cards are selected and people must match the goal card with all cards and basic arithmetic.
For example, given 2,6,9,26 reach a goal of 3.
Four or five cards are selected and people must match the goal card with all cards and basic arithmetic.
For example, given 2,6,9,26 reach a goal of 3.
For 3, 4, 5 and 6 numbers there are 68, 1170, 27142 and 793002 inequivalent expressions using basic operands.
Here are ten hard examples for hitting values 1 to 10. Each solution is unique.
Some difficult cases:
It’s easy to get numbered cards or tags in a variety of forms. Or just use index cards.
Hoffman-Singleton Game
Hoffman-Singleton Game
Here’s a game I put together based on my favorite graph:
There are 35 triples from 1-7.
Let’s arrange the 35 ways to pick 4 triples using only 5 numbers so that each set is on a unit circle:
Here’s a Fano plane:
There are thirty distinct Fano planes:
These divide into two sets of 15 so that any pair of Fano planes shares exactly one triple:
Two triples are linked if they share no values. A triple on a Fano plane is linked to that plane.
Every triple is on exactly four Fano planes. Every card connects to seven other cards.
Any two non-connected cards share a connection with exactly one card.
Every triple is on exactly four Fano planes. Every card connects to seven other cards.
Any two non-connected cards share a connection with exactly one card.
Smallest Projective Space
Smallest Projective Space
The 35 triples of the smallest projective space all have an XOR sum of zero
Find the fifteen projective Fano planes. One of them is 1 to 7.
The 49 8-dot patterns
The 49 8-dot patterns
A complete set of 8-dot patterns. Rotations and Reflections are excluded. Proper subsets only, so All and Nothing are excluded.
This is an easy set to make and I know many that have done so. I made my set with index cards and a hole punch.
Kaliko Octiles and Tantrix
Kaliko Octiles and Tantrix
Kaliko uses 3 colors, which may be reused on the 85 tiles.
Tantrix uses 4 colors, which may not be reused on the 56 tiles.
Tantrix uses 4 colors, which may not be reused on the 56 tiles.
We can also look at paths on dominos, leading to 48 cards. Roger Phillips and Donald Knuth made a closed loop out of them.
Blokus, Blokus Trigon and Polyforms
Blokus, Blokus Trigon and Polyforms
Polyforms can be used as card-like pieces.
The 66 octiamonds. I still have a few sets.
The 108 heptominoes would be a nice 12-color set:
A moment of Venn
A moment of Venn
The 32 regions of Venn-5 could be an interesting set.
Done another way:
Blocks
Blocks
Here’s a nice set of blocks for a game, none too large or small. Remove the 1×3×5 block and they all pack into a 6×6×6 box.
The packing into a box is unique. One game is to split the box, then take turns placing a piece.
Cards of two sizes
Cards of two sizes
The Ammann chair could make some crazy matching games.
Clebsch and other subsets
Clebsch and other subsets
The 40 cycles of the Clebsch graph. The edges of K16 split into three Clebsch graphs.
Use three colors. But I’m not sure these would be a good set:
Use three colors. But I’m not sure these would be a good set:
The 56 pieces of 8.
The 70 subsets of 8.
The 84 9-triples
The 57-Cell
The 57-Cell
A cube is made from squares. A tesseract is made from cubes. The four-dimensional 57-cell is made from 57 hemi-dodecahedra, Coxeter’s name for a Petersen graph with six faces. The skeleton of this polytope is the Perkel graph. The top set of sliders changes the symmetrical embedding for the underlying graph. The cells can overlap (in green) with zero, one, or five edges (a face). Each cell shares a face with six other cells.
Game recommendation
Game recommendation
So, after all that, any recommendations?
1. A normal deck of cards
1. A normal deck of cards
2. A set of double-9 domino cards (or tiles)
2. A set of double-9 domino cards (or tiles)
3. Tantrix (hex-paths) and Blokus (polyomino tiles)
3. Tantrix (hex-paths) and Blokus (polyomino tiles)
4. A set of number cards
4. A set of number cards
But if anything intrigued you, feel free to pursue those games.
Unsolved: Is there a great new mathematical card game?
Unsolved: Is there a great new mathematical card game?
I’m thinking that will be hard, because of the next question:
Gambling: Can any casino adopt dice that aren’t cubes?
Gambling: Can any casino adopt dice that aren’t cubes?
Games To Make?
Games To Make?
I haven’t printed any new games since the Hoffman-Singleton game.
But if I did, it might be these:
But if I did, it might be these:
1. The 48 Domino Path cards
1. The 48 Domino Path cards
2. The 49 8-punched square tiles
2. The 49 8-punched square tiles
3. A set of 32 Venn-5 cards
3. A set of 32 Venn-5 cards
4. The 50 or 65 cards of a Smallest Projective Space set
4. The 50 or 65 cards of a Smallest Projective Space set
Just the -9 to 9 in three colors or three suits is a great set of cards.
This would be good for Modulus games of many sorts.
I’d probably downplay the more incredible mathematics, but I’d still include it.
This would be good for Modulus games of many sorts.
I’d probably downplay the more incredible mathematics, but I’d still include it.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Mathematical Games - diving into cards: set, dominoes, spot-it, scrabble & more
by Ed Pegg
Wolfram Community, STAFF PICKS, December 20, 2024
https://community.wolfram.com/groups/-/m/t/3342611
by Ed Pegg
Wolfram Community, STAFF PICKS, December 20, 2024
https://community.wolfram.com/groups/-/m/t/3342611