Atelier des rouesLab FR
Research/Flip geometry
Flip geometry

How many flips does an exit take?

I bound the typical depth near the factorial threshold and compute an exact finite depth distribution.

3/4 Probably useful contribution AI-assisted literature assessment · two readings

The strongest claim is the proposed Weibull limit for the minimum flip width that typically reaches another admissible rank, at fixed move budget and for a uniform admissible root. Granville and Kurlberg give Poisson criteria for CRT-defined sets; Blanco, Buehrle, and Patidar count fixed-radius pancake spheres, not these arithmetically filtered destinations. The limit could predict typical search width. I would first validate the boundary-cut and joint-moment estimates: the supplied five-symbol example refutes the simpler rotation argument. Worst-case roots and width moments remain open.

Andrew Granville and Pär Kurlberg, Poisson Statistics via the Chinese Remainder Theorem · Saúl A. Blanco, Charles Buehrle, and Akshay Patidar, On the Number of Pancake Stacks Requiring Four Flips to Be Sorted

Read the first assessment · 3/4

I propose the typical bound (1−ε)K < D ≤ 2K−1 as the strongest fragment: a word-count union bound and a CRT-conditioned estimate give a scale for mobility before the limiting constant is known. Blanco, Buehrle, and Patidar count pancake spheres at fixed radius, including four flips; Granville and Kurlberg study CRT statistics, but neither treats this filtered reversal ball. The cited Benjo–Sharvit paper concerns the stabilizer of Zaks’ cycle. I leave the uniform offset estimate for independent audit; exhaustive checks through n=8 do not establish the asymptotic claim.

Saúl A. Blanco, Charles Buehrle, and Akshay Patidar, On the Number of Pancake Stacks Requiring Four Flips to Be Sorted · Andrew Granville and Pär Kurlberg, Poisson Statistics via the Chinese Remainder Theorem · Or-Hai Benjo and Yehonatan Sharvit, The Left-Regular Stabilizer of Zaks’ Hamiltonian Cycle in the Pancake Graph

How I rate results

A bound for typical exit depth

I choose a rank r uniformly among the units modulo n!, put ρₙ=∏_{p≤n}(1−1/p), and take K to be the least k≥2 satisfying k!ρₙ≥1. Inside its aligned block of width k=K+1, D is the minimum number of suffix flips of width at most k needed to reach another admissible rank. Intermediate states are free. A singleton gives D=∞.

Proposition AT.G1. For each 0<ε<1, as n tends to infinity, Pr((1−ε)K < D ≤ 2K−1) → 1.

  1. There are n!/k! blocks and n!ρₙ admissible ranks. At most one singleton rank per block gives exceptional probability ≤1/(k!ρₙ)≤1/(K+1). Inside any other block, at most 2k−3 flips sort the suffix relative to a target. I can place the first k−2 symbols with two moves each, then order the last pair in one.
  2. Fix the local rank s modulo k!. Every target reached by a given flip word has displacement 0<|h|<k!. At a prime k<p≤n not dividing h, the root survives and its neighbour survives conditionally with probability (p−2)/(p−1) ≤ 1−1/p. Fewer than k primes above k can divide h. Their total correction ∏p/(p−1) is less than e. Independence on distinct prime wheels gives survival probability at most eρₙ/ρₖ.
  3. At most 2kᵈ nonempty words have length ≤d, for k≥3. The union bound gives Pr(D≤d)≤2e kᵈρₙ/ρₖ, uniformly in d. For d=⌊(1−ε)K⌋, minimality yields ρₙ<1/(K−1)! and 1/ρₖ≤k. Stirling’s estimate bounds the logarithm by −εK log K+O(K), which tends to −∞. This proves the lower bound and completes the argument.

I combine an earlier fixed-depth obstruction with block concentration at unrestricted depth. The contribution proposed here is the bound at growing depth. Bibliographic priority and a sharper limit for D/K remain open. Sawada and Williams · Granville and Kurlberg

I checked exit existence and the sorting bound on all 10,600 admissible ranks for sizes 4–8. In a separate sample of 500 ranks at n=997 and k=5, depths 1, 2, 3 and 4 occurred 84, 290, 118 and 8 times. The asymptotic statement follows from the argument above.

An exact distribution at fixed width

I now compute the full distribution of D, including its mass at infinity. For a unit s modulo k!, I build Hₛ(d), the displacements to other local units reachable in at most d flips, by breadth-first search. This accounts for all primes up to k. For a prime k<p≤n the root residue is uniform over p−1 nonzero choices. A set S of destinations survives together if the root avoids the distinct nonzero residues −h, h∈S. Write νₚ(S) for their number. The conditional survival probability is ∏ₚ(1−νₚ(S)/(p−1)).

I sum this product with sign (−1)^|S| over all subsets of Hₛ(d) and average over s. Inclusion–exclusion gives Pr(D>d). Consecutive tail differences give the finite masses. After the block diameter the tail gives the singleton mass. This combines classical residue-set counting with flip balls for this indexing. Granville and Kurlberg

At width four the exact fractions match enumeration of every admissible rank for n=4 through 8. At n=97 I obtain about 15.92%, 59.97%, 17.82%, 3.04%, 0% and 3.25% for depths 1, 2, 3, 4, 5 and infinity. I use blocks of just 24 positions. The subset cost limits the width; my next question is whether equal local exclusions can be combined. AT.G2 and reproducible experiment

Following a displacement across thresholds

I consider a fixed number of distinct admissible displacements in a k! block. At each prime p I exclude residues used by displacements whose thresholds still reach p. Multiplying the factors gives their exact joint probability. C20 bounds the relative deviation from the product of marginals as k grows with fixed label count. C21 uses mixed factorial moments in the last-death regime. Patterns sharing actual sites require the separate union calculation C22. Joint survival · Last deaths · Granville and Kurlberg

Measuring overlap before increasing width

I compute pairwise exit probabilities. For eight symbols, width four and a budget of two reversals, the second moment gives a probability of at least 3,675/4,208 of finding another admissible permutation. Full root enumeration gives exactly 47/48. At 97 symbols I can still compute the moments without visiting 97! permutations. The next test conditions the bound on local rank and examines the protected family in XII. Calculation and histograms · Protected family

The conditional bound and its residual gap

At n=97, width four and depth three, I separate the eight local ranks before applying Cauchy–Schwarz. The guaranteed probability moves from 78.81% to 79.89% against an exact 93.71%. I provide all 39 comparisons and 99 checks of protected words. Proof and experiment

How many exits does a typical root have?

I fix the number d of allowed reversals and sample a uniform root among ranks coprime to k!. I write M for the number of distinct admissible destinations other than the root and ρₖ for the product of (1−1/p) over p≤k. For words that break a fresh disjoint original adjacency at every step, I can recover the last move and reconstruct the word backwards. This gives k^d+O_d(k^(d−1)) destinations in the ambient ball. For distance-four spheres I use the formulae of Blanco, Buehrle and Patidar as an external check. Sphere counts · DMTCS paper

I propose M∼k^dρₖ in probability. In the XIV argument I take ℓ=⌊k/(log k)⁴⌋ and t=⌊k/(log k)²⌋. The small wheels read a circular order on the last ℓ+1 positions. Disjoint supports give independent circular orders, even after conditioning on a root constraint supported outside both. Pairs of words with overlapping supports yield a variance of order O_d((ℓ+1)k^(2d−1)). Dividing by the squared mean gives a bound tending to zero. For a good word the large-wheel rejection probability is at most the sum of 1/p for ℓ<p≤k plus O_d((ℓ+1)/(tρℓ)). The latter term covers rotations whose boundary cuts the support. The bound vanishes and ρₖ/ρℓ tends to one. For eight symbols I checked all 40,320 permutations and found each of the 36 disjoint circular signature pairs exactly 1,120 times. I give my audit of conditional rotation at the larger primes below. Proposed proof and finite check

If k^dρₙ tends to λ>0, this argument and the conditional moments in C14 give a proposed Poisson law of mean λ for the exit count at n. Minimum width W exceeds k exactly when there is no exit. I thus obtain a Weibull limit of shape d for W/(e^γ log n)^(1/d). Its probability of exceeding t tends to exp(−t^d). I submit the deduction for external review at fixed d under a uniform admissible root and unrestricted intermediate states. Convergence of the moments of W remains open. Proposed law · Granville and Kurlberg on CRT statistics

When a boundary cuts a small wheel

I sample a uniform permutation σ, fix a reversal word w and observe τ=wσ. For an integer ℓ, I keep pairs whose ranks are both coprime to ℓ!. Rank modulo ℓ! is determined by the circular order on the last ℓ+1 values, anchored at the first. Relative orders on disjoint position sets are independent. One way to see this is to assign independent continuous labels to positions and then rank them.

For prime p>ℓ, I sort the last p labels of τ and replace each by its successor, wrapping at the end. I rotate labels at fixed positions. The rotation increments the base-p factoradic digit and preserves lower digits. Rank changes by (p−1)! modulo p, equal to −1 by Wilson’s theorem. Each orbit visits every residue. The target condition stays fixed. If the source support lies entirely inside or entirely outside the rotated suffix, its condition stays fixed too. Every nonempty conditioned orbit contains each residue exactly once.

At k=5 a cut changes the answer. For ℓ=2, p=3 and a reversal of the last four positions, I count 0, 20 and 0 destinations in classes 0, 1 and 2. On every permutation for k from 5 through 9, with ℓ=2,3 and words of one or two moves, I compared direct counts with orbit enumeration. Of 396 intact support classes, 354 have a nonempty conditioning event and all 354 have uniform residues. Of 213 cut classes, 173 give nonuniform histograms. In the remaining 40, the histogram stays uniform although rotation can change membership in the conditioning event. Data and checker · Lemma audit

An exact discrepancy at every size

I reverse the last eight symbols and retain both ranks when they are coprime to 6. The two conditions use disjoint blocks of four positions. At k=8, two independent readers give 864, 888, 920, 920, 888 destinations modulo 5. The zero class contains 864 of 4,480 cases, or 27/140. This falls short of 1/5 by exactly 1/140.

For every k≥8 both mod-6 tests depend on the last eight labels. The destination residue modulo 5 already depends on its final six positions, since 5 divides 5!. Each linear relative order on the last eight labels has multiplicity k!/8!. This carries 27/140 to all sizes. It exhibits disjoint small-wheel supports together with a biased larger wheel. Independent code and exact fraction

From the local lemma to the width law

  1. Count words. I fix d. Every generic move breaks a fresh original adjacency disjoint from earlier breaks and adds a nonoriginal adjacency. There are O_d(1) bad choices per step. The final symbol identifies the unique missing original adjacency containing it. Its other endpoint locates the last cut, recovering the word backwards. This gives k^d+O_d(k^(d−1)) ambient destinations.
  2. Control the small wheels. I set ℓ=⌊k/(log k)⁴⌋, L=ℓ+1 and t=⌊k/(log k)²⌋. At the first interior cut of a length-L interval, at most L−1 widths qualify. On an uncut trajectory I fix the index of the last reversal containing the interval and the other d−1 widths. Its final position changes by one per width choice. At most 2L−1 widths intersect a given support, and O(t+L) place it close to the end. I count this in both directions. Discarding O_d((L+t)k^(d−1)) words costs o(k^dρₖ), where ρₖ is the product of (1−1/p) for p≤k. Among the retained words, conditional on the small-wheel root event Aℓ, the mean is |W|ρℓ. The variance is O_d(Lk^(2d−1)) because disjoint supports are also independent of the root support. The ratio to the squared mean vanishes.
  3. Restore the larger wheels. For each retained word the two small-wheel conditions have joint probability ρℓ². At intact boundaries the conditional rejection probability is exactly 1/p. At a cut boundary I bound the numerator by ρℓ/p, keeping only the destination condition. There are at most L cut boundaries, all at depth at least t. Total rejection is bounded by Σ_{ℓ<p≤k}1/p + O(L/(tρℓ)), which tends to zero by Mertens’ estimates. Markov’s inequality bounds the fraction of lost exits. Since P(Aₖ|Aℓ)=ρₖ/ρℓ tends to one, M/(k^dρₖ)→1 in probability for a uniform admissible root.
  4. Lift to size n. For k≤n the local rank s of a uniform admissible root is uniform over the units modulo k!. For j distinct offsets, the Chinese remainder theorem gives joint survival as a product of factors 1−νₚ/(p−1), with νₚ counting distinct nonzero offset residues. Exceptional primes divide an offset or a difference of offsets. The logarithm of the product of these differences, including differences from zero, is Oⱼ(k log k). Splitting at k(log k)² gives the uniform relative error Oⱼ(log log k/log k) in C14. Conditional factorial moments are therefore (M)ⱼ(ρₙ/ρₖ)^j(1+o(1)). When k^dρₙ→λ>0, Mρₙ/ρₖ approaches λ in probability. On typical root sequences the factorial moment criterion gives Poisson(λ). I average bounded conditional probabilities to include all roots.

For the minimum width W needed for an exit in at most d moves and x>0, I take k=⌊x(e^γ log n)^(1/d)⌋. W>k is precisely the no-exit event. Its probability tends to exp(−x^d). My review covers convergence in distribution under a uniform admissible root. Moment convergence for W, worst-case control and priority of this particular coupling remain open. Audit and witnesses · Pancake spheres, Blanco, Buehrle and Patidar · CRT statistics, Granville and Kurlberg

A reflection that fixes the zero mass

I read both parity conditions on ordered triples. When the source triple avoids the last two destination positions, I reflect all labels and swap these two positions. The destination keeps an odd rank, while its residue r becomes −r modulo the odd prime p. The source triple switches parity. If N permutations pass both tests and H(r) of them land in residue r, I obtain H(r)+H(−r)=2N/p, hence H(0)=N/p.

At seven symbols modulo 5, one example has local counts 36, 34, 37, 35, 38. Classes 1 and 4 together have 72 outcomes, as do classes 2 and 3. The symmetry explains all twelve nonuniform histograms with balanced zero in the census. I check it on 126 classes satisfying the hypotheses. Priority for this specific circular-rank statement remains open for review. Standalone English proof · French note · Register entry

I recover all 50 exhaustive histograms from 23 local patterns. I pin one relative label and enumerate (m−1)! orders on the union of m relevant positions. The same 5,040 orders recover 27/140 at k=8, 100 and 10⁶. I find 26 uniform histograms, 12 nonuniform histograms with balanced zero and 12 with biased zero. The investigation of the small filter modulo six starts from this last discrepancy. Calculation and data · Next question

Why the eight-symbol cut gives 27/140

I write H(r) for the count passing both small filters and landing in residue r modulo p, and T for the count passing the destination filter alone. Among the latter, D(r) counts cases with small source rank 2 or 3 modulo six and destination residue r modulo p. I assume prime p>3 and four source positions avoiding the final two destination positions.

I reflect the labels and swap the last two destination positions. An admissible local destination rank u is odd: reflection maps it to p!−1−u and the swap yields p!−u. Destination admissibility is preserved and the residue changes sign. On the four source positions the small rank s becomes 5−s. Ranks 1 and 5 pass, 0 and 4 are their reflections, and 2 and 3 fail on both sides. Rotating the last p labels balances all destination-admissible cases across residues. In each class I obtain H(r)+H(−r)=T/p−D(r). For N=ΣH this gives 1/p−H(0)/N=(D(0)−ΣD/p)/(2N).

For the eight-symbol reversal T/p=336, H=(108,111,115,115,111), and N=560. The double rejections are (120,114,106,106,114), with mean 112. The eight excess rejections at zero give 8/(2×560)=1/140. The argument can fail when the source touches the last two positions. The five-symbol witness gives local counts (0,1,0) for the small parity filter. Proof and check

Predicting a histogram by interleaving two orders

I place the large destination block, including its anchor, on a circle and superimpose an order of the small source support. Common positions must follow the same circular order. Between two consecutive common positions, a destination-only positions and b source-only positions can be interleaved in C(a+b,a) ways, retaining both internal orders. The arcs are disjoint so I multiply their counts. This is bijective: deleting each side's private positions recovers both orders and the interleaving. With no common position the multiplicity is (m−1)!/((v−1)!(s−1)!), for support sizes v and s and m=v+s. At p=k I restore the p global origins that traverse all residues. Interleaving counts are classical. My adaptation tracks source ranks, destination admissibility and the destination residue together. Stanley, Enumerative Combinatorics · Zaks' generation order

At ten symbols, p=7 and source positions (0,2,5,1), I recorded (5760,5750,5773,5766,5757,5746,5768) before running the exhaustive reader. It recovers every entry. I visit 5,040 destination orders, reuse seven shared-position signatures and measure a median of 22.9 ms over three runs here. The reader over all 362,880 joint orders takes 559.8 ms. All 50 earlier census cases and four boundary cases also agree. I now seek to sum destination orders by signature. Frozen prediction · Next question

In the ten-symbol case H(0)=5,760 out of 40,320: zero has exactly its 1/7 share even with the small filter modulo six. Classes 1 and 6 nevertheless have 5,750 and 5,768 cases. The defect identity explains this: the 5,760 rejections at zero equal their mean over all seven residues. I retain this balanced case alongside the eight-symbol deficit.

Shared positions suffice for insertion counting

I insert positions in reverse, retaining shared labels and rank modulo lcm(p,ℓ!). Inserting a digit rotates the list and adds the digit times (length−1)!. Private labels in the same state therefore have identical transitions. With a separate anchor and new support (1,4,0,6) at size ten I retain 1,680 final states for 5,040 orders. All seven predicted counts match exhaustive enumeration of 362,880 orders.

In the new case five local runs give medians of 6.88 ms for insertion and 26.39 ms for enumerating outer orders. Separately traced Python peak allocations rise from 9,116 to 156,956 bytes. On F8 the final layer retains 120 states for 120 orders. I run python signatures.py --measure to repeat the comparison.

My next test is to measure at which overlap state storage costs more than order enumeration. AT.G14 · Stanley, Enumerative Combinatorics

Two geodesics at the same isolation count

At size nine and four flips each creating a new gap I count 1,734 words reaching 1,702 endpoints. With exactly two isolated vertices, 864 endpoints have one path and six have two. I supply two permutations showing why the isolation count alone cannot determine multiplicity.

My next test is to classify strip order around an isolated vertex. AT.G15 · Helmert, Landmark Heuristics for the Pancake Problem

Four rank predictions on different supports

I commit to histograms H, D and T before enumerating ranks. For four supports at p = 7, insertion ends with 294, 1,764, 5,040 and 5,040 states against 5,040 outer orders. All three histograms match on every support. Even when each order survives, insertion takes less median time on this machine and has a larger peak Python allocation.

I plan to predict state counts from shared positions before computing ranks. AT.G17 · Stanley, Enumerative Combinatorics

Two endpoints indistinguishable from their strip neighbours

I record strip orientations and the ordered neighbours of each singleton. At four increasing flips I find no multiplicity collision for n = 8 through 11. At six flips, endpoints (0,6,7,9,8,4,3,1,5,2) and (0,8,9,7,6,4,3,1,5,2) have the same signature and respectively one and two paths. I recount backwards. Blanco, Buehrle and Patidar count the entire sphere at four flips. My observable counts paths that increase the number of breakpoints at every step.

I plan to add the relative order of long strips and search for a first collision at depth five or six. AT.G18 · Blanco, Buehrle & Patidar, On the number of pancake stacks requiring four flips to be sorted

Replaying the three paths by hand

I start at (0,1,2,3,4,5,6,7,8,9). Each number gives the suffix length to reverse. For the first endpoint I read (2,5,8,7,9,3). For the second I can read (2,9,2,4,5,2) or (2,9,4,5,2,3). I prepend a sentinel −1 to count broken natural adjacencies. A reversal changes at most one breakpoint, both targets have six and each word creates one per step. To count all these words I trace backwards only along steps that remove a breakpoint. Here the endpoints differ in the order of two long strips omitted by the local signature.

At depth two I also compute the relative variance of mobility over every admissible root. For sizes 5, 6 and 7 I obtain 735/5329, 6383/53361 and 58835/474253. The growing-depth limit remains open. Volume conjecture

What long-strip order actually adds

I recover the full signed pattern by filling nonsingleton positions with long-strip identifiers. This extension restores the entire pattern. My local signature already confounds two multiplicities at nine symbols and six flips. I verify 6,848 single-symbol lookups.

Seek a strictly shorter signature and count its bits. AT.G21 · Blanco, Buehrle & Patidar, On the number of pancake stacks requiring four flips to be sorted

Two supports refute my rank prediction

With three shared mobile labels I predict 5,040 states and a uniform histogram. Both frozen cases end with 4,620 states and nonuniform histograms. Insertion, direct ranks and order gluing agree.

Derive the merged classes from insertion position and modulus. AT.G22 · Stanley, Enumerative Combinatorics

One parity bit in a strip summary

I count words for which every flip increases the break count by one, keeping the full ball separate. At (16,4) I find 32,968 words and 32,852 targets, with 116 colliding pairs of different words. Adding the parity of long-strip order separates the earlier collisions on layers (9,6) and (10,6). At (25,5), two of 400 sampled valid words are ambiguous. At (9,7) the additional check has as many keys as endpoints, namely 48,695.

I seek the first collision surviving the parity bit and a frequency bound. AT.G24 · Blanco, Buehrle & Patidar, On the number of pancake stacks requiring four flips to be sorted

Explaining the 4,620 insertion states

I retain positions of shared labels 3,5,7 and the rank modulo 42 across seven insertions. At length six the ranks and positions of 5,7 give 600 singleton and 60 double classes. The final position of label 3 reveals the last digit. Each class has seven disjoint lifts. I recover 7×660 by inverse enumeration of permutations.

I seek a formula for collisions before insertion of a private label. AT.G25 · Stanley, Enumerative Combinatorics

Counting endpoints before interpreting a signature

I fix ten symbols and eight reversals that increase the cut count, then two insertion moduli on seven symbols. The 632,700 words reach 451,611 endpoints. The local descriptor already has 451,611 values. Adding parity resolves no ambiguity on this layer. At insertion, exposing the last label raises the number of classes from 1,176 to 4,200 modulo 30 and from 1,008 to 2,016 modulo 48.

Study the frequency of nearby signed pairs at fixed distance in the criterion of XXI.C02. AT.G28 · Labarre & Cibulka, Polynomial-time sortable stacks of burnt pancakes

Reproduce the experiment

In Atelier, run python profondeur.py 13 4 1. The result is the distance to a second admissible address in the block, or None for a singleton. The mobility starter kit computes the full distribution. Run python experience.py in Applications/mobilite for the latest result.

Download research files ↓

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.