Superpermutation Almanac

Back to n = 12

W-0136

A superpermutation on 12 symbols, found by Tholsh. It beat the previous record W-0128 by 3 letters and was the record on Nov 22, 2026. The next record W-0137 beat it by 211 letters.

Length
522,736,406
Repeated permutations
177,523
Received
Nov 22, 202601:45:34 UTC
Points earned
2.0555 × 10−4
Begins 0123456789AB0123456789A0B123456789A01B23456789A012B3456789A0123B456789A01234B56789A012345B6789A0123456B789A01234567B89A0…

Windows

522,736,395windows of 12 consecutive letters
=479,001,600distinct permutations
+177,523repeated permutations
+43,557,272windows that are not permutations

Detours by weight

A step is the move from one permutation in the superpermutation to the next permutation in it, and its weight is the number of letters added in that move. A detour starts at a step that differs from the next step of the recursive construction, and ends at the first permutation after that whose next step has weight 1. The weight of a detour is the number of letters added in it. After each detour, we consider the recursive construction to begin again from scratch at the permutation where the detour ends.

WeightDetours
11
233
31,065,148
4304
5274
61,095
766
841
996
1030
1111
122

How it was found

From the submitter

A superpermutation of length 522,736,406 on 12 symbols

Found with the help of ChatGPT

We improve the 522,736,409-letter benchmark from Halfar's E selection by three letters, using Pantone's completion construction with a modified native selection. We optimize selection, monodromy, opening phase and placement jointly, rather than minimize charge before arrangement.

Finding the selection

For 12 symbols, the native selection occupies 9! = 362,880 cyclic classes on ten symbols. Each active row has a visible grade v and contributes charge 10-v. Completing the selection produces closed trails through the required permutations. Writing F3 = 12! + 11! + 10! = 522,547,200, the literal length is F3 + Q + J, where Q is the native charge and J is the net cost of opening and joining the completed trails. A selection with lower Q need not yield a shorter word: many independent trails can impose incompatible overlaps.

We lift the fiber construction used at n=11 into 504-class packets at n=12. The small packets are screened using charge, closed-walk monodromy and a global Kraft-trie model of compatible boundary overlaps. The trie prices help reject false winners whose apparent charge advantage disappears during completion. This is a restricted screening model, not a proof of the unrestricted optimum. Candidate selections are completed and assessed using literal overlaps.

E contains 48 independently closed residual fibers and an interconnected core spanning 672 fibers. The independent fibers admit occupation-preserving alphabet relabelings, but the core cannot be changed one fiber at a time without breaking closure. We therefore treat complete closed-walk footprints and groups of interacting walks as compound fibers. Balanced successor exchanges preserve the occupied cyclic classes while changing how the row walks close and how their ports compose under completion.

The first successful core selection has charge 182,632 and 2,904 completed trails. We then examine 1,306 balanced exchange alternatives. Two compound replacements, each involving five original closed walks, change 28 row assignments in total. They add 80 units of charge but remove 72 completed trails. When evaluated against the actual arrangement, their joint placement and opening phases reduce the length from 522,736,550 to 522,736,530. The final selection has Q = 182,712 and 2,832 trails, of which 2,352 are rowless and 480 are active.

Arranging the completed trails

For each trail we retain a library of legal opening phases, including cuts at steps of weights 3, 2 and 1. A state s determines the opened word W(s), its extra cyclic overhang, and its incoming and outgoing literal keys. For a fixed order, a min-plus dynamic program computes the exact optimum over the enumerated states:

D_i(s) = |W_i(s)| + min_t [D_(i-1)(t) - overlap(W_(i-1)(t), W_i(s))].

Prefix/suffix indexes replace the quadratic comparison of every pair of cut states. The indexes support overlaps through 15 symbols, although the useful matches depend on the actual word. The outer search changes the order; each move is evaluated with phase choices reopened around its affected boundaries. Several separated cuts divide the path into segments. We construct a phase-aware connection-cost matrix, solve an assignment on these segments and patch subtours to obtain one connected path. Directed three-edge moves, four-edge exchanges and bounded searches over longer alternating successor cycles improve the patched assignment. Forced kicks disrupt existing connections, and temporary increases in length permit escape from local minima. We also test multiple-path intermediates and alternate path endpoints before rejoining.

SPRA provides a compact representation of the word and accelerates repeated construction and inspection. A repeat audit identifies redundant permutation windows inside trails and enables additional legal opening states. The final arrangement passes 522,736,495, 479, 472, 467, 443 and 423, then ties 409 before a last reconnection reaches 406.

Where the three letters come from

Relative to E (Q = 182,112, J = 7,097, 3,648 completed trails), the modified selection spends 600 extra letters in native charge but saves 603 letters in cuts and joins. It eliminates 816 completed trails. Thus the final literal length is

522,547,200 + 182,712 + 6,494 = 522,736,406.

An independent literal scan finds all 479,001,600 distinct permutations in 479,179,123 clean windows, with zero missing and 177,523 repeated occurrences. The SPRA archive decodes to the identical literal word.

This is a computational improvement within Pantone's construction, building on Halfar's E selection, generalized row grades and trail arrangement techniques. The result is an upper bound, not a claim of optimality. AI-assisted exploration, implementation and search are used throughout.

Download

Learn about the Detour file format

Download Detour (.detour) 42.0 kB, or 522.7 MB decoded