Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

Mean convergence time of alternating lexicographic row and column sorting

CombinatoricsProbability & statistical mechanics

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

I recently came across this simple looking problem which I can't resolve.

Let AAA be an n×nn\times nn×n binary matrix. Define two operations:

  • R(A)R(A)R(A): reorder the rows of AAA into increasing lexicographic order;

  • C(A)C(A)C(A): reorder the columns of AAA into increasing lexicographic order, reading each column from top to bottom.

Starting with A(0)=AA^{(0)}=AA(0)=A, alternate these operations, beginning with the rows:

A(1)=R(A(0)),A(2)=C(A(1)),A(3)=R(A(2)),…A^{(1)}=R(A^{(0)}),\qquad A^{(2)}=C(A^{(1)}),\qquad A^{(3)}=R(A^{(2)}),\quad\ldotsA(1)=R(A(0)),A(2)=C(A(1)),A(3)=R(A(2)),…

Let

T(A)=min⁡{t≥1:R(A(t))=A(t)=C(A(t))}.T(A)=\min\{t\ge 1: R(A^{(t)})=A^{(t)}=C(A^{(t)})\}.T(A)=min{t≥1:R(A(t))=A(t)=C(A(t))}.

Thus each complete row sort or column sort counts as one step.

Convergence is automatic: whenever a sort changes the matrix, it strictly decreases the binary word obtained by reading the matrix row by row, in lexicographic order.

The exact deterministic worst case is

max⁡A∈{0,1}n×nT(A)=2n−3\max_{A\in\{0,1\}^{n\times n}}T(A)=2n-3A∈{0,1}n×nmax​T(A)=2n−3

for n≥3n\ge 3n≥3. A short way to see the upper bound is that each nonterminal sort permanently fixes the first not-yet-fixed row or column in the eventual doubly lexicographic ordering; the bound is attained, for n≥4n\ge 4n≥4, by taking the all-one matrix and putting zeros at

(1,1),(1,3),(n,2),(n−1,n)(1,1),(1,3),(n,2),(n-1,n)(1,1),(1,3),(n,2),(n−1,n)

and at

(i,i+1),(i,i+2),2≤i≤n−2.(i,i+1),(i,i+2),\qquad 2\leq i\leq n-2.(i,i+1),(i,i+2),2≤i≤n−2.

Now let AnA_nAn​ be uniformly random in {0,1}n×n\{0,1\}^{n\times n}{0,1}n×n, equivalently with independent Bernoulli(1/2)(1/2)(1/2) entries, and put

μn=E[T(An)].\mu_n=\mathbb E[T(A_n)].μn​=E[T(An​)].

My main question is:

What is the asymptotic behaviour of μn as n→∞?\boxed{\text{What is the asymptotic behaviour of }\mu_n\text{ as }n\to\infty?}What is the asymptotic behaviour of μn​ as n→∞?​

Exact enumeration for the first few values gives

μ1=1,μ2=2116,μ3=10564,μ4=12538765536,\mu_1=1,\qquad \mu_2=\frac{21}{16},\qquad \mu_3=\frac{105}{64},\qquad \mu_4=\frac{125387}{65536},μ1​=1,μ2​=1621​,μ3​=64105​,μ4​=65536125387​,

approximately

1,1.3125,1.640625,1.913254.1,1.3125, 1.640625, 1.913254.1,1.3125,1.640625,1.913254.

Some elementary Monte Carlo experiments give approximate values

n510203050100μn2.183.253.874.144.394.63\begin{array}{c|rrrrrr} n & 5 & 10 & 20 & 30 & 50 & 100 \\ \hline \mu_n & 2.18 & 3.25 & 3.87 & 4.14 & 4.39 & 4.63 \end{array}nμn​​52.18​103.25​203.87​304.14​504.39​1004.63​​

so the growth appears to be very slow.

Statement and context adapted from MathOverflow · Arlo

CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history

A few useful definitions

Asymptotic behaviour
This studies a quantity as its parameter becomes large. Writing f(n) ∼ g(n) means that their ratio tends to 1, not that the functions are exactly equal.

Topics : co.combinatorics · pr.probability

Authors listed by the source : Arlo

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : August 14, 2026

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni