\section{Counting pairs of different marks}\label{app:discord} For a row of $n$ integers let $D_q$ count differently marked pairs of indices $(i,i+q)$ and put $m_q(n)=(n-q)_+$. Present entries carry the marks of an admissible prefix. Independently give each of the $h$ holes either mark with equal probability. Use the index separations \[ \mathcal Q=\{8,12,16,20,24,32,40,48,64,80,96\},\qquad Q=\mathop{\rm lcm}(\mathcal Q)=960 . \] The row recurrences also use their positive divisors. \paragraph{Complete rows.} For $n\le192$ generate binary words from both words of length one. Require the words obtained by dropping either end and the even and odd traces to pass the tests at shorter lengths. Whenever $x,y$ have opposite parity and $2x-y$ or $2y-x$ lies in the row, their comparison follows the common parity orientation of adjacent comparisons, by the odd-offset argument of Lemma~\ref{lem:interior}. For every such pair with different marks, the parity of its mark 1 must therefore be the same. The program carries these orientation requirements from the two end deletions, reversing the parity names under a shift by one. A reflected triple not covered by either deletion has numerical endpoints $0,n-1$ and centre $(n-1)/2$. It contributes opposite-parity comparisons when $n\equiv3\pmod4$. Induction retains every admissible prefix, and the count at length 192 is 131756. Set $F_q(n)$ to the largest $D_q$ over the retained words. Through $T=384$ extend this upper bound by \[ F_q(n)=\min_{1\le j\le192-q}\bigl(F_q(q+j)+F_q(n-j)\bigr)\qquad(n>192). \] The two summands account for disjoint sets of starting indices. Correll and Ho count complete admissible orders by a subset recursion \cite[Section~3]{CH}. In our independent check through length $16$, the same recursion retains every prefix that extends to a full order and tests both $F_q(n)$ and the coupled bounds of Appendix~\ref{app:joint-density}. See \path{anc/verify_complete_rows_small.py}. \paragraph{Rows with holes.} A short row is specified by its missing positions and the marks of its present positions. Enumerate $h=0,1,2,3,4$ holes through lengths $63,63,63,35,22$, respectively. Extend a retained word by one position, using complement symmetry to fix its first present mark at zero. Require its suffix after deleting the first position to pass the shorter test. For each divisor $d\ge2$ of $n-1$ for which $0,d,\ldots,n-1$ has at least four entries, require that trace, with its induced holes, to pass as well. To test the order constraints, consider each dyadic class of step $2^a$ in its own index coordinates. Among pairs of opposite parity, encode a comparison by which parity comes first. At a present centre $y$ and odd step $d$, examine $y\pm d,y\pm3d,\ldots$ until a position is missing or outside the row. By the reflection argument of Lemma~\ref{lem:interior}, $y$ precedes all these points or follows them all. Join the comparisons of $y$ with these points into one component and take the transitive closure. Each pair in the original row has a unique such level, determined by the exponent of $2$ in its difference. A pair of differently marked present points fixes its component's direction, since the mark $1$ must precede the mark $0$. Reject the word if a component is forced in opposite directions, or if the directed graph of forced comparisons across the levels contains a cycle. Every edge agrees with any realizing order, so all genuine prefixes pass. It suffices to use the components with at least two pairs. When all forced directions favour the same local parity, the lexicographic order of low bits (with that parity preferred) respects them, so the graph is acyclic. For each retained word, a pair of present entries at gap $q$ scores two if its marks differ and zero otherwise. A pair incident to a hole scores one, including a pair of distinct holes. The sum is exactly $2\mathbb E D_q$. Maximize over retained words and masks with the given number of holes. The resulting table has 238 row-length and hole-count pairs; it is generated by \path{anc/verify_prefix_components.cpp} with the option \texttt{--fair}. \paragraph{Arbitrary rows.} Let $U_q(n,h)$ bound $\mathbb E D_q$ on length $n$ with exactly $h$ holes. Start with $m_q(n)$ and use the short-row maximum divided by two wherever available. At $h=0$ the program uses $F_q(n)$. For $0q$, also use the first hole. If $i$ entries precede it and $l=n-i-1$ follow, the complete left part and the right part contribute at most $F_q(i)+U_q(l,h-1)$. There remain $m_q(n)-m_q(i)-m_q(l)$ pairs crossing or touching the hole. Budget one per pair and subtract $1/2$ for each of the hole's neighbours at distance $q$ in the row, since an incident pair has expected score $1/2$. Maximize the resulting bound over $0\le i\le n-h$. For each prime divisor $p$ of $q$ the two endpoints of a counted pair are in the same class modulo $p$. If these classes have sizes $n_r$, their total contribution is bounded by \[ \max_{\substack{\sum h_r=h\\0\le h_r\le n_r}}\sum_{r\bmod p} U_{q/p}(n_r,h_r). \] Take the minimum of the applicable bounds. The code stores $2U_q(n,h)$ as an integer. \paragraph{Charging for holes.} For $q\in\mathcal Q$, $q\le n\le T$ and $c\in\{0,1/4,\ldots,64\}$ initialize \[ A_{q,n}(c)=\max_{0\le h\le\min(20,n)}\bigl(U_q(n,h)-ch\bigr). \] Then $\mathbb E D_q\le A_{q,n}(c)+ch$ for every $h$, since the trivial bound applies at $h=20$. Partition the $n-q$ starting indices into blocks of size $k$, truncating at the ends, and choose the boundary offset uniformly modulo $k$. For $n-q\ge k$ both end remainders are uniform on $0,\ldots,k-1$, with an absent remainder counted as zero. A hole occurs in at most $1+q/k$ blocks on average, as the starts whose pairs span it are contained in $q+1$ consecutive indices. A block of $j$ starts uses a row of length $q+j$. Averaging its bound yields \begin{align*} \mathbb E D_q&\le \rho(n-q)+v+wh,\\ \rho&=A_{q,q+k}(c)/k,\qquad v=\frac{2}{k}\sum_{j=0}^{k-1}\bigl(A_{q,q+j}(c)-\rho j\bigr),\qquad w=c(1+q/k). \end{align*} Compute these triples from the initial table for $k=32,40,\ldots,192$ and integer $3\le c\le24$. For $q+k\le n\le T$ and every table price $c'\ge w$, the table entry $4A_{q,n}(c')$ may be lowered to $\lfloor4(\rho(n-q)+v)\rfloor$ whenever smaller. The rounding uses integrality of $4(\mathbb E D_q-c'h)$. \paragraph{Integrating over distances.} Let $I$ contain $M$ integers and $H\le M/b$ holes. For a positive multiple $\Delta$ of $Q$ set $t=\Delta/M$. As in Section~\ref{sec:numeric}, $Z_M(\Delta)$ is the expected number of disagreements at difference $\Delta$. For any $q\in\mathcal Q$ take rows of step $d=\Delta/q$. If $n=\lfloor q/t\rfloor