\documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{amsmath,amssymb,amsthm,booktabs,enumitem} \usepackage[margin=2.65cm]{geometry} \usepackage[hidelinks]{hyperref} \hypersetup{pdftitle={How Many Cycle Lengths Can a Unique Quotient Require?},pdfauthor={Nuutti Kuosa},pdfsubject={Division of finite dynamical systems}} \setlength{\emergencystretch}{1.2em} \raggedbottom \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newtheorem{example}[theorem]{Example} \newtheorem*{question}{Open question} \newtheorem*{unnumberedremark}{Remark} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\N}{\mathbb{Z}_{\ge0}} \newcommand{\Len}{\operatorname{Len}} \title{How Many Cycle Lengths Can a Unique Quotient Require?} \author{Nuutti Kuosa} \date{23 November 2026} \begin{document} \maketitle \begin{abstract} Given two permutations \(A\) and \(B\), suppose there is just one finite dynamical system \(X\), up to isomorphism, whose direct product with \(A\) is \(B\). How many different cycle lengths can \(X\) have? For every sufficiently large \(k\) we construct a divisor with \(k\) cycle lengths and a target with exactly \(k+1\). Their unique quotient has asymptotically \(\tfrac12 k^2\log_2\log k\) distinct cycle lengths. Every one of these lengths is absent from the target. The divisor is fixed once \(k\) is chosen. Its cycles have lengths \(M/p\), where \(M\) is the product of the first \(k\) primes and \(p\) runs over those primes. The proof chooses a set containing almost all the first \(k\) primes. Each quotient cycle omits exactly two primes of this set. A congruence fixes the number of states assigned to each missing pair. Smaller primes then distinguish several forced cycle lengths within each pair. \end{abstract} \section{A quotient whose lengths are absent from its product} Let \(C_d\) denote one cycle of length \(d\), and let \(mC_d\) denote \(m\) disjoint copies. A permutation is a sum of such cycles. Two permutations are isomorphic when each cycle length occurs with the same multiplicity in both. In the product \(C_aC_b\) both coordinates advance one step at a time. A pair returns to its starting point after \(\lcm(a,b)\) steps, so the \(ab\) states form \(\gcd(a,b)\) cycles of that length. Thus \(C_2C_3=C_6\): both factor lengths disappear from the product. In a division equation \(AX\cong B\), we call the known factor \(A\) the \emph{divisor}. How many lengths can disappear when the quotient \(X\) is uniquely determined? Write \(\Len(Y)\) for the set of distinct cycle lengths of \(Y\). Let \(P_k=\{p_1,\ldots,p_k\}\) be the first \(k\) primes in increasing order and set \(M=\prod_{p\in P_k}p\). Our divisor has one cycle for each prime omitted from this product. \begin{theorem}[A unique quotient with many cycle lengths]\label{cor:division} For every sufficiently large \(k\) there is a permutation \(B_k\) with exactly \(k+1\) distinct cycle lengths such that, for \[ A_k=\sum_{p\in P_k} C_{M/p}, \] the equation \(A_kX\cong B_k\) has exactly one solution \(X_k\) up to isomorphism among all finite dynamical systems. As \(k\to\infty\), \[ |\Len(X_k)|\sim \tfrac12 k^2\log_2\log k, \qquad \Len(X_k)\cap\Len(B_k)=\varnothing . \] \end{theorem} A finite dynamical system here is a finite set with a map to itself. If the product is a permutation, a nonperiodic state in either factor would give a nonperiodic state in the product. Thus every candidate quotient in the theorem is already a sum of cycles. Throughout, \(\log\) denotes the natural logarithm. For a finite instance, take \(k=271\). The construction in Remark~\ref{rem:slow} gives a target with \(272\) distinct lengths whose unique quotient has \(29\,915\). We begin with a much smaller example in which the quotient can be recovered by hand. \clearpage \paragraph{Recovering a quotient by hand.} Take the first three primes, so that \(M=30\). Consider \[ (C_{15}+C_{10}+C_6)X =8C_{15}+7C_{10}+5C_6+3C_{30}. \] The divisor has 31 states and the target 310, so \(X\) has ten. Each possible length \(d\) in \(X\) divides 30, since \(d\) divides every product length to which its cycle contributes. Look at the eight 15-cycles. Only multiplication by \(C_{15}\) can produce them. An odd \(d\) contributes \(d\) copies of \(C_{15}\), one for each state of \(C_d\), while an even \(d\) produces 30-cycles. We have therefore counted eight states of odd period. The remaining two states force one \(C_2\). In the same way the seven 10-cycles leave three states of period divisible by 3, and the five 6-cycles leave five states of period divisible by 5. They force one \(C_3\) and one \(C_5\). These cycles exhaust the ten states, and multiplication verifies the answer \(X=C_2+C_3+C_5\). \paragraph{Can the same counts give two quotients?} Keep the known factor \(A_3=C_{15}+C_{10}+C_6\). Write \(s_p\) for the number of states whose period is divisible by \(p\). The two sums \[ 3C_{10}+2C_{15} \qquad\text{and}\qquad 6C_5+C_{30} \] each have 60 states and give \(s_2=s_3=30\) and \(s_5=60\). Multiplying either by \(A_3\) gives \(30C_{15}+30C_{10}+37C_{30}\). Since \(s_5=60\) already requires sixty states, these are two distinct minimum-size realisations of the same marginals. \paragraph{Where the large number of lengths comes from.} To force a quotient, we will choose counts \(s_p\) for which exactly one sum \(X_0\) attains the smallest size. Then we take \(B=A_kX_0\). Any quotient of \(B\) by \(A_k\) must have the counts read from \(B\) and the size \(|B|/|A_k|=|X_0|\). It is therefore the same minimum-size sum \(X_0\). Lemma~\ref{lem:division} justifies this reading of the counts. We say that a cycle \emph{misses} \(p\) if its length is not divisible by \(p\). To force many lengths, choose a set \(Q\) containing almost all the first \(k\) primes. Arrange the counts so that every cycle in a smallest realisation omits exactly two primes of \(Q\). There are about \(k^2/2\) choices for the missing pair. A congruence determines the number of states assigned to each pair. A second set of primes, called markers, then forces about \(\log_2\log k\) different lengths for \emph{each} pair. Eisenbrand and Shmonin~\cite{es} give an earlier example in which a unique sum uses every one of a chosen set of integer vectors. Here every length \(d\) dividing the integer \(M\) is available. The proof must explain why all competing choices fail. Section~\ref{sec:lower} gives the construction. Section~\ref{sec:quotientproof} returns to the product and proves Theorem~\ref{cor:division}. \paragraph{Relation to division algorithms.} Dor\'e et al.\ find a connected quotient in polynomial time when one exists~\cite{dore2026}. For sums of cycles, Bridoux et al.\ can count all quotient classes in polynomial time for each fixed divisor~\cite{bridoux}. Thus their result applies to each fixed \(A_k\), with a polynomial degree that can depend on \(k\). Does a single polynomial bound suffice to find a quotient when \(k\) varies and the input permutations are given by their transition tables? Theorem~\ref{cor:division} shows that the only answer can contain more than any fixed multiple of \(k^2\) distinct lengths. The running time for this divisor family remains open. Crespelle, Phan and Richard describe all cycle-sum quotients by recursion on the number of primes~\cite[Theorem~3.8]{cpr}. In their notation our question asks how large \(\operatorname{card}(X)\), the number of distinct lengths, can be when that recursion has a single quotient to describe~\cite[\S2.1]{cpr}. For unrestricted explicit divisors, deciding existence is NP-complete even for permutations~\cite[Theorem~1]{kuosadiv}. For background on the semiring of finite dynamical systems and the equations studied in it, see~\cite{dennunzio2018,naquin,porrecarolland}. \section{What the product tells us about the quotient}\label{sec:marginals} \subsection*{Reading the target} For a finite set \(P\) of primes let \(M_P=\prod_{p\in P}p\). Consider a sum \(X=\sum_{d\mid M_P}x_d C_d\), where \(x_d\) is the number of \(d\)-cycles. Each cycle contributes \(d\) states. The \emph{marginal at \(p\)} counts the states on all cycles whose length is divisible by \(p\). Thus \[ |X|=\sum_{d\mid M_P}d x_d,\qquad s_p(X)=\sum_{\substack{d\mid M_P\\p\mid d}}d x_d \quad(p\in P). \] Distinct primes may count the same state. For example, a single 6-cycle contributes six to each of \(s_2\) and \(s_3\), but only six to \(|X|\). In the notation used below, \emph{size} always counts states and \emph{support size} always counts distinct cycle lengths. \begin{samepage} \begin{lemma}[Reading the marginals from a product]\label{lem:division} Let \(k\ge2\) and \(M=M_{P_k}\). Suppose the cycle lengths of the permutation \(B\) belong to \(\{M\}\cup\{M/p:p\in P_k\}\). Write \(B(\ell)\) for the multiplicity of \(C_\ell\) in \(B\), taking a missing length to have multiplicity zero. Then \(A_kX\cong B\) holds exactly for sums of cycles with lengths dividing \(M\) that satisfy \[ |X|=|B|/|A_k|,\qquad s_p(X)=|X|-B(M/p)\quad(p\in P_k). \] \end{lemma} \end{samepage} \begin{proof} A nonperiodic state \(x\) would make \((a,x)\) nonperiodic for every state \(a\) of \(A_k\). Thus \(X\) is a sum of cycles. Each length \(d\) in \(X\) divides the product length \(\lcm(d,M/p)\), which in turn divides \(M\). Since \(M\) is squarefree, there are just two outcomes: \[ C_{M/p}C_d= \begin{cases} d\,C_{M/p}, & p\nmid d,\\ (d/p)\,C_M, & p\mid d . \end{cases} \] Summing over the cycles of \(X\) gives \begin{equation}\label{eq:product} A_kX=\sum_{p\in P_k}\bigl(|X|-s_p(X)\bigr)C_{M/p} +\left(\sum_{p\in P_k}\frac{s_p(X)}p\right)C_M . \end{equation} The \(k\) shorter lengths are distinct. Their coefficients give exactly the stated marginals. Conversely, once these coefficients agree, the equality of the two total sizes fixes the remaining coefficient at \(M\). \end{proof} \subsection*{Choosing a size that forces a quotient} For any nonnegative vector \(s=(s_p)_{p\in P}\) with \(p\mid s_p\), let \[ F(s)=\min\{|X|:s_p(X)=s_p\text{ for every }p\in P\}, \] where the allowed lengths divide \(M_P\). A realisation always exists: \(\sum_p(s_p/p)C_p\) has these marginals. We allow the empty sum for \(s=0\). An \emph{optimum} is a realisation with \(F(s)\) states. Removing a fixed point changes none of the marginals, so an optimum contains no fixed point. For a target in Lemma~\ref{lem:division}, first check that \(n=|B|/|A_k|\) is an integer and each \(s_p=n-B(M/p)\) is nonnegative. Divisibility by \(p\) then follows by reducing \(n\sum_{a\in P_k}M/a=MB(M)+\sum_{a\in P_k}(M/a)B(M/a)\) modulo \(p\), since only the terms indexed by \(a=p\) survive. The lemma shows that a quotient exists exactly when \(F(s)\le n\): one can add \(n-F(s)\) fixed points to an optimum. In particular, if \(n=F(s)\), the quotients are precisely the optima. This last observation is how we will force uniqueness. An arbitrary quotient can be larger than an optimum. For \(A_2=C_2+C_3\), for instance, \(C_1+C_2\) is a three-state quotient of \(3C_2+C_3+C_6\) whose marginals already occur on the two-state system \(C_2\). \begin{unnumberedremark}[An interpretation using group actions] Let the cyclic group of order \(M\) act on \(X\) by sending its generator to one time step. The subgroup of order \(p\) fixes the states of period dividing \(M/p\), so its fixed-point count (its \emph{mark}) is \(|X|-s_p\). Together with \(|X|\), the mark at the trivial subgroup, the product thus gives \(k+1\) of the \(2^k\) subgroup marks. The full collection determines each \(x_d\) in order of increasing \(d\). A \(d\)-cycle contributes all \(d\) states after \(m\) steps if \(d\mid m\), and zero otherwise. The fixed-point count is therefore \(\sum_{d\mid m}d x_d\) for each \(m\mid M\). This is the finite case of the mark formula for cyclic actions~\cite[author version, (2-6-1) and (2-6-4)]{dress}. \end{unnumberedremark} \section{Forcing many different cycle lengths}\label{sec:lower} \subsection{A cycle for each pair of missing primes} Return to the ten-state quotient \(C_2+C_3+C_5\). Its three lengths can also be read as the three pairs of primes they miss. For instance, missing \(2\) and \(3\) leaves \(30/(2\cdot3)=5\). With a set \(Q\) of \(q\ge3\) primes there are \(\binom q2\) possible pairs. We want several lengths for each pair. Multiplying its base length by different primes outside \(Q\) gives such lengths. We call these primes \emph{markers}. Can the marginals force every one of the resulting cycles? Write \(L=\prod_{a\in Q}a\). For a pair \(e=\{a,b\}\) put \(d_e=d_{ab}=L/(ab)\), and let \(H=\sum_e d_e\), where \(e\) ranges over all unordered pairs in \(Q\). Choose a set \(R=\{r_1<\dotsw_{h-1}\) for every \(h\) says that each marker exceeds the sum of all smaller markers. Taking one cycle for each pair and each marker gives \[ X_0=\sum_e\sum_{h=1}^t C_{d_e r_h},\qquad n=|X_0|=wH. \] In each group of cycles indexed by \(e\) there are \(w d_e\) states. The marker \(r_h\) occurs on cycles with \(r_h H\) states in total. It helps to see both kinds of information in one example. Take \(Q=\{11,13,17\}\) and \(R=\{2,3\}\), so \(w=5\) and \(H=41\). The three groups of \(X_0\) are \[ \begin{array}{c|r|c|r} \text{missing pair }e & d_e & \text{cycle lengths} & \text{states}\\ \hline \{11,13\} &17&34,\ 51&85\\ \{11,17\} &13&26,\ 39&65\\ \{13,17\} &11&22,\ 33&55 \end{array} \] We know the three group sizes because we built the table. To recover it we are given only the size, 205 states, and the marginals. For example, \(85+65=150\) states miss \(11\), and \(51+39+33=123\) states carry \(3\). Can these overlapping counts recover the table? \begin{lemma}[Forcing the cycles of each missing pair]\label{lem:marked} Take \(P=Q\cup\{r_1,\ldots,r_t\}\) and \(s=s(X_0)\). Suppose \begin{equation} w\sum_{b\in Q\setminus\{a\}}\frac1b<1\qquad(a\in Q). \label{eq:pair-row-budget} \end{equation} Then \(F(s)=n\), and \(X_0\) is the only realisation of size \(n\). It has \(t\binom q2\) different cycle lengths. \end{lemma} \begin{proof} First we show that every cycle of a competing sum must miss exactly two primes. Once the cycles fall into pair groups, we can determine the size of each group and finally the cycles that fill it. \emph{Which primes can a cycle miss?} For \(a\in Q\), let \(b_a=n-s_a\) count the states of \(X_0\) on cycles whose lengths are not divisible by \(a\). By construction, \[ b_a=w\sum_{b\ne a}d_{ab}=\frac{L}{a}\, w\sum_{b\ne a}\frac1b <\frac{L}{a}. \] Each state of \(X_0\) misses two primes, so \(\sum_{a\in Q}b_a=2n\). Summing \(b_aN\) states. A cycle missing only \(a\) has length divisible by \(L/a\). None of its states would be counted by \(s_a\), but only \(N-s_a\le n-s_a=b_a0\). Thus \(n-s_p>0\) for every \(p\), and \(\sum_p s_p/p>0\) because some prime occurs. The target has exactly the \(k+1\) lengths \(M\) and \(M/p\). Each length of \(X_0\) omits two primes of \(Q\); a target length omits at most one. The two length sets are disjoint. Finally \[ |\Len(X_0)|=t\binom q2\sim\tfrac12 k^2\log_2\log k . \] \end{proof} \subsection{Can every prime occur in the quotient?} The division theorem is now proved. Some primes in its construction have zero marginal, which immediately rules out any length divisible by them. Is that shortcut essential? We can require each prime to occur on some cycles and to be absent from others. Keeping the missing pairs will also let us compare this example with the upper bound in Corollary~\ref{cor:pairclass}. \begin{remark}[extending the prime set]\label{rem:lift} Suppose \(Q\cup R\subseteq P_k\), where \(R=\{r_1,\ldots,r_t\}\). One way to incorporate the unused primes \(U=P_k\setminus(Q\cup R)\) is to multiply every length by \(D=\prod_{u\in U}u\). The resulting witness has size \(Dn\), original prime marginals \(Ds_p\), and marginal \(Dn\) for every \(u\in U\). If \(U\) is nonempty, these last marginals force every realisation of size at most \(Dn\) to have exactly \(Dn\) states, all on cycles with lengths divisible by \(D\). Dividing the lengths by \(D\) recovers the original instance. Thus the lifted optimum is unique and its support is unchanged. For \(U=\varnothing\) this is the identity. The cost of this simple construction is that the marginals for \(u\in U\) are saturated. \end{remark} \begin{samepage} \begin{theorem}[Positive marginals in every coordinate]\label{thm:lower} For all sufficiently large \(k\) there is a marginal vector \(s\) on \(P_k\) with entries below \(M\) and a unique minimum-size realisation \(X\). Each \(p\in P_k\) occurs on some cycles of \(X\) and is absent from others, so \(0p_k\). Thus every candidate belongs to the principal support. Fix a missing pair \(a,b\in Q\). Its marked cycle of length \(r_1 L/(ab)\) fits in the quotient, so every divisor of \(L/(ab)\) fits as well. This gives at least \(2^{|Q|-2}\) candidates out of at most \(2^k\) divisors of \(M\). In short, \(2^{\Theta(k)}\) lengths pass this test, and the only quotient uses \(\sim\tfrac12 k^2\log_2\log k\) of them. In terms of the number of input states \(N=|A_k|+|B_k|\), the latter count is \((\log N)^{2+o(1)}\). Indeed, \(N=|A_k|(1+n)\), \(M/2\le|A_k|\le kM\) and \(nT\). If \(Y\) uses \(h\) lengths in this group, their quotients \(d/D_g\) are distinct positive integers, so \(h(h+1)/2\le w_g\). The total number of lengths used in these groups is at most \(\sum_{w_g>T}\sqrt{2w_g}\le\sqrt{2}\,W/\sqrt T\). It remains to count the lengths in the groups with \(w_g\le T\). Take a subset \(E\) of these lengths, one copy of each. Record the normalised sum \(\sum_{d\in E\cap g}d/D_g\) for each such group \(g\) and the marginal \(\sum_{d\in E:\,p\mid d}d\) for each prime \(p\le T\). These data determine the subset's other marginals as well. Indeed, if \(p>T\) divides a length \(d=D_gm\) in one of the groups, then \(m\le w_g\le T\), so \(p\mid D_g\). Every state counted in that group contributes to the \(p\)-marginal. The recorded group sum determines that contribution. If two different subsets had the same data, their difference would give an exchange with coefficients in \(\{-1,0,1\}\) preserving every group's mass and every marginal. Since all lengths are positive and the total mass is preserved, the exchange has both signs. Repeat it until the first length being subtracted disappears. This produces a realisation with fewer lengths among the same choices, contradicting the definition of \(Y\). If these groups contain \(h_0\) lengths of \(Y\), the \(2^{h_0}\) subsets therefore give different records. There are at most \[ (n+1)^{\pi(T)}\prod_{g:\,w_g\le T}(1+w_g) \] records. Take base-two logarithms and use concavity to bound \(\sum_g\log_2(1+w_g)\le G\log_2(1+W/G)\). Adding the count for the groups with \(w_g>T\) proves the theorem. \end{proof} \begin{samepage} \subsection*{The scale of the lower bound} \begin{corollary}[The missing-pair class]\label{cor:pairclass} Work with the first \(k\) primes \(P_k\). Suppose some optimum \(X\) of size \(n=F(s)\) has the following property. There is a set \(Q\subseteq P_k\), with \(q=|Q|\ge3\) and \(L=\prod_{a\in Q}a\), such that each cycle length of \(X\) misses exactly two primes of \(Q\), and \(n-s_ay}}p,\qquad K_y=\prod_{\substack{p\in P\\p\le y}}p,\qquad H=\min\{n,\sigma(M_P)-1\}, \] where \(\sigma\) denotes the sum of positive divisors. If some optimum has \(G_y\) distinct values of \(D_y(d)\) on its lengths, then the same marginals have an optimum with at most \[ G_y\log_2\bigl(1+\sigma(K_y)\bigr)+\pi(y)\log_2(1+H) \] distinct lengths. In particular, for \(P=P_k\) and \(y=\log\log k\), the condition \(G_y=O(k^2)\) gives \(O(k^2\log\log k)\) lengths. \end{proposition} \end{samepage} \begin{proof} Group the lengths by \(D_y(d)\). In any group the normalised lengths \(d/D_y(d)\) are distinct divisors of \(K_y\), so the sum of any subset lies between \(0\) and \(\sigma(K_y)\). The subset has at most \(n\) states and uses each divisor \(d>1\) of \(M_P\) at most once. Hence its marginal at each \(p\le y\) lies between \(0\) and \(H\). For \(p>y\), either every length of a given group is divisible by \(p\), or none is. The exchange argument of Theorem~\ref{thm:grouping} therefore counts all the lengths using these group sums and small-prime marginals alone. We have \(\log\sigma(K_y)\le\sum_{p\le y}\log(1+p)=O(y)\). For the first \(k\) primes, \(\log(1+H)\le\log\sigma(M_{P_k}) =\sum_{p\in P_k}\log(1+p)=O(k\log k)\), uniformly in the marginal sizes. Taking \(y=\log\log k\) for sufficiently large \(k\) gives \(\pi(y)\log_2(1+H)=o(k^2)\). This proves the final assertion. \end{proof} For example, an optimum has \(G_y=O(k^2)\) if every cycle misses at most two primes above \(y\). The same conclusion holds for missing triples if every pair occurs in only \(O(1)\) distinct triples. Neither example needs a bound on \(n-s_a\). The distinction between the two ways of grouping matters already in Theorem~\ref{thm:lower}. Take \(y=\log\log k\). All primes in \(Q\) exceed \(y\). For every marker \(r_h>y\) the large-prime part of \(d_e r_h\) is the full length \(d_e r_h\). The superincreasing markers leave at most \(1+\log_2 y\) markers at most \(y\), giving \(\binom q2(t-O(\log y))=(\tfrac12-o(1))k^2\log_2\log k\) different large-prime parts. Grouping by the missing pair alone uses just \(\binom q2\) groups and has \(W=O(k^2\log k)\). \subsection*{How many lengths can one pair carry?} \begin{samepage} \begin{proposition}[One pair]\label{prop:onepair} In Corollary~\ref{cor:pairclass}, fix one witnessing optimum \(X\) and the normalised masses \(z_e\) of its pair groups. Consider the realisations with these marginals and masses in which each length misses exactly two primes of \(Q\). Every such realisation with smallest total support uses \[ O\!\left(1+\sqrt{\frac{z_e}{\log(2+z_e)}}\right) \] distinct lengths in each group \(e\). Examples attain this order in one group. \end{proposition} \end{samepage} The restriction to these lengths fixes the total size at \(\sum_e d_ez_e=F(s)\). Allowing other lengths could add states outside the groups while preserving the same \(z_e\). \begin{proof} Choose a support-minimising member \(Y\) of the stated family. Such a member exists because the family contains \(X\) and has fixed total size. In one group write \(d=d_e m\) and \(z=z_e\). The sum of the positive integers \(m\), with multiplicities, is \(z\), which settles the claim for bounded \(z\). For large \(z\), split the lengths at a threshold \(U\). Each \(m>U\) uses more than \(U\) units of mass, so there are at most \(z/U\) such lengths. For \(m\le U\) we use the prime marginals to count subsets. This gives at most \(\log_2(1+z)+O(U/\log(2+U))\) lengths, as we show below. To balance the two terms that depend on \(U\), take \(U=\sqrt{z\log(2+z)}\). Let \(\mathcal M\) be the distinct used values \(m\le U\). To distinguish subsets \(\mathcal S\subseteq\mathcal M\), record \[ \sum_{m\in\mathcal S}m,\qquad \left(\sum_{\substack{m\in\mathcal S\\p\mid m}}\frac mp\right)_ {p\le U,\ p\ \mathrm{prime}} . \] The first coordinate preserves the group mass. For a prime \(p\mid d_e\) this already preserves its marginal. For \(p\nmid d_e\) and \(p\le U\), the corresponding coordinate times \(pd_e\) gives the marginal of the chosen subset. A prime larger than \(U\) cannot divide any \(m\) in this subset. Equal records would therefore allow us to exchange copies in this group up to the first disappearing length, as in Theorem~\ref{thm:grouping}. This would reduce the total support of \(Y\). There are at most \(1+z\) choices of the first coordinate. For each \(p\le U\), the distinct possible values \(m/p\) belong to \(\{1,\ldots,j_p\}\), where \(j_p=\lfloor U/p\rfloor\). Their subset sums are at most \(j_p(j_p+1)/2\). Taking logarithms gives \[ |\mathcal M| \le \log_2(1+z)+2\sum_{p\le U}\log_2(1+U/p). \] For \(U\ge2\) the last sum, up to the choice of logarithm base, is bounded by \[ \pi(U)\log 2+\sum_{p\le U}\log(U/p) =\pi(U)\log 2+\int_2^U\frac{\pi(t)}t\,dt =O\!\left(\frac U{\log(2+U)}\right). \] The integral identity follows by summing \(\int_p^U dt/t\). For the estimate, split at \(\sqrt U\) and use \(\pi(t)=O(t/\log t)\). Adding \(z/U\) for the large values of \(m\) proves the bound in every group of the same \(Y\). \smallskip\noindent\emph{Sharpness.} The scale in the bound suggests using many distinct primes of comparable size. Let \(R\) be the primes in \((x,2x]\), for \(x\ge3\), and put \(w=2\sum_{r\in R}r\). Choose distinct primes \(a,b,c>4w\) and take \(Q=\{a,b,c\}\). Work over an initial prime set containing \(\{2\}\cup R\cup Q\), with all unused marginals zero. Set \[ X_*=\sum_{r\in R}C_{2ra}+C_b+C_c,\qquad n=aw+b+c. \] Its \(Q\)-marginals are \(aw,b,c\), respectively. A length containing two primes of \(Q\) would already exceed one of these marginals. Thus every realisation has size at least their sum \(n\). The witness attains equality, forcing every state of every optimum to be counted by exactly one prime of \(Q\). The three normalised group masses are \(w,1,1\), and the missing masses satisfy \(b+c1\). Thus in every case the columns span a proper sublattice of \(\mathbb Z^{k+1}\). To cover all targets one would already have to represent the normalised unit vectors \((\mathbf e_i,0)\) and \((\mathbf 0,1)\), whose marginals are admissible for \(k\ge2\). Together with Proposition~\ref{prop:signed}, this proves the optimality of \(k+2\) for a selection fixed in advance when \(k\ge4\). \paragraph{Fewer primes and fixed points.} For \(k=3\), all six singleton and pair lengths suffice because \(\gcd(6,10,15)=1\). The target \(s=(0,0,0), n=1\) requires six lengths even if they may be chosen after seeing the target. Indeed \(S-n=-1=6x_6+10x_{10}+15x_{15}+60x_{30}\), so reduction modulo \(5,3,2\) forces each of \(x_6,x_{10},x_{15}\) to be nonzero. In \(n-s_3-s_5\) all surviving terms other than \(2x_2\) are divisible by \(15\), so \(2x_2\equiv1\pmod{15}\). The other two singletons are forced by \(3x_3\equiv1\pmod{10}\) and \(5x_5\equiv1\pmod6\). In the order \(2,3,5,6,10,15,30\) a witness is \((-7,7,-1,-1,2,-1,0)\). For \(k=2\), the only available pair is \(6\), so the signed size equation has a solution precisely when \(n\equiv S\pmod 6\). If signed fixed points are allowed, \(x_p=s_p/p\) and \(x_1=n-S\) give a solution for every \(k\ge1\). There is also a comparison with general lattice bounds. For \(k\ge3\) all full-rank minors of the unnormalised matrix with columns \(d_S(\mathbf 1_S,1)\) are divisible by \(M\), since the entries in row \(p\) are divisible by \(p\). Taking the \(k\) singleton columns and one of the pair columns \(6,10,15\) gives minors with absolute values \(6M,10M,15M\), so the greatest common divisor of all full-rank minors is \(M\). Applying Theorem~1 of~\cite{aadlo} with the minor \(6M\) gives a signed support bound of \(k+3\). The explicit construction above gives \(k+2\) for \(k\ge4\). For comparison, see also the lattice bounds of Dubey and Liu \cite{dubeyliu}. For general nonnegative matrices the lower bounds of Berndt et al.~\cite{bjms} can reach order \(m\log\|A\|\) for \(m\) rows. The sharper estimate in Corollary~\ref{cor:pairclass} uses two properties of one optimum of size \(n\). Every cycle length misses exactly two primes of the same set \(Q\), and the missing mass in each row satisfies \(n-s_a0$. Taking $T=\max\{2,(\log k)^{2C}\}$ would then give the desired upper bound. The example in Theorem~\ref{thm:lower} explains why simply grouping by the primes larger than $\log\log k$ need not suffice. Can cycles missing three primes force more lengths than the pair class? For pairs, reducing row \(a\) modulo \(b\) leaves just the term for \(\{a,b\}\). For triples, every group \(\{a,b,c\}\) can contribute a term to that same congruence, one for each possible third prime \(c\). Understanding that ambiguity could also decide whether $m(k)/(k^2\log_2\log k)$ has a limit. There is a separate algorithmic question. Given the marginals $s$, how quickly can one compute $F(s)$? The examples proving the lower bound have large support, yet the proof recovers their optima from congruences and marker marginals. A bound on how many lengths must occur leaves room for an efficient way to find them. \appendix \section{Further details on the pair construction}\label{app:pair-checks} \subsection*{A boundary case with nine forced lengths} \begin{remark}[why the marker inequality is strict]\label{rem:strict} When a marker equals the sum of earlier markers, the last part of the proof can fail. Take \(Q=\{31,41,59,229\}\) and markers \(2,3,5\). The row inequalities still hold. The six bases \(d_e\) split into two triples of equal sum, since \[ 59(31+41+229)=31\cdot41+31\cdot229+41\cdot229=17\,759 . \] In each group of one triple replace the three normalised lengths \(2,3,5\) by \(5,5\). In each group of the other use \(2,2,3,3\). Every group still has size ten in its own units, and the equality of the two sums preserves each marker marginal. The size bound in the lemma used only the row inequalities, so this common size \(355\,180\) is still optimal. The original witness has 18 distinct lengths. The exchange produces an optimum with nine, the minimum for these marginals, as we now verify. \end{remark} Each of the six pair groups has normalised size ten. If a group bearing the marker \(3\) had only one length, its normalised length would both divide ten and be divisible by three. Hence every group bearing \(3\) uses at least two lengths. A support of at most eight would put all of the \(3\)-marginal in at most two groups. The six bases sum to \(35\,518\). The total \(3\)-marginal divided by three is therefore \(35\,518=\sum_e h_ed_e\), where \(h_e\) is the normalised mass bearing the marker in group \(e\), divided by three. A positive \(h_e\) can only be \(1,2,3\). Of the six bases, three are divisible by \(59\). For each of the other three bases, the possible residues of its positive contribution modulo \(59\) form one of the sets \[ \{8,16,24\},\qquad \{19,38,57\},\qquad \{32,5,37\}. \] The target is divisible by \(59\). No set contains zero and no two entries from different sets sum to zero modulo \(59\). A sum supported on at most two groups would therefore use only bases divisible by \(59\). After dividing by \(59\), we would have to make \(602\) with at most two of \(229,41,31\), using coefficients at most three. With no \(229\) the sum is at most \(216\). With one or two copies of \(229\) it is at most \(2\cdot229+3\cdot41=581\). Three copies already exceed \(602\). Thus at least three groups bear the marker \(3\), and at least nine lengths occur. The exchange in Remark~\ref{rem:strict} attains nine. \subsection*{What a single row determines} \begin{remark}[the arithmetic of one row]\label{rem:related} The congruence in \eqref{eq:pair-mass-row} has a classical interpretation. After we know that every cycle misses a pair, row \(a\) has precisely the generators \(H_a/c\) for \(c\in Q\setminus\{a\}\), with \(H_a=L/a\). For the additive semigroup generated by these numbers, \(H_a\) is the unique Betti element. A row total \(u\) in the semigroup admits more than one factorisation exactly when \(u-H_a\) belongs to the semigroup \cite[arXiv version, Proposition~1(a) and Example~12]{gor}. Here \(u=b_a0.8\cdot1741\) gives \(d_{e(u)}<2d_{\min}\), as in the proof of Theorem~\ref{thm:lower}. For comparison, one may optimise the simpler construction in Remark~\ref{rem:lift}, in which the unused primes have saturated marginals. For each suffix \(Q=\{p_{j_0},\ldots,p_k\}\) with \(q\ge3\), the largest reciprocal sum in \eqref{eq:pair-row-budget} occurs in the row \(a=p_k\). For each \(t\ge1\) the greedy marker sequence has the smallest possible sum of \(t\) markers. This follows inductively since both the next admissible prime and the running sum increase with the previous sum. We also allow the unmarked construction with \(t=0\) and \(w=1\). The support to maximise over feasible choices is consequently \(\max(1,t)\binom q2\). \begin{center} \begin{tabular}{rrrr} \toprule \(k\) & First index \(j_0\) & Markers \(t\) & Largest support in this family\\ \midrule 100 & 5 & 0 & \(4\,560\)\\ \(1\,000\) & 243 & 2 & \(573\,806\)\\ \(10\,000\) & \(1\,528\) & 2 & \(71\,783\,256\)\\ \(100\,000\) & \(9\,681\) & 2 & \(8\,157\,612\,080\)\\ \(1\,000\,000\) & \(61\,701\) & 2 & \(880\,405\,951\,700\)\\ \bottomrule \end{tabular} \end{center} The two markers in the last four examples are \(2,3\). These are maxima over the suffix construction described above. The asymptotic choice of parameters stops producing markers altogether when the budget \(W\) falls below two. For example, \(W=1\) for every integer \(k\) from \(84\) to \(896\,677\). A sufficient threshold for all the estimates used in Theorem~\ref{thm:lower} is \[ k\ge k_0=11\left\lceil\frac{\exp(\exp(11))}{11}\right\rceil . \] Here are the estimates. Put \(x=\log k\) and \(y=\log x\). Then \(y\ge11\), \(x>59874\), and \(y/x\le11/59874\). Using \(m\log m9k/11\), so \(p_m/p_k>9(x-1)/(11(x+y))>0.817\). The same estimates give \(W