The app Sort Puzzle deals a new puzzle every time you play. So how many starting puzzles are there in all? Let’s count by calculation.
★1 Has 63,063,000 Deals
★1 is a puzzle where 16 pieces, 4 colors with 4 pieces each, are packed 4 to a tube into 4 tubes.
If you think of lining up the 16 pieces from the bottom of the leftmost tube onward, the number of arrangements is the number of ways to arrange 16 pieces, divided by the number of swaps among pieces of the same color.
16! ÷ (4! × 4! × 4! × 4!) = 20,922,789,888,000 ÷ 331,776 = 63,063,000 ways
(16! is 16×15×…×1, and 4! is 4×3×2×1=24.)
On top of that, the app picks 4 colors out of 10, so there are 210 ways to choose the colors. If you tell the colors apart too, that is 63,063,000 × 210 = 13,243,230,000 ways.
Counts for Each Difficulty
If you leave out the choice of colors and compare only the number of ways to arrange them, the number grows very quickly as colors are added.
| Difficulty | Ways to arrange the colors | Share of fair deals |
|---|---|---|
| ★1 (4 colors) | about 63.06 million | 80.42% |
| ★2 (6 colors) | about 3.2×10¹⁸ | 87.07% |
| ★3 (8 colors) | about 2.4×10²⁴ | 90.36% |
| ★4 (10 colors) | about 1.3×10³⁴ | 92.33% |
| ★5 (9 colors) | about 1.4×10³² | 91.46% |
10¹⁸ is a 1 followed by 18 zeros (one quintillion). The ★4 number is about 1.3 times a 1 followed by 34 zeros.
About 80 to 90 Percent of Deals Are Fair
The app doesn’t use deals that have a tube with a run of three or more of one color (a tube that is mostly sorted from the start is boring). The “share of fair deals” in the table is the share of deals with no such tube. I counted exactly, using a method that counts the colors tube by tube in order.
For ★1, 50,717,088 of the 63,063,000 deals (80.42%) are fair. The more colors there are, the lower the chance of a run of one color, so the fair share goes up.
All Deals of ★1 Size Are Solvable
I checked every fair ★1 deal to see whether it can be solved. If you count deals that differ only by the order of the tubes, or only by the colors being repainted, as the same, there are 89,675 kinds.
I added two spare tubes to each of these 89,675 kinds and tried every move one by one, and every one was solvable. All 111,383 kinds, including the unfair deals (those with a tube holding a run of three or more of one color), were solvable too.
In other words, with 4 colors and two spare tubes, any deal can always be solved. The app never has to throw away an “unsolvable deal” in ★1.
I can’t check ★2 to ★4 exhaustively because they have more colors, but in the 400 to 500 deals I checked for each, every one was solvable. On the other hand, in ★5, with one spare tube, most deals can’t be solved (see How Solvable Puzzles Are Made).
