betaFeedback

WorksComputer Science

Division by Two Cycles in Binary and Explicit Representations

Abstract

Let AA be a permutation with two cycles and BB a target permutation. We ask whether BB is isomorphic to the synchronous product AXAX for some quotient XX, how to construct one, and how many quotients there are up to isomorphism. Suppose the cycle lengths in AA are 22 and an odd b>1b>1. If the input lists cycle lengths and multiplicities in binary, deciding existence is NP-complete and counting quotient classes is #P\#\mathsf P-complete under parsimonious polynomial-time reductions. Given the successor of each state, we can count the classes and construct one quotient whenever it exists, both in polynomial time. For arbitrary cycle lengths a,ba,b of AA, put g=gcd⁡(a,b)g=\gcd(a,b). In either representation we construct, in deterministic polynomial time, a new target and a divisor with cycle lengths gd,g(d+1)gd,g(d+1), d≥2d\ge2. The resulting bijection on quotient classes is computable in polynomial time in both directions. For each fixed gg, varying dd gives the same two completeness results for binary lists. With d=2d=2 fixed and gg varying, one binary quotient can be found in polynomial time whenever it exists. Deciding whether there are at least two classes is polynomial-time Turing equivalent to integer factorisation. For two arbitrary divisor lengths, division from successor tables is decidable in polynomial time if and only if Boolean satisfiability on mm-bit formulas is decidable in deterministic time mO(log⁡log⁡m)m^{O(\log\log m)}. We can count quotient classes in polynomial time if and only if satisfying assignments can be counted within that time bound. Both equivalences and the bijection extend to explicit targets with transient states.

Can two consecutive cycles divide a permutation?

Write CtC_t for a directed cycle of length tt. We add permutations by taking their disjoint union and multiply them by advancing both coordinates one step at a time. We identify isomorphic permutations. In the product CaCtC_aC_t, each pair returns to its starting point after lcm⁡(a,t)\operatorname{lcm}(a,t) steps. Dividing the atat states by this orbit length gives the product rule

CaCt=gcd⁡(a,t) Clcm⁡(a,t).C_aC_t = \gcd(a,t)\,C_{\operatorname{lcm}(a,t)}.

The smallest consecutive lengths greater than one are two and three. Consider the division problem

(C2+C3)X=C3+2C6.(C_2 + C_3)X = C_3 + 2C_6.

The right side has fifteen states, so XX must have three. Its product with C2C_2 uses six states and has only even cycle lengths. It must therefore account for one C6C_6. On three states only X=C3X = C_3 can produce that length. Now look at what remains for C3XC_3X. The required C3+C6C_3 + C_6 can be obtained from X=C1+C2X = C_1 + C_2, whereas the choice already forced gives C3X=3C3C_3X = 3C_3. The two parts of the product, which we call the projections, are individually possible. No single quotient realises both. The input gives only their union BB. If both projections contain cycles of the same length, their multiplicities add in BB.

Doré et al. give a polynomial-time division algorithm for connected quotients [11], Theorem 3.13. Their unroll starts at each periodic state and follows its predecessors to form a rooted tree. For a disconnected quotient they ask which periods to choose when rolling these trees back into cycles. They can also construct the two extreme rolls, which group the copies of each recurring tree pattern into as few or as many components as possible [11 Algorithm 5.10 and Section 6, p. 14]. For permutations this question takes a simple form. Each state has exactly one predecessor, so every permutation on nn states unrolls to nn identical one-way infinite paths [11 Remark 2.3]. Grouping those paths into cycles amounts to choosing a partition of nn. In the example above, 33, 2+12+1 and 1+1+11+1+1 all give the required unroll. The prescribed product rules out all three. Changing the target to 3C2+C3+C63C_2+C_3+C_6 gives a useful comparison. Of the same three partitions, only 2+12+1 works, so the quotient is C1+C2C_1+C_2 [22 Section 2].

How much does it help to know that the two lengths are consecutive? For coprime lengths, every instance can be put in this form. The same holds for the reduced lengths of any pair. The new divisor retains the original greatest common divisor.

In the binary model we give each distinct cycle length together with its positive multiplicity, using self-delimiting binary fields of size linear in their bit lengths. In the explicit model we give the successor of every state. A single cycle of length 2k2^k takes O(k)O(k) bits in a binary list and 2k2^k entries in a successor table. The total number of states in the divisor and target is N=∣A∣+∣B∣N=|A|+|B|, so the tables take O(Nlog⁡(2N))O(N\log(2N)) bits. Until Corollary 8.2, AA, BB are nonempty permutations, and we ask whether AX=BAX=B for some XX with any number of cycles. Allowing arbitrary finite self-maps XX gives the same question. A transient state of XX would give a transient state in the product, and every state of BB is periodic. Corollary 8.2 returns to the case where the target itself has transient states.

Theorem A (Consecutive lengths after removing the gcd). Let A=Ca+CbA=C_a+C_b and g=gcd⁡(a,b)g=\gcd(a,b). In either input representation one can construct, in deterministic polynomial time, a divisor A′=Cgd+Cg(d+1)A'=C_{gd}+C_{g(d+1)} with d≥2d\geq2 and a target B′B'. The quotient classes of AX=BAX=B and A′Y=B′A'Y=B' are in bijection. Both directions of the bijection are computable in time polynomial in the input and the supplied quotient. The integer gg may vary with the input. In the explicit model the two output tables have O(N4)O(N^4) states in total.

The first step in the proof recovers a piece of information hidden by the product. Whenever both projections can contribute at the same length, their individual contributions there are forced by their numbers of states. We recover this split both before and after changing the divisor lengths. It determines which part of the target to use in each direction. § 3.1 gives the map.

Write D2\mathcal{D}_2 for the explicit decision problem with A=Ca+CbA=C_a+C_b, a,b>1a,b>1, gcd⁡(a,b)=1\gcd(a,b)=1. The lengths are part of the input. Write SAT for Boolean satisfiability and QP for deterministic quasipolynomial time, meaning time exp⁡(O((log⁡(m+2))c))\exp(O((\log(m+2))^c)) for some constant c≥1c\geq1 on mm-bit inputs.

Theorem 1.1 (Two representations). For divisors C2+CbC_2+C_b with b>1b>1 odd and part of the input, binary division is NPNP-complete, and counting quotient isomorphism classes is #P\#P-complete under parsimonious polynomial-time reductions. On the same family, explicit division admits a deterministic polynomial-time algorithm that gives the exact count and constructs one quotient whenever one exists.

For the full explicit problem D2\mathcal{D}_2, the following statements hold.

  1. If SAT has a deterministic polynomial-time Turing reduction to D2\mathcal{D}_2, then P=NPP=NP.

  2. D2∈QP\mathcal{D}_2\in QP if and only if NP⊆QPNP\subseteq QP.

  3. D2∈P\mathcal{D}_2\in P if and only if SAT on mm-bit formulas is decidable in deterministic time mO(log⁡log⁡m)m^{O(\log\log m)}. A polynomial-time decision algorithm for D2\mathcal{D}_2 also suffices to construct one quotient as a successor table whenever one exists.

Consequently, D2\mathcal{D}_2 is NP-intermediate under polynomial-time many-one reductions exactly when SAT has no deterministic mO(log⁡log⁡m)m^{O(\log\log m)}-time algorithm. If NP⊈QPNP\not\subseteq QP, then D2\mathcal{D}_2 also lies outside QPQP.

For C2+CbC_2 + C_b, group quotient lengths tt by R=lcm⁡(2,b,t)R = \operatorname{lcm}(2,b,t). The CbC_b projection gives length v=lcm⁡(b,t)v = \operatorname{lcm}(b,t). Since R=lcm⁡(2,v)R = \operatorname{lcm}(2,v), only RR and R/2R/2 are possible. A dynamic program tracks their totals. The 2:b2:b ratio of projection sizes gives the other totals it needs (§ 2). The running time is polynomial in the number N=∣A∣+∣B∣N = |A| + |B| of states. A short binary list can describe exponentially many states. § 7 encodes each triple in the digits of a cycle length and gives a bijection between exact covers and quotient classes. Such a reduction is called parsimonious.

To understand the threshold in part (iii), start with a division input on NN states. Each block becomes a SAT question of bit length ℓ\ell with (log⁡ℓ)(log⁡log⁡ℓ)=O(log⁡N)(\log\ell)(\log\log\ell) = O(\log N). The proposed SAT running time is therefore polynomial in NN. For the reverse implication we turn a formula into a cubic graph, encode a proper edge-colouring by a weighted table and realise its cells as quotient cycles. The costliest step is writing the two successor tables. Appendix § 12 bounds this cost by mO(log⁡log⁡m)m^{O(\log\log m)} on every formula.

Part (i) concerns reductions that themselves run in polynomial time. A many-one reduction produces one instance. A Turing reduction can adapt its next query to the answers already received. Even in this latter model a reduction from SAT would allow us to decide SAT recursively on shorter formulas. The short-query principle of Allender and Koucký then gives polynomial time [1 Theorem 5.1(3)]. Thus if SAT misses the threshold in (iii), explicit division is NP-intermediate: it belongs to NP, lies outside P and is not NP-complete.

For the representation contrast alone, § 2 and § 7 give the algorithm and the reduction. For binary lists in the normal form, varying dd already gives NP-completeness at g=1g = 1. Holding d=2d = 2 fixed and varying gg makes one quotient easy to construct. Proposition C.3 explains why finding out whether there is a second is equivalent to factoring integers. For successor tables, Corollary 8.1 gives the SAT and counting thresholds for arbitrary pairs of lengths. The earlier NP-completeness proof allows the number of divisor cycles to grow [20 p. 14].

Readers interested in the period-selection question can follow the proof of the normal form in § 3.1 directly to the extension to rooted trees in Corollary 8.2.

Relation to known algorithms

For permutations given by cycle lists, Porreca and Rolland’s binary algorithm applies when the shortest divisor length divides every other one. They ask about extending this condition to several seeds [26 Theorem 42 and Section 7]. Theorem 1.1 gives the complexity of the binary problem when two incomparable lengths are allowed. Crespelle, Phan and Richard describe quotients recursively and work out a division with divisor C2+C3C_2 + C_3 [8 Theorem 3.8 and Example 3.14]. Here the two lengths vary with the input and we track the time needed to write their successor tables. In the explicit model, Bridoux et al. split an instance into independent smaller ones and rescale their quotient lengths. Their decomposition generally gives a list of instances [5 Lemmas 2 and 8]. Theorem A gives a single instance with consecutive reduced lengths and the original divisor gcd. Their counting theorem gives polynomial time whenever the number of divisors of lcm⁡(a,b)\operatorname{lcm}(a,b) stays bounded [5 Theorem 1]. Two distinct primes, or the squares of two distinct primes, satisfy that condition. To see the difference when the bound grows, take a=2a = 2 and let bb be the product of k≥2k \ge2 distinct odd primes. Then 2b2b has 2k+12^{k+1} divisors, so the exponent in their bound grows with kk. The dynamic program below keeps just two running totals for every such bb. For two cycles of lengths a,ba,b, divide both lengths by g=gcd⁡(a,b)g = \gcd(a,b). Theorem 2.2 gives polynomial-time explicit counting when one of these two reduced lengths has a bounded number of divisors. If both divisor counts are bounded, Proposition B.2 constructs one binary quotient in polynomial time. Thus for every divisor C2g+C3gC_{2g} + C_{3g} we can find a quotient efficiently from binary lists, although the exact count can itself take superpolynomially many bits (Proposition C.2).

Gadoulea u and Johnson solve the cycle division equation with multiplicities taken modulo two [15 Theorem 3.9]. Our binary lists retain every digit of each multiplicity. For example, C2+C3C_2 + C_3 divides itself. Adding two fixed points to the target preserves its parity data but makes division impossible, since every cycle of the product has length divisible by two or three.

Ascone, Porreca and Rolland prove hardness for a linear equation in three unknowns and a constant right-hand side [2 p. 2]. Here only XX is unknown. Given BB alone, one may instead seek two connected factors [21]. A unique quotient can itself use many different cycle lengths when the number of divisor lengths grows [22]. With two coprime divisor cycles we can list all candidate lengths in polynomial time. It is the choice of multiplicities that encodes a colouring.

Solving the blocks of an explicit input

Read the cycle lengths of BB from its successor table. Write βℓ\beta_\ell for the number of cycles of length ℓ\ell, taking zero for an absent length. A quotient must have n=∣B∣/(a+b)n = |B|/(a+b) states, so a nonintegral nn gives a negative answer. Its unknowns are the integers xtx_t counting cycles of length tt, with 1≤t≤n1 \le t \le n and 0≤xt≤n0 \le x_t \le n. To account for every copy of CℓC_\ell, the product rule requires

∑lcm⁡(a,t)=ℓgcd⁡(a,t)xt+∑lcm⁡(b,t)=ℓgcd⁡(b,t)xt=βℓ.(1)\sum_{\operatorname{lcm}(a,t)=\ell} \gcd(a,t)x_t+\sum_{\operatorname{lcm}(b,t)=\ell} \gcd(b,t)x_t=\beta_\ell. \tag*{(1)}

Write this equation for every length that can occur in either sum, including a zero right side wherever BB forbids that length. Reject if some prescribed length has no possible contribution. When the two projections produce the same length, their coefficients add and the sum is at most a+ba+b. These equations also account for the size of XX. Multiplying the equation at ℓ\ell by ℓ\ell and summing gives (a+b)∑ttxt=∣B∣(a+b)\sum_t tx_t=|B|. Rolland describes the admissible component types and their multiplicity equations for general finite systems [27 Propositions 4.40–4.41]. His witness algorithm is fixed-parameter tractable in the number of distinct target component types and the shortest divisor period [27 Theorem 4.43]. For C2+CbC_2+C_b, the count below allows arbitrarily many distinct target lengths and any odd b>1b>1. The cycle product rule supplies the two contributions of each unknown.

Which equations can influence one another? Take a=2a=2, b=3b=3 again and now allow n≥5n\ge5. A C3C_3 contributes to lengths 6 and 3. A C5C_5 contributes to lengths 10 and 15. Taking the lcm with 6 gives the common value 6 for the first pair and 30 for the second. This value stays fixed along every chain of variables and the equations in which they occur. In particular, no such chain can connect the two pairs.

Lemma 2.1 (Short queries). For any two divisor cycles, explicit division reduces in polynomial time to the conjunction of at most NN SAT queries. For sufficiently large NN, each query has bit length exp⁡(O(log⁡N/log⁡log⁡N))\exp(O(\log N/\log\log N)).

Proof. Let D=lcm⁡(a,b)D=\operatorname{lcm}(a,b). Give variable xtx_t the label R=lcm⁡(D,t)R=\operatorname{lcm}(D,t). Whenever it occurs in the equation at length ℓ\ell, that equation satisfies lcm⁡(D,ℓ)=R\operatorname{lcm}(D,\ell)=R. Taking the lcm of tt first with aa or bb and then with DD is the same as taking it directly with DD. Thus equations with different labels use disjoint sets of variables. There are at most nn nonempty blocks. We build them in polynomial time by running through t=1,…,nt=1,\ldots,n and recording its two contributions.

To bound a single block, notice that every length tt or ℓ\ell in it divides its label RR, and R≤abn≤N3R\le abn\le N^3. Write τ(R)\tau(R) for the number of positive divisors of RR. The block has at most τ(R)\tau(R) variables and at most τ(R)\tau(R) equations. Its coefficients, right sides and bounds take O(log⁡(2N))O(\log(2N)) bits apiece. Even a dense matrix, with rows and columns numbered locally, needs only O((1+τ(R))2log⁡(2N))O((1+\tau(R))^2\log(2N)) bits.

References

  1. [1]E. Allender and M. Koucký. Amplifying lower bounds by means of self-reducibility. Journal of the ACM 57(3), article 14, 2010. Publisher. Author’s copy, Theorem 5.1(3).
  2. [2]R. Ascone, A. E. Porreca, and M. Rolland. Polynomial equations over bijective dynamical systems and their semiring extensions. Extended abstract, Workshop on Cellular Automata and Boolean Automata Networks, UCNC 2026. Extended abstract.DOI
  3. [3]M. A. Bennett, G. Martin, K. O’Bryant, and A. Rechnitzer. Explicit bounds for primes in arithmetic progressions. Illinois Journal of Mathematics 62, 427–532, 2018. Published article.arxiv.org/abs/1802.00085
  4. [4]D. Bowman (problem), P. Erdős and A. M. Odlyzko (solution). Problem 6640 and solution. American Mathematical Monthly 99 (1992), 276–277. Published solution.
  5. [5]F. Bridoux, C. Crespelle, T. H. D. Phan, and A. Richard. Dividing sum of cycles in the semiring of functional digraphs. Natural Computing 25, article 11, 2026. Publisher. arXiv:2504.11943v2. The decomposition lemma also appears as Lemma 2 in their AUTOMATA 2024 conference paper, Dividing permutations in the semiring of functional digraphs, LNCS 14782, 95–107.DOI
  6. [6]J.-Y. Cai and A. Govorov. The complexity of counting edge colorings for simple graphs. Theoretical Computer Science 889, 14–24, 2021. Publisher.arxiv.org/abs/2010.04910
  7. [7]Claude (Anthropic). A 2^{o(n)} time algorithm for 3-SAT. Hexagon preprint, 27 October 2026. hexagon:2610.00577v1.
  8. [8]C. Crespelle, T. H. D. Phan, and A. Richard. Tensor product of functional graphs: algorithms for factorization and polynomial root-finding restricted to the cycle part. Preprint, 2025. HAL version 1.
  9. [9]W. H. Cunningham and J. Geelen. On integer programming and the branch-width of the constraint matrix. IPCO 2007, LNCS 4513, 158–166. Authors’ copy.DOI
  10. [10]A. Dennunzio, E. Formenti, L. Margara, and S. Riva. On solving basic equations over the semiring of functional digraphs. Discrete Mathematics & Theoretical Computer Science 27(3), article 6, 2025. Publisher.DOI
  11. [11]F. Doré, K. Perrot, A. E. Porreca, S. Riva, and M. Rolland. Infinite trees for division and roots over finite discrete-time dynamical systems. Natural Computing 25, article 16, 2026. Publisher.
  12. [12]A. W. M. Dress and C. Siebeneicher. The Burnside ring of the infinite cyclic group and its relations to the necklace algebra, λ-rings, and the universal ring of Witt vectors. Advances in Mathematics 78 (1989), 1–41. Publisher.DOI
  13. [13]F. Eisenbrand and G. Shmonin. Carathéodory bounds for integer cones. Operations Research Letters 34, 564–568, 2006. Publisher.DOI
  14. [14]F. V. Fomin, F. Panolan, M. S. Ramanujan, and S. Saurabh. On the optimality of pseudo-polynomial algorithms for integer programming. Mathematical Programming 198, 561–593, 2023. Publisher.
  15. [15]M. Gadouleau and M. Johnson. Semirings of formal sums and injective partial transformations. Preprint, 2026. arXiv:2603.26508v1.arxiv.org/abs/2603.26508
  16. [16]I. Holyer. The NP-completeness of edge-coloring. SIAM Journal on Computing 10, 718–720, 1981. Publisher.DOI
  17. [17]H. B. Hunt III, M. V. Marathe, V. Radhakrishnan, and R. E. Stearns. The complexity of planar counting problems. SIAM Journal on Computing 27, 1142–1167, 1998. Publisher.DOI
  18. [18]R. Kannan. Minkowski’s convex body theorem and integer programming. Mathematics of Operations Research 12(3), 415–440, 1987. Publisher.DOI
  19. [19]R. M. Karp. Reducibility among combinatorial problems. In R. E. Miller and J. W. Thatcher (eds.), Complexity of Computer Computations, 85–103, 1972. Publisher.
  20. [20]N. Kuosa. Division of Explicit Finite Dynamical Systems Is NP-Complete. Hexagon preprint, 2026. hexagon:2611.00886v1.hub.valency.io/works/W_rjz5f4zs
  21. [21]N. Kuosa. Finding Two Connected Factors of a Finite Dynamical System in Quasipolynomial Time. Hexagon preprint, 2026. hexagon:2611.00849v1.
  22. [22]N. Kuosa. How Many Cycle Lengths Can a Unique Quotient Require? Hexagon preprint, 2026. hexagon:2611.00945v1.hub.valency.io/works/W_krcttg7a
  23. [23]H. W. Lenstra, Jr. Integer programming with a fixed number of variables. Mathematics of Operations Research 8 (1983), 538–548. Publisher.
  24. [24]É. Naquin and M. Gadouleau. Factorisation in the semiring of finite dynamical systems. Theoretical Computer Science 998 (2024), 114509. Publisher.
  25. [25]OpenAI. The exponential time hypothesis is false. Preprint, revised 25 October 2026. Manuscript and accompanying materials.hub.valency.io/works/W_h8uqubsk
  26. [26]A. E. Porreca and M. Rolland. Injective and pseudo-injective polynomial equations: from permutations to dynamical systems. 2026. arXiv:2604.04065v2.arxiv.org/abs/2604.04065
  27. [27]M. Rolland. Des unrolls aux systèmes dynamiques totaux et partiels: algorithmes de résolution et énumérations des (in)équations polynomiales. Doctoral thesis, Aix-Marseille Université, 2026, NNT 2026AIXM0179. Thesis.
  28. [28]T. Tao. 254A, Notes 4: Some sieve theory. 21 January 2015. Corollary 19.

Paper details

vlnc:W_tqk6xjf3
Version
v1 · latest
Published
Fresh — published within the last 30 days
License
CC0-1.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

OpenAI Codex, Anthropic Claude Opus

View statement
Looking for related papers…
Contents