Summary
The largest two-coordinate Sperner code in a uniform random tournament concentrates on at most two adjacent integers around $4\log_2 n-2\log_2\log_2 n+2-2\log_2(4/e)$. With high probability its size equals the order of the largest self-converse subtournament. In the two-point window the probability of the larger value is given by a Poisson approximation with an explicit mean. Alon's all-length conjecture remains open.
Approach
The earlier square bound identifies two-coordinate codes with partial arc-reversing bijections and gives their maximum size to leading order. To distinguish between partial bijections with the same overlap, count how many vertices belong to cycles of length one or two. This separates the square codes on self-converse subtournaments from those with disjoint projections and controls all intermediate cases. For the lower bound, count arc-reversing involutions by a second moment. When two involutions impose the same constraint on two edge bits, the joint event is impossible unless they agree on the endpoints.
Claims
Write $W_2(n)$ for the largest size of a length-two Sperner code in $T_n$, and $S(n)$ for the largest order of a self-converse subtournament, one isomorphic to its arc reversal. All logarithms below are base two. Put $$
L=\log n,\qquad x_n=4L-2\log L+2-2\log(4/e),\qquad
\eta_n=(\log L)^2/L.
$$
- [proved] With probability tending to one, $$
W_2(n)=S(n)\in\{\lfloor x_n-\eta_n\rfloor,
\lfloor x_n+\eta_n\rfloor\}.
$$
- [proved] Along every sequence of $n$ and integers $m$ with $|m-x_n|\le\eta_n$, let $Z_m$ count the arc-reversing involutions on $m$-vertex subsets. Its law has total variation distance $o(1)$ from the Poisson law of mean $$
\mu_m=\frac{(n)_m}{2^{\lfloor m/2\rfloor}\lfloor m/2\rfloor!}
2^{-\lfloor(m-1)^2/4\rfloor}.
$$ On these sequences, $\Pr[W_2(n)=m]=1-e^{-\mu_m}+o(1)$.
Details
Candidate counts and the upper bound
A two-coordinate Sperner code has injective projections. If two words coincided in one coordinate, their remaining tournament edge would distinguish them in exactly one direction. Thus a code of size $m$ is the graph of a bijection $f:A\to B$, $|A|=|B|=m$, with $a\to a'$ if and only if $f(a')\to f(a)$ for all distinct $a,a'\in A$. Conversely each such bijection gives a code. Write $E=\binom m2$ and $b=|A\cap B|$. The number of candidates with overlap $b$ is $$
\frac{(n)_{2m-b}m!}{b!(m-b)!^2}
\le \frac{n^{2m}}{m!}n^{-b}m^{2b}.
$$ In particular $\nu_m=(n)_{2m}2^{-E}/m!$ is the expected number of successful disjoint candidates.
Define $I(j)=\lfloor j^2/4\rfloor$ for $j\ge0$ and $R(j)=\binom j2-I(j)$. In a successful $f$ there is at most one fixed vertex, since the edge between two fixed vertices could not reverse. The directed graph of the partial map consists of paths and cycles. Let $d$ be the number of vertices in cycles of length one or two, with $d\le b$. There are $\lfloor d/2\rfloor$ transpositions on these vertices and $d\bmod 2$ fixed vertices. In particular a candidate with $d=m$ is an involution on its domain.
For a fixed $f$, write each arc-reversal constraint as an equation between two independent fair bits, one for the unordered pair in $A$ and one for its image pair. The right-hand parity accounts for the reference ordering. The directed graph of these $E$ equations has indegree and outdegree at most one. If all equations are consistent, each path gives one independent equation per edge, while each cycle, including a loop, loses one. A cycle of unordered pairs uses only vertices on cycles of $f$. Its length cannot be one or two if it touches a vertex cycle of length at least three. Indeed a return of an unordered pair by the second iterate either fixes its endpoints separately or interchanges them. The first case requires vertex cycles of length at most two. The second case requires a four-cycle, and two successive arc reversals would then preserve the orientation while swapping the endpoints of the opposite pair. This is inconsistent. On the $d$ vertices in short cycles there are exactly $[\binom d2+\lfloor d/2\rfloor]/2=I(d)$ pair orbits. The $\lfloor d/2\rfloor$ one-element orbits impose automatic constraints because their endpoints are swapped. Consequently, for every consistent candidate the number of cycles of pair variables is at most $$
I(d)+\frac{\binom b2-\binom d2}{3}.
\tag{1}
$$ We also have the simpler upper bound $I(b)$. Each cycle of length one comes from a transposition, at most $\lfloor b/2\rfloor$ in all, and all other cycles use at least two variables from the overlap. Thus the success probability is at most $2^{-E}$ times two to the power of either cycle bound. For an involution it is exactly $2^{-R(m)}$. The number of involutions of the specified form is $F_m=(n)_m/(2^{\lfloor m/2\rfloor}\lfloor m/2\rfloor!)$, so $\mathbb E Z_m=F_m2^{-R(m)}=\mu_m$.
Hereafter take $m=x_n+O(1)$. Then $m=4L-2\log L+O(1)$, and Stirling's formula gives, uniformly in this range, $$
\log\mu_m=\frac m4(x_n-m)+O(\log L),\qquad
\log\nu_m=\frac m2(x_n-1-m)+O(\log L).
\tag{2}
$$ Indeed $\log(n)_j=jL+O(m^2/n)$ for $j\le2m$, $R(m)=m^2/4-m/2+O(1)$, and $\log m=\log(4L)+O((\log L)/L)$. The shift of one unit in the disjoint first moment arises from the difference between $m!$ and the number $2^{\lfloor m/2\rfloor}\lfloor m/2\rfloor!$ that divides the full-overlap count.
We bound the expected number of successful non-involutive candidates in three ranges. The estimates below hold for any bounded $m-x_n$.
- If $0\le b\le 0.95m$, divide the contribution at $b$ by $n^{2m}2^{-E}/m!=(1+o(1))\nu_m$. It is at most $(m^{2}/n)^b2^{b^2/4}\le n^{-b/40}$ for large $n$, using $m<4L$ and $2\log m=o(L)$. The total count in this range has expectation at most $(1+o(1))\nu_m$.
- If $b>0.95m$ and $d\le0.9m$, (1) improves the bound $b^2/4$ by at least $(b^2-d^2)/12-1=\Omega(m^2)$. The factor $(m^2/n)^b2^{b^2/4}$ is at most $2^{O(m\log m)}$ since $m<4L$. The polynomially many terms in this range have total expectation $2^{-\Omega(m^2)}$, using $\nu_m=2^{O(L)}$ from (2).
- In the remaining range $d>0.9m$ set $t=m-d$ and $h=b-d$. Take $t\ge1$ to exclude the pure involutions. Choose the involution on its $d$ vertices, then choose an arbitrary partial bijection of size $t$ on the remaining vertices with overlap $h$. This gives at most $$
\frac{(n)_d}{2^{\lfloor d/2\rfloor}\lfloor d/2\rfloor!}
\frac{n^{2t-h}t!}{h!(t-h)!^2}
\le 2F_m n^{t-h}(2m^2)^t
$$ candidates. The ratio on the right uses $(n)_d/(n)_m\le 2 n^{-t}$ for $t\le m=O(L)$ and the factorial ratio with $\lfloor m/2\rfloor-\lfloor d/2\rfloor\le t$. By (1), the reduction in the cycle count relative to a pure involution is at least $$
I(m)-I(d)-\frac{\binom b2-\binom d2}{3}
\ge \frac{m+d}{4}t-\frac{b+d-1}{6}h-1
\ge (1.8t-1.4h)L-1
$$ for large $n$. Since $0\le h\le t$, after the factor $n^{t-h}$ this gives a saving of at least $0.4tL$ in the logarithm before the polynomial factors in $m$. The expectation summed over $t\ge1$ and $0\le h\le t$ is $O(\mu_m n^{-1/4})$.
Apply the third estimate to the remaining candidates with $b>0.95m$. The expected number of non-involutive successes is therefore bounded by $$
\le (1+o(1))\nu_m+2^{-\Omega(m^2)}+O(\mu_m n^{-1/4}).
\tag{3}
$$ For $m=\lfloor x_n+\eta_n\rfloor+1$, (2) gives $\mu_m=o(1)$ and $\nu_m=o(1)$. Here $m/4\sim L$ and $L\eta_n=(\log L)^2$ dominates the error term in (2). By Markov's inequality applied to the total count, there is no size-$m$ code with high probability. Any larger code would contain one.
The second moment for involutions
Take two candidate involutions $f,g$ on sets of order $m$ and now let $b$ be the overlap of their supports and $d$ the number of common vertices on which $f$ and $g$ agree. The agreement set is closed under both maps. The equations of each candidate give a matching on unordered-pair variables after dropping the automatically satisfied transposition loops. Their union is a multigraph of maximum degree two. If the joint constraints are consistent, its even cycles, including the ones with two parallel edges, each save one independent equation. Let $c$ count these cycles.
Every variable on a cycle has its endpoints in the overlap, together with their images under $f$. The vertices of the overlap whose $f$-images stay in the overlap form an $f$-invariant set of size $j\le b$. At most $2R(j)\le2R(b)$ variables on this set participate in the matching of $f$, as its fixed unordered pairs have been dropped. If two parallel edges join variables $e,e'$, then $f$ and $g$ both send $e$ to $e'$. If they send the ordered endpoints of $e$ in opposite orders, the two equations have opposite right-hand parities, so the joint event is impossible. Therefore every parallel cycle of a consistent pair comes from a matching edge on the agreement set. At most $R(d)$ cycles are parallel, and every other cycle uses at least four variables. It follows that $$
c\le \frac{R(b)+R(d)}2\le R(b),\qquad
\frac{\Pr[f,g\text{ both succeed}]}{2^{-2R(m)}}\le 2^c.
\tag{4}
$$ For inconsistent constraints use the joint probability zero. The first bound counts each parallel cycle by two variables and each other cycle by at least four. The joint probability calculation counts equations with multiplicity, so that the same equation from two candidates contributes precisely the one excess equation of a parallel cycle.
Fix $f$ and choose $g$ uniformly from the $F_m$ candidates. Its support is uniform, so the probability of overlap exactly $b$ is at most $(m^2/(n-m))^b$ by a union bound over the $b$ chosen common vertices. For $2\le b\le0.95m$, multiplying this probability by $2^{R(b)}\le2^{b^2/4}$ and summing gives $O(n^{-1/20})$ by the same geometric bound as above. For $b>0.95m$ and $d\le0.9m$, the first bound in (4) saves $(R(b)-R(d))/2=\Omega(m^2)$ in the exponent, and summing this range gives $2^{-\Omega(m^2)}$ after using $m<4L$.
For $d>0.9m$, set $t=m-d$ and $h=b-d$. For $t\ge1$, the number of $g$ for each pair $(t,h)$ is at most $n^{t-h}m^{3t}$. Choose the agreement set in at most $m^t$ ways, its $h$ additional common vertices in at most $m^t$ ways, the remaining support outside the support of $f$ in at most $n^{t-h}$ ways, and a permutation of the $t$ new positions in at most $m^t$ ways. By (4) and $R(j)=\lfloor(j-1)^2/4\rfloor$ for $j\ge1$, the saving from $R(m)$ is at least $$
R(m)-\frac{R(b)+R(d)}2
\ge \frac{m+b-2}{8}(t-h)+\frac{m+d-2}{8}t-1
\ge 0.9L(2t-h)-1
$$ for large $n$. After $n^{t-h}m^{3t}$ the saving is at least $tL/2-O(1)$ for large $n$. Dividing by $F_m$, each term is bounded by $O(n^{-t/2}/\mu_m)$. Their sum over $t\ge1$ and $0\le h\le t$ is $O(n^{-1/2}/\mu_m)$. For $t=0$ the candidate is precisely $g=f$, which contributes $1/\mu_m$.
For $b\le1$ the events use disjoint edge bits and are independent. Summing for a fixed $f$ and averaging over $f$ now gives $$
\frac{\mathbb E Z_m^2}{\mu_m^2}
\le 1+O(n^{-1/20})+\frac{1+O(n^{-1/2})}{\mu_m}.
\tag{5}
$$ The contribution from distinct pairs with overlap at least two is bounded by the two error terms $O(n^{-1/20})+O(n^{-1/2})/\mu_m$.
Concentration, agreement of maxima, and the limiting window
At $m=\lfloor x_n-\eta_n\rfloor$, (2) gives $\mu_m\to\infty$. By (5) and the second moment inequality, $Z_m>0$ with high probability. An arc-reversing involution makes its support self-converse, so $S(n)\ge m$. And always $W_2(n)\ge S(n)$, because every isomorphism to the reversal defines a square code. With the upper bound already proved, both maxima belong to the displayed set in Claim 1 with high probability. The set has at most two consecutive integers for large $n$.
If it has two elements, its larger one, say $m$, satisfies $|m-x_n|\le\eta_n$. Formula (2) gives $\mu_m=n^{o(1)}$ and $\nu_m=n^{-2+o(1)}$. By (3), with high probability every size-$m$ square code is the graph of an involution. Thus $W_2(n)=m$ then forces $S(n)=m$. If $W_2(n)$ takes the smaller value, $S(n)$ has the same value by the lower bound. This proves the equality of maxima in Claim 1.
To prove Claim 2, take the dependency neighborhood of an involution to consist of itself and all candidates with support overlap at least two. Its indicator is independent of the family outside the neighborhood because that family together uses none of its edge bits. The first sum in the dependency-neighborhood Poisson bound of Arratia, Goldstein and Gordon (Theorem 1) is $$
b_1\le\mu_m^2 (m^2/(n-m))^2=o(1).
$$ The probability bound here is the union bound for at least two common vertices. The second sum runs over distinct neighbors, and the distinct-pair bound following (5) gives $$
b_2=O(\mu_m^2 n^{-1/20}+\mu_m n^{-1/2})=o(1).
$$ The conditional-dependence term is zero. Thus the law of $Z_m$ is $o(1)$ in total variation from the claimed Poisson law. For $|m-x_n|\le\eta_n$, the concentration upper bound gives $W_2(n)\le m$ with high probability, since $m=\lfloor x_n+\eta_n\rfloor$ for large $n$. By (3), up to an event of probability $o(1)$, attaining $m$ is equivalent to $Z_m>0$. This gives the probability formula.
Verification
The asymptotics above follow from analytic proofs. The exact standard library replay below exhausts all partial bijections and pairs of candidate involutions on six vertices. It checks (1), (4), the single-involution probabilities, and the candidate counts by evaluating their constraints in all $2^{15}$ labelled tournaments as bitsets. The replay covered 13,326 partial bijections and 14,211 ordered pairs of involutions, including both parities of the support size.
from collections import Counter
from itertools import combinations, permutations
from math import comb, factorial, perm
n = 6
vertices = tuple(range(n))
edges = tuple(combinations(vertices, 2))
num_tournaments = 1 << len(edges)
universe = (1 << num_tournaments) - 1
arcs = {}
for i, (a, b) in enumerate(edges):
arcs[a, b] = sum(1 << bits for bits in range(num_tournaments)
if (bits >> i) & 1)
arcs[b, a] = universe ^ arcs[a, b]
def event(mapping):
result = universe
for a, b in combinations(mapping, 2):
result &= arcs[a, b] ^ arcs[mapping[a], mapping[b]]
return result
def rank(j):
return comb(j, 2) - j * j // 4
bijections_checked = 0
pairs_checked = 0
for m in range(1, n + 1):
supports = tuple(combinations(vertices, m))
counts = Counter()
involutions = []
for domain in supports:
for image in supports:
for targets in permutations(image):
mapping = dict(zip(domain, targets))
b = len(set(domain) & set(image))
d = sum(mapping.get(mapping[a]) == a for a in domain)
counts[b] += 1
mask = event(mapping)
exponent = comb(m, 2) - d * d // 4
exponent -= (comb(b, 2) - comb(d, 2)) // 3
assert (mask.bit_count() << exponent) <= num_tournaments
assert (mask.bit_count() << (comb(m, 2) - b * b // 4)) <= num_tournaments
if d == m and sum(mapping[a] == a for a in domain) == m % 2:
assert mask.bit_count() << rank(m) == num_tournaments
involutions.append((mapping, mask))
bijections_checked += 1
for b in range(m + 1):
assert counts[b] == (perm(n, 2 * m - b) * factorial(m)
// (factorial(b) * factorial(m - b) ** 2))
assert len(involutions) == perm(n, m) // (2 ** (m // 2) * factorial(m // 2))
for f, f_mask in involutions:
for g, g_mask in involutions:
overlap = f.keys() & g.keys()
d = sum(f[a] == g[a] for a in overlap)
denominator = 2 * rank(m) - (rank(len(overlap)) + rank(d)) // 2
assert ((f_mask & g_mask).bit_count() << denominator) <= num_tournaments
pairs_checked += 1
print(bijections_checked, 'partial bijections and', pairs_checked, 'involution pairs')
I checked Alon's published conjecture, Eplett's enumeration setup for self-converse tournaments, and the related concentration theorem of Surya, Warnke and Zhu for two independent undirected graphs. I searched for “random tournament self-converse largest subtournament”, “random tournament partial anti-isomorphism log log”, and “Sperner capacity random tournament second order”. The previous square result gives the leading term only. Eplett's involutions give the fixed-size counting setup, while the random-graph comparison concerns independent graphs. In the sources checked I did not find a two-point tournament result, the equality with the self-converse maximum, or the Poisson window above.
Dead ends
I first tried to obtain an all-length converse by treating a short power as a new alphabet and fitting a low-rank block matrix. On the full power $T^k$ every two different words have an arc in at least one direction. Tensoring a fitting matrix with its transpose and restricting to the pairs with the same word gives an identity of size $n^k$ times the square of the block size. As shown in the earlier fitting-rank attempt, the normalized upper certificate is always at least $\sqrt n$, even after taking a $k$th root. Replacing the full alphabet by a largest square code does not supply an upper bound for the other words in the power. The sharp distribution for the square therefore controls a single length and leaves the supremum in the frozen Lean statement unresolved.
References
- N. Alon, “On the capacity of digraphs,” European J. Combin. 19 (1998), 1–5, Conjecture 4.1. Author copy.
- W. J. R. Eplett, “Self-converse tournaments,” Canad. Math. Bull. 22 (1979), 23–27. The opening argument gives existence of an involutory isomorphism to the reversal for all self-converse tournaments. Published article.
- E. Surya, L. Warnke, and E. Zhu, “Isomorphisms between dense random graphs,” Combinatorica 45 (2025), Art. 35, Theorem 4 and Corollary 5. Published article.
- R. Arratia, L. Goldstein, and L. Gordon, “Two moments suffice for Poisson approximations: the Chen–Stein method,” Ann. Probab. 17 (1989), 9–25, Theorem 1. Published article.
- Prior attempts: small tournaments, degree bound, small digraphs, rational fitting matrices, sparse fitting and first-order square codes, and fixed-length estimates.
Source: attempts/sperner-capacity-directed-graphs/2026-12-04-codex-scheduled.md