betaFeedback

WorksComputer Science

Division of Explicit Finite Dynamical Systems Is NP-Complete

Abstract

Given the successor tables of two finite dynamical systems AA and BB, can we find a system XX whose synchronous product with AA is isomorphic to BB? We prove that deciding whether such an XX exists is NP-complete even when AA and BB are permutations. This answers a question of Naquin and Gadouleau. Different cycle lengths in XX can contribute to the same cycle length in BB. We use their multiplicities to encode a 3-SAT formula so that its satisfying assignments correspond bijectively to quotient isomorphism classes. Counting these classes for permutation inputs is #P\#\mathrm{P}-complete under parsimonious reductions. Hardness holds with distinct, pairwise coprime, squarefree cycle lengths in AA and squarefree cycle lengths in BB. For a formula with nn variables and mm clauses, the two output tables can be constructed with (n+m)5+o(1)(n+m)^{5+o(1)} states in total.

The division problem

A finite dynamical system is a nonempty finite set with a map to itself. Given systems AA and BB, can we label the states of BB by pairs (a,x)(a,x) so that the first coordinate follows AA and the second follows a single map XX? We write AX=BAX=B if a bijection identifies the transition of BB with (a,x)↦(A(a),X(x))(a,x)\mapsto(A(a),X(x)), and call XX a quotient. Its isomorphism class is a quotient class. The input lists the successor of every state in AA and BB. The quotient may have any number of connected components.

Even a four-state permutation can have two different quotients. Write CdC_d for one dd-cycle and ++ for disjoint union. Take A=C2A=C_2 and B=2C2B=2C_2. If X=2C1X=2C_1, the product has one 2-cycle above each fixed point of XX. If X=C2X=C_2, label both factors by 0 and 1. The product swaps (0,0)(0,0) with (1,1)(1,1) and (0,1)(0,1) with (1,0)(1,0). Both quotients therefore give BB.

More generally, a pair of states on cycles of lengths a,ba,b first returns to its starting position after lcm⁡(a,b)\operatorname{lcm}(a,b) steps. The abab pairs therefore split into ab/lcm⁡(a,b)=gcd⁡(a,b)ab/\operatorname{lcm}(a,b)=\operatorname{gcd}(a,b) cycles of this length, giving

CaCb=gcd⁡(a,b)Clcm⁡(a,b).(1)C_aC_b=\operatorname{gcd}(a,b)C_{\operatorname{lcm}(a,b)}. \tag*{(1)}

A permutation is determined up to isomorphism by the number of its cycles of each length.

Naquin and Gadouleau asked whether division is NP-complete for general systems and raised the question even “on cycles” [11 §7, p. 17]. Doré et al. recorded the exact complexity of division as unknown [6 §1]. After solving division for connected quotients, they identified removing the connectivity assumption as a main research direction [6 §6].

Theorem 1. Deciding whether AX=BAX=B for some finite system XX is NP-complete under polynomial-time many-one reductions for explicitly listed successor tables. NP-hardness holds when AA and BB are permutations, the cycles of AA have distinct, squarefree, pairwise coprime lengths, and every cycle length of BB is squarefree.

Proof idea. Suppose X=uC7+vC21+wC35X=uC_7+vC_{21}+wC_{35}. Multiplication by C15C_{15} sends all three lengths to 105, with multiplicities u,3v,5wu,3v,5w. Thus one entry of the product reads the weighted sum u+3v+5wu+3v+5w. We choose cycle lengths so that several such sums read overlapping parts of an array. Section 2 encodes intervals on these sums by a single division equation. Section 3 uses sums of two bits to copy a truth value and sums of three bits to test clauses. Each satisfying assignment gives one quotient up to isomorphism. Reading its cycle multiplicities recovers the assignment.

Membership in NP. Dennunzio et al. established membership in NP for polynomial equations with a constant side [4 Thm. 2]. For division, if ∣A∣|A| divides ∣B∣|B|, guess a successor table on ∣B∣/∣A∣|B|/|A| states and a bijection from its product with AA to BB. Bijectivity and commutation with the two maps can be checked entry by entry. If ∣A∣|A| does not divide ∣B∣|B|, reject. If BB is a permutation, surjectivity of the product also forces XX to be a permutation.

Why one unknown matters. Porreca reported NP-completeness for a single linear equation with a constant right-hand side and a variable number of unknowns, crediting joint work with Bridoux and Naquin-Touileb [13]. Ascone, Porreca and Rolland proved NP-hardness for linear permutation equations with three unknowns and asked how many unknowns suffice [1 p. 2]. Porreca and Rolland singled out AX=BAX = B as unclassified [14 §1]. Gadouleau and Johnson also recorded the problem as open for permutations [8 §1]. Theorem 1 answers the variable-count question for these linear equations. One unknown suffices even when every input state is listed. The same instances establish hardness for permutations specified by cycle lengths and multiplicities in binary, since traversing the successor tables gives those lists in polynomial time.

Where polynomial algorithms apply. The algorithms for restricted cases depend on what we know about the divisor or the quotient in advance. Doré et al. find a connected quotient, when one exists, in polynomial time [6 Thm. 3.13]. Their final question asks for two unknown connected factors when only the target is given [6 §6].

For permutation inputs, let mAm_A be the least common multiple of the cycle lengths of AA, and let τ(mA)\tau(m_A) count its positive divisors. After the size check ∣A∣∣∣B∣|A| \mid|B|, Bridoux et al. count quotient classes in time O(∣B∣3(∣B∣/∣A∣)τ(mA))O\left(|B|^3(|B|/|A|)^{\tau(m_A)}\right) [2 Thm. 1, eq. (2)]. This gives one polynomial bound for every family on which τ(mA)\tau(m_A) has a constant upper bound, including the case of a fixed AA. They also decide division in polynomial time when every cycle length of AA greater than one is prime, however many such lengths occur. In that case they can list all solutions in polynomial time when every cycle length of BB divides mAm_A [2 §§4–6]. Dennunzio et al. decide CpX=nCqC_pX = nC_q in polynomial time even when p,q,np,q,n are encoded in binary [5 Thm. 4].

Porreca and Rolland solve division in polynomial time when the shortest divisor cycle length divides all the others [14 §1], as part of their treatment of pseudo-injective equations [15 Thm. 6]. A fixed point in the divisor guarantees uniqueness whenever a solution exists [11 Thm. 34]. Polynomial algorithms are also known for pure permutation roots [16, 12, 15]. Gadouleau et al. relate polynomial-time division for partial and total systems [9].

Rolland gives a fixed-parameter algorithm for division, parameterized jointly by the number of distinct connected component types of BB and the shortest cycle length of AA [17 Thm. 4.43, p. 159]. In our reduction the shortest divisor cycle has length two, while the number of distinct target cycle lengths grows with the formula. The divisor has Θ(log⁡N/log⁡log⁡N)\Theta(\log N/\log\log N) cycles, where N=∣A∣+∣B∣N=|A|+|B|.

After the reduction, § 4 bounds its cost in states, § 5 checks small instances, and § 6 treats scalar polynomials and uniqueness.

Realizing intervals by permutation division

Give each of three literal bits a positive weight. The interval from the smallest weight to the sum of all three accepts exactly the triples with at least one true bit. How can one product equation enforce both endpoints?

Write [Cd]Y=yd[C_d]Y=y_d for the coefficient of CdC_d in a finite sum Y=∑dydCdY=\sum_d y_dC_d. We extend the cycle product bilinearly to rational coefficients while constructing the target. A sum represents an actual nonempty permutation when its coefficients are nonnegative integers and at least one is positive.

Think of a rectangular array, with one prime labelling each position along an axis. We use different primes on different axes so that a site can be identified from the product of its labels alone. Take D≥2D \ge2 pairwise disjoint finite sets of primes HjH_j, each with at least two elements. Write Qj=∏p∈HjpQ_j = \prod_{p \in H_j} p and choose a prime ω\omega outside all the groups. A site is a full tuple and a face is a partly or fully specified tuple. Their respective sets are

V=∏j=1DHj,E=∏j=1D({1}∪Hj).V = \prod_{j=1}^{D} H_j,\qquad E = \prod_{j=1}^{D}(\{1\} \cup H_j).

The label 1 leaves a coordinate unspecified. A face with just one unspecified coordinate is a line. For e∈Ee \in E, put de=∏jejd_e = \prod_j e_j and let s(e)s(e) count its unspecified coordinates. Write v⪰ev \succeq e when v∈Vv \in V agrees with all specified coordinates of ee. Because the QjQ_j are coprime, the factors ej=gcd⁡(de,Qj)e_j = \gcd(d_e,Q_j) can be read back from ded_e.

We store an entry 0≤xv≤κv0 \le x_v \le\kappa_v at each site vv, with integral capacity κv≥0\kappa_v \ge0. A site is active if its capacity is positive. On a face ee, the weight of an entry is the product of its labels in the unspecified coordinates. The weighted sum and its maximum are therefore

fe(x)=∑v⪰edvdexv,We=fe(κ).(2)f_e(x) = \sum_{v \succeq e} \frac{d_v}{d_e}x_v,\qquad W_e = f_e(\kappa). \tag*{(2)}

Give each ee an integral interval [Le,Re]⊆[0,We][L_e,R_e] \subseteq[0,W_e]. At a site require [Lv,Rv]=[0,κv][L_v,R_v] = [0,\kappa_v]. A feasible array satisfies Le≤fe(x)≤ReL_e \le f_e(x) \le R_e for every ee.

A one-bit example. Take the prime groups {3,5}\{3,5\} and {7,11}\{7,11\}, with ω=2\omega= 2. Give the site (3,7)(3,7) capacity one and every other site capacity zero. There is just one entry to choose, x=x(3,7)x = x_{(3,7)}. At (1,7)(1,7) the weighted sum is 3x3x, since d(3,7)/d(1,7)=21/7=3d_{(3,7)}/d_{(1,7)} = 21/7 = 3. Give every other face its full interval [0,We][0,W_e]. The interval at (1,7)(1,7) then makes the following choices possible.

The last column explains the rational feasibility assumption in the next lemma. Neither bit works, yet x=12x = \frac{1}{2} gives 3x=323x = \frac{3}{2}. As the lemma shows, we can still construct a target permutation BB for this interval. The resulting equation (C2+C15+C77)X=B(C_2+C_{15}+C_{77})X = B then has no quotient. Figure 1 shows the entry and the line that reads it.

The four sites of the one-bit example

Figure 1. The four sites of the one-bit example. The shaded site has capacity κ(3,7)=1\kappa_{(3,7)} = 1, and the other three have capacity zero. On the top row the first label supplies the weight, giving 3x(3,7)+5x(5,7)=3x3x_{(3,7)} + 5x_{(5,7)} = 3x. On the whole array both labels supply weights, so the shaded site’s contribution is 3⋅7x=21x3 \cdot7x = 21x.

The construction. The interval at ee holds exactly when its two signed distances, fe(x)−Lef_e(x)-L_e and Re−fe(x)R_e-f_e(x), are nonnegative. Their sum is the known width Ue=Re−LeU_e=R_e-L_e. We put one distance at cycle length ωde\omega d_e, and ω\omega times the other at ded_e. Multiplying by CωC_\omega sends both entries to length ωde\omega d_e. Since gcd⁡(ω,de)=1\gcd(\omega,d_e)=1, the cycle rule gives CωCde=CωdeC_\omega C_{d_e}=C_{\omega d_e} and CωCωde=ωCωdeC_\omega C_{\omega d_e}=\omega C_{\omega d_e}. Each distance thus contributes ω\omega times its value, for a total of ωUe\omega U_e.

Which distance should go at the longer length? A face sum is a weighted sum of the face sums obtained by specifying one more coordinate. To make their changes cancel in the product, reverse the choice of distance each time a coordinate is left unspecified. For any rational array xx, put

ze(x)={fe(x)−Le,s(e) even,Re−fe(x),s(e) odd,Y(x)=∑e∈E(ze(x)Cωde+ω(Ue−ze(x))Cde).z_e(x)=\begin{cases} f_e(x)-L_e, & s(e)\ \text{even},\\ R_e-f_e(x), & s(e)\ \text{odd}, \end{cases} \qquad Y(x)=\sum_{e\in E}\left(z_e(x)C_{\omega d_e}+\omega\left(U_e-z_e(x)\right)C_{d_e}\right).

All displayed lengths are distinct, so Y(x)Y(x) has nonnegative coefficients exactly when xx is feasible. Set A=Cω+∑jCQjA=C_\omega+\sum_j C_{Q_j} and compute B=AY(0)B=AY(0) in signed integer arithmetic. This computation uses only the capacities and intervals.

Lemma 2. Suppose that some κv>0\kappa_v>0 and that a feasible rational array exists.

(a) For every rational array xx, AY(x)=BAY(x)=B. The target BB is a nonempty permutation.

(b) The map x↦Y(x)x\mapsto Y(x) is a bijection from feasible integral arrays to quotient isomorphism classes for AX=BAX=B. Its inverse reads xv=[Cωdv]Xx_v=[C_{\omega d_v}]X at each site vv.

(c) The number of states in BB satisfies

∣B∣=∣A∣ ω∑e∈EdeUe≤∣A∣ ω 2D∑v∈Vdvκv.(3)|B|=|A|\,\omega\sum_{e\in E}d_eU_e\le|A|\,\omega\,2^D\sum_{v\in V}d_v\kappa_v. \tag*{(3)}

Proof. Independence of the array. In the one-bit example let RR be the upper bound on 3x3x. Keep the other three site entries at zero. The multiplicities of C42C_{42} and C14C_{14} in Y(x)Y(x) are xx and R−3xR-3x. Multiplication by C15C_{15} sends both to length 210. The two contributions are 3x3x and R−3xR-3x, giving RR in all. The third possible length on this line, 70, has multiplicity zero because the site (5,7)(5,7) has capacity zero.

For the general calculation fix a coordinate jj and all the other labels, allowing those labels to be 1. Let δ\delta be their product. Write e(1)e^{(1)} for the face leaving coordinate jj unspecified and e(p)e^{(p)} for the face specifying p∈Hjp\in H_j there. The sites above e(1)e^{(1)} split according to their jjth label. A site with label pp has weight pp times its weight on e(p)e^{(p)}, giving

fe(1)(x)=∑p∈Hjpfe(p)(x).f_{e^{(1)}}(x)=\sum_{p\in H_j}p f_{e^{(p)}}(x).

Use subscripts 1,p1,p for the corresponding values of z,U,L,Rz,U,L,R. Multiplication by CQjC_{Q_j} gives CQjCδ=CδQjC_{Q_j}C_\delta=C_{\delta Q_j} and CQjCδp=pCδQjC_{Q_j}C_{\delta p}=pC_{\delta Q_j}, since gcd⁡(δ,Qj)=1\gcd(\delta,Q_j)=1. Both identities also apply with ωδ\omega\delta in place of δ\delta. Thus

[CωδQj]CQjY(x)=z1+∑p∈Hjpzp,[C_{\omega\delta Q_j}]C_{Q_j}Y(x)=z_1+\sum_{p\in H_j}pz_p,
[CδQj]CQjY(x)=ω(U1+∑p∈HjpUp)−ω(z1+∑p∈Hjpzp).[C_{\delta Q_j}]C_{Q_j}Y(x)=\omega\left(U_1+\sum_{p\in H_j}pU_p\right)-\omega\left(z_1+\sum_{p\in H_j}pz_p\right).

Each e(p)e^{(p)} has one fewer unspecified coordinate than e(1)e^{(1)}, so their zz's use opposite signs for the face sums. Writing kk for the common value of s(e(p))s(e^{(p)}), substitution gives

z1+∑p∈Hjpzp={R1−∑p∈HjpLp,k even,∑p∈HjpRp−L1,k odd.z_1+\sum_{p\in H_j}pz_p=\begin{cases} R_1-\sum_{p\in H_j}pL_p, & k\ \text{even},\\ \sum_{p\in H_j}pR_p-L_1, & k\ \text{odd}. \end{cases}

Both product coefficients are therefore independent of xx. These are all the lengths contributed by this line, and each determines δ\delta. The remaining divisor cycle gives

CωY(x)=∑eωUeCωde.(4)C_{\omega}Y(x)=\sum_{e}\omega U_eC_{\omega d_e}. \tag*{(4)}

We have proved AY(x)=AY(0)=BAY(x)=AY(0)=B. Evaluating at zero gives integer coefficients, even if zero violates an interval. Evaluating at a feasible rational array shows that the same coefficients are nonnegative. At a site with Uv=κv>0U_v=\kappa_v>0, the product with CωC_{\omega} makes a positive contribution, so BB is nonempty. This proves (a).

Ruling out other cycle lengths. So far every feasible integral array gives a quotient. To reverse the construction, first consider any cycle in a putative quotient. We can rule it out if multiplying it by even one cycle of AA would produce a cycle length absent from BB. For instance, in the one-bit example a quotient cycle of length 1515 would give a cycle of length 15⋅7715\cdot77 on multiplication by C77C_{77}. That cycle length uses both prime groups in full. To see why it is absent, examine the terms of B=AY(0)B=AY(0) before cancellation.

All cycle lengths divide the squarefree number ω∏jQj\omega\prod_j Q_j. In each cycle length, at most one group contributes more than one prime. Indeed CωY(0)C_{\omega}Y(0) uses at most one label from each group. Every cycle length of CQjY(0)C_{Q_j}Y(0) contains all primes of HjH_j and at most one from each other group. Cancellation only removes cycle lengths from this list.

If AX=BAX=B, then XX is a permutation since BB is surjective. Let CbC_b be any cycle in XX. Every cycle contributed by a pair of cycles from AA and XX occurs in their product with positive multiplicity. In particular, the length lcm⁡(ω,b)\operatorname{lcm}(\omega,b) occurs in BB, so bb divides ω∏jQj\omega\prod_j Q_j. If bb used two primes from HjH_j, choose k≠jk\ne j. Then CQkCbC_{Q_k}C_b would give a positive term of BB using at least two primes from each of Hj,HkH_j,H_k, which we have just ruled out. This step uses a second group and at least two primes in it. Hence b=deb=d_e or b=ωdeb=\omega d_e for some ee.

Reading the entries back. For XX with this support, the cycle lengths contributed to AXAX by its different divisor summands are disjoint. A cycle length in CωXC_{\omega}X contains no full group because every group has at least two primes, and one in CQjXC_{Q_j}X contains exactly HjH_j in full. The same separation holds for AY(x)AY(x) for every xx. Looking at which prime groups occur in full therefore tells us which summand of AA contributed each cycle length of the product. In particular we can read the product CωXC_{\omega}X separately. By (4) its coefficient at ωde\omega d_e is ωUe\omega U_e. Put ze′=[Cωde]Xz'_e=[C_{\omega d_e}]X. Equation (4) now gives [Cde]X=ω(Ue−ze′)[C_{d_e}]X=\omega(U_e-z'_e), including at tuples with Ue=0U_e=0. At a site vv we have s(v)=0s(v)=0 and the interval is [0,κv][0,\kappa_v], so zv(x)=xvz_v(x)=x_v. Set xv=zv′x_v=z'_v. These entries are nonnegative integers, being cycle multiplicities in XX.

It remains to identify the coefficients at the faces with unspecified coordinates. Use the notation e(1),e(p),δe^{(1)},e^{(p)},\delta from (a). Only CQjXC_{Q_j}X contributes to length ωδQj\omega\delta Q_j, and dividing by ωQj\omega Q_j recovers δ\delta and hence the fixed labels. The cycle rule on this line gives

ze(1)′=[CωδQj]B−∑p∈Hjp ze(p)′.z'_{e^{(1)}}=[C_{\omega\delta Q_j}]B-\sum_{p\in H_j}p\,z'_{e^{(p)}}.

Each face on the right has one more specified coordinate. Starting at the sites and proceeding in order of increasing s(e)s(e), the recurrence determines every ze′z'_e. Part (a) gives AY(x)=BAY(x)=B for every rational array, so it applies to the integer array just recovered. The coefficients of Y(x)Y(x) therefore satisfy the same recurrence, and they agree with zv′z'_v at the sites by the definition of xvx_v. Induction gives ze′=ze(x)z'_e=z_e(x) everywhere. The coefficients at both lengths now agree, so X=Y(x)X=Y(x). The nonnegativity of XX forces 0≤ze(x)≤Ue0\le z_e(x)\le U_e for every face, including faces of zero width. Hence xx is feasible. Conversely, each feasible integral xx gives a quotient by (a), and its site coefficients recover it uniquely. This proves (b).

Counting the states. Finally the two terms for ee in Y(x)Y(x) have total size wdeUew d_eU_e. Summing and multiplying by ∣A∣|A| gives the exact size in (3). For the upper bound replace each UeU_e by WeW_e. In deWed_eW_e a site v⪰ev\succeq e contributes dvκvd_v\kappa_v. Each of the DD coordinates of vv may be kept or left unspecified, so this contribution occurs exactly 2D2^D times in the sum over ee. □

De Loera and Onn proved that feasibility of a 3×c×h3 \times c \times h nonnegative integer table with prescribed two-dimensional marginals is NP-complete [3 Thm. 1.1]. Their marginal sums have unit coefficients. Here the coefficients dv/ded_v/d_e come from cycle multiplication.

From a Boolean formula to two successor tables

How can an interval test a Boolean condition? Suppose two sites on a line carry bits with weights 3 and 5. The possible sums are 0, 3, 5 and 8, so the interval [3, 5] makes the bits opposite. Along a path of two such tests the original bit reappears at the other end. On a line with three bits, the weighted sum is at least the smallest of its three positive weights exactly when at least one bit is 1. Now imagine testing a clause such as (x∨¬y∨z)(x \lor\neg y \lor z). We want one line with three active sites, one for each literal in its clause position. Give each clause position its own plane. On each plane, copying lines carry a literal’s bit to every address where a clause asks for it. A second kind of line links the planes so that every occurrence of xx agrees and every occurrence of ¬x\neg x reads its complement. The clause line can then test the three bits with a single interval. The construction below gives each of these lines precisely the sites it needs.

Take a conjunction of clauses with at most three literals each [10]. If its variables are given by an explicit list, first add (x∨¬x∨x)(x \lor\neg x \lor x) for every listed but unused variable. This preserves both choices for xx when we count assignments. Otherwise the variables are those occurring in the formula. Set aside the empty cases until the end of the construction. In every remaining short clause, repeat a literal until the clause has three positions. Relabel the n≥1n \ge1 variables. A literal may occur in any position in many clauses. We give it a copy on each of three planes, one plane for each clause position. There are t=2n+1t = 2n + 1 identifiers, one for each signed literal and one padding identifier ⊥\bot. Padding will let us test just two planes while giving all three positions a definite address.

Assigning addresses. Choose the least u≥3u \ge3 with ug≥tu^g \ge t, and the least g≥1g \ge1 with ug≥tu^g \ge t. The two choices balance the cost of an address. At a site, dvd_v uses one prime per coordinate, whereas the divisor cycle for a coordinate uses all its primes. Taking g≤ug \le u and ulog⁡u=O(log⁡(t+2))u \log u = O(\log(t + 2)) will keep both lengths polynomial in tt (§ 3.3). Assign distinct words in {0,…,u−1}g\{0, \ldots, u - 1\}^g to the identifiers. The address α^\hat{\alpha} of an identifier α\alpha is its word with each digit duplicated. A site has three slots of 2g2g coordinates each and one plane coordinate with three values. Fixing the three slots and varying the plane gives a line through the three clause positions. Each address coordinate has uu labels. Assign a distinct prime to every label of every coordinate using consecutive primes starting at 3, taking one address coordinate at a time and the plane last. A label’s weight is the prime assigned to it in its own coordinate. For example, the digit 0 has positive weight. Since all label primes are odd, we may take the guard prime ω=2\omega= 2.

Connecting the addresses of one literal. To copy a bit we need to travel between duplicated words by changing one coordinate at a time. Let PP be the path of digit pairs obtained by listing $(a,a)for$0≤a<ufor \$0 \le a < u and inserting (a,a+1)(a,a+1) between successive diagonal pairs. For $u = 3 it is

(0,0), (0,1), (1,1), (1,2), (2,2).(0,0),\ (0,1),\ (1,1),\ (1,2),\ (2,2).

A slot ranges through PgP^g, the Cartesian product of gg such paths. Why use a pair of coordinates for one digit? Fix either member of a pair and at most two points of PP remain. This is what lets a copying line isolate two sites even when the alphabet is large.

On plane j∈{1,2,3}j \in\{1,2,3\}, for each signed literal ℓ\ell fix slot jj to ℓ^\hat{\ell} and allow the other two slots to range through Pg×PgP^g \times P^g. Give these sites capacity one and all other sites capacity zero. Each plane thus has one disjoint copy of Pg×PgP^g \times P^g per literal. The padding address can be visited in either varying slot because every duplicated word belongs to PgP^g. On plane jj, a site with padding in its own slot jj has capacity zero.

Copying a bit. In each copy we need only enough edges to reach every site. Take a spanning tree of its Cartesian product graph. For every tree edge impose a condition on the face leaving only its varying coordinate unspecified. Exactly the two active endpoints lie on this line. The plane and its literal are fixed, as is the partner coordinate of the varying digit. If the two endpoint bits are b,b′b,b' and the two labels are p,qp,q, the face sum is pb+qb′pb+qb'. The interval [min⁡(p,q),max⁡(p,q)][\min(p,q),\max(p,q)] imposes b+b′=1b+b'=1.

Number the positions in PP starting at zero. A graph edge reverses the parity of the sum of the positions in the varying slots. Every site where all digit pairs are diagonal has even parity. Consequently, all such sites in the copy for (j,ℓ)(j,\ell) carry one bit bj,ℓb_{j,\ell}. Either value of this bit extends uniquely to the copy by assigning its complement at sites of odd parity. Figure 2 shows one choice of the tree and the sites where the construction reads the bit.

Copying one bit when $u=3$ and $g=1$

Figure 2. Copying one bit when u=3u = 3 and g=1g = 1. On the left the five positions on PP are numbered in path order. On the right only the solid edges of the grid are used as copying lines. They form a spanning tree. If the bit at (0,0)(0,0) is bb, filled sites carry bb and open sites carry 1−b1-b. At the nine boxed sites both slots contain duplicated digits. All nine have even parity and carry bb. The tests that compare literal signs or check clauses read the bit only at boxed sites.

Identifying a literal across the three planes

Write (α1,α2,α3)(\alpha_1,\alpha_2,\alpha_3) for the line that fixes the three slots to their respective diagonal words αi^\widehat{\alpha_i} and leaves the plane unspecified. On it, plane jj has an active endpoint precisely when αj\alpha_j is a literal. Its bit there is bj,αjb_{j,\alpha_j}. For example, (x,⊥,¬x)(x,\perp,\neg x) exposes the bit for xx on the first plane and the bit for ¬x\neg x on the third. The second plane contributes zero. Let π1,π2,π3\pi_1,\pi_2,\pi_3 be the plane primes.

For each variable xx and every ordered pair j≠kj\ne k, place xx in slot jj, ¬x\neg x in slot kk and ⊥\perp in the remaining slot. We call these six lines the sign tests of xx. On each line impose the interval [min⁡(πj,πk),max⁡(πj,πk)][\min(\pi_j,\pi_k),\max(\pi_j,\pi_k)]. It forces exactly one of bj,x,bk,¬xb_{j,x},b_{k,\neg x} to be one. The six conditions form the cycle

b1,x, b2,¬x, b3,x, b1,¬x, b2,x, b3,¬x, b1,x.b_{1,x},\ b_{2,\neg x},\ b_{3,x},\ b_{1,\neg x},\ b_{2,x},\ b_{3,\neg x},\ b_{1,x}.

Thus the three positive copies agree and the three negative copies are their complements. A truth value for xx satisfies all six conditions and determines all six bits.

Enforcing a clause

For each clause (ℓ1∨ℓ2∨ℓ3)(\ell_1\lor\ell_2\lor\ell_3) impose on its line (ℓ1,ℓ2,ℓ3)(\ell_1,\ell_2,\ell_3) the interval

min⁡(π1,π2,π3)≤π1b1,ℓ1+π2b2,ℓ2+π3b3,ℓ3≤π1+π2+π3.(5)\min(\pi_1,\pi_2,\pi_3)\le\pi_1b_{1,\ell_1}+\pi_2b_{2,\ell_2}+\pi_3b_{3,\ell_3}\le\pi_1+\pi_2+\pi_3. \tag*{(5)}

All three planes are active, also when literals repeat. This interval excludes exactly the all-zero triple.

Could two instructions give the same line incompatible intervals? A copying line fixes its plane and the address of its owning literal. It therefore belongs to one copy, and its two active endpoints determine a single tree edge. Both other kinds of line vary the plane. A sign test has one padding slot, which identifies the remaining pair of positions. A clause has three literal addresses. Repeating an ordered clause simply repeats its interval. This accounts for every marked line. Give each remaining face its full interval [0,We][0, W_e].

An integral feasible array now yields a truth assignment from b1,xb_{1,x} for each variable. The six-cycle gives the value of every literal on every plane, and (5) makes every clause true. Conversely, assign the truth values at diagonal words and extend by parity in each copy. This gives a feasible integral array for every satisfying assignment. At all inactive sites the entry is zero.

A feasible rational array exists even if the formula has no satisfying assignment. Give every active site value 1/21/2 and every unused one zero. On a two-endpoint line the weighted sum is (p+q)/2(p+q)/2, which is between its two labels. On a clause line it is (π1+π2+π3)/2≥min⁡jπj(\pi_1+\pi_2+\pi_3)/2 \ge\min_j \pi_j. All other faces have their default intervals. Lemma 2 therefore constructs a nonempty integral target on satisfiable and unsatisfiable inputs alike, and supplies the converse for arbitrary candidate quotients.

The half assignment gives a further check on the construction. All entries of Y(x)Y(x) at this point are nonnegative half-integers. Doubling their multiplicities gives a genuine quotient of B+BB+B by AA, even when the original formula is unsatisfiable.

Empty cases. After accounting for unused variables, an empty conjunction has one assignment and gives (C2,C2)(C_2,C_2) with unique quotient C1C_1. A formula containing an empty clause has no satisfying assignment. For this case take (A,B)=(C2+C3,C2+3C6)(A,B)=(C_2+C_3,C_2+3C_6). A fixed point of a quotient would give a 3-cycle in BB upon multiplication by C3C_3. Since BB has no such cycle, the only possible contributions to its 2-cycles come from C2C2=2C2C_2C_2=2C_2. Yet BB has just one 2-cycle. This fixed instance also satisfies (C2+C3)(C2+C6)=2C2+6C6(C_2+C_3)(C_2+C_6)=2C_2+6C_6.

Writing the successor tables

At this point a formula has determined two lists of cycles. A short list can describe a very large permutation. To finish the reduction in the explicit input model we must bound the number of states in the cycles, including all their copies. The divisor has 6g6g address cycles, one plane cycle and C2C_2. Every coordinate cycle length QjQ_j is a product of distinct primes assigned only to that coordinate. Thus the lengths of AA are squarefree and pairwise coprime. Every length in B=AY(0)B=AY(0) is the least common multiple of squarefree lengths and is also squarefree. By (4), each active site vv contributes a distinct length 2dv2d_v to BB. Their number grows with the number of variables.

For u>3u>3, minimality gives (u−1)u−1<t(u-1)^{u-1}<t, hence ulog⁡u=O(log⁡(t+2))u\log u=O(\log(t+2)), including u=3u=3 after changing the constant. Also g≤ug\le u. The 6gu+36gu+3 address and plane primes have largest value p∗=uO(1)p_* = u^{O(1)} by the bound on the iith prime pi=O(ilog⁡(2i))p_i=O(i\log(2i)) [18 p. 69, (3.13)]. They can be found by deterministic sieving. An address cycle length is at most p∗up_*^u, and the plane cycle length is at most p∗3p_*^3. Each site length uses one label from each coordinate, hence is at most p∗6g+1p_*^{6g+1}. Each of these bounds is tO(1)t^{O(1)}.

There are D=6g+1D=6g+1 coordinates and ∣E∣=4(u+1)6g=tO(1)|E|=4(u+1)^{6g}=t^{O(1)} faces. Since all capacities are at most one, (3) gives

∣B∣≤2∣A∣26g+1∣V∣p∗6g+1=tO(1).|B| \le2|A|2^{6g+1}|V|p_*^{6g+1}=t^{O(1)}.

This counts all copies of all cycles of BB. The algorithm enumerates the tuples, constructs the copying trees, marks the lines of the input formula, computes (2) and multiplies AY(0)AY(0) by the cycle rule (1). All loops take time polynomial in the input size, including the number of clauses. In particular, ∣ze(0)∣≤We≤∣V∣p∗6g+1|z_e(0)|\le W_e\le|V|p_*^{6g+1} bounds the signed intermediate coefficients before multiplication. Writing a cycle of length dd uses dd consecutive states with cyclic successors. Both successor tables together require O(Nlog⁡(2+N))O(N\log(2+N)) bits for N=∣A∣+∣B∣N=|A|+|B|. This proves Theorem 1.

The three one-bit intervals of Section 2 also admit a direct check. Building their successor tables and recovering the quotients gives two classes for [0,3][0,3], one for [3,3][3,3] and none for [1,2][1,2]. Section 5 gives the table sizes and describes the independent decoder.

Counting quotient classes

Corollary 3. For explicitly given permutations, counting the isomorphism classes of XX satisfying AX=BAX=B is #P-complete under parsimonious polynomial-time reductions. The hardness holds with all the cycle restrictions of Theorem 1. All instances produced by the reduction also satisfy A∣(B+B)A \mid(B+B).

Proof. Counting satisfying assignments to clauses of width at most three is #P-complete under count-preserving reductions [19 §3, Facts 1–2]. In the bounded-fan-in circuit encoding, fields for internal gate values have a unique assignment given the inputs. Each gate relation uses at most three variables, and a unit clause requires the output to be true. Our input convention explicitly accounts for every variable counted. The tautology preprocessing and clause padding preserve all assignments, including those of an initially empty conjunction. The fixed empty-conjunction instance has one quotient class, and the empty-clause instance has none. Otherwise each satisfying assignment has exactly one parity extension to the copying trees. Conversely the bits b1,xb_{1,x} recover the assignment, and Lemma 2 gives exactly one quotient class for each feasible array. Doubling the half assignment, or using the displayed products in the fixed cases, gives A∣(B+B)A \mid(B+B).

To count quotient classes, each class must have exactly one accepting certificate. Guessing a labelled successor table could count the same permutation many times. Its list of cycle multiplicities is unique. If ∣B∣/∣A∣|B|/|A| is not integral, reject. Otherwise set nX=∣B∣/∣A∣n_X=|B|/|A| and guess the multiplicity of each cycle length 1,…,nX1,\ldots,n_X, using exactly ⌈log⁡2(nX+1)⌉\lceil\log_2(n_X+1)\rceil bits per entry. Check that the total size is nXn_X, and use the cycle rule to compare the product with the cycle histogram of BB. This is polynomial in the explicit table sizes. Every quotient class yields exactly one accepting string.

A procedure that halts in polynomial time on every input and returns a quotient on every yes-instance would decide 3-SAT in polynomial time. For the constructed permutation instances, an output can be checked by testing bijectivity and comparing the cycle multiplicities of AXAX and BB.

The cost in states

How many states do we pay for each bit in the reduction? Consider a nontrivial formula. We use the guard prime 2, and each active site has capacity one and interval [0,1][0,1]. Put V+={v:κv=1}V^+=\{v:\kappa_v=1\}. Keeping just the terms for these sites in the exact state count (3) gives the lower bound below. The upper bound from the same lemma includes all faces.

2∣A∣∑v∈V+dv≤∣B∣≤2D2∣A∣∑v∈V+dv.2|A| \sum_{v\in V^+} d_v \le|B| \le2^D 2|A| \sum_{v\in V^+} d_v.

In each construction 2D2^D grows more slowly than any fixed positive power of the input scale. It therefore suffices to count the divisor states, the length dvd_v at an active site, and the active sites. For example, the first row of Table 2 gives 2+12+3=172+12+3=17 for the exponent of N=∣A∣+∣B∣N=|A|+|B|.

Interval for 3x3x[0,3][0,3][3,3][3,3][1,2][1,2]
Feasible bits xx0,10,111none

Table 2.

Size of the duplicated-digit construction

Let t=2n+1t=2n+1 count the identifiers. For the construction in Section 3, minimality of uu and gg gives log⁡t∼ulog⁡u\log t\sim u\log u and glog⁡u=log⁡t+O(log⁡u)g\log u=\log t+O(\log u), so g∼ug\sim u. There are r=6gr=6g address

ConstructionScale MM∣A∣|A|dvd_v∣V+∣|V^+|NN
Duplicated digits2n+12n+1212317
One checksum2n+12n+10639
Test and literal addressesn+mn+m0415

caption: State counts for nn variables and mm padded clauses. In the last four columns, an entry aa means the quantity is Ma+o(1)M^{a+o(1)} as MM grows. The estimate for dvd_v holds uniformly at all active sites. In particular, a zero allows subpolynomial growth.

coordinates. The largest prime p∗p_* is at most u2+o(1)u^{2+o(1)} by the prime bound in § 3.3. The groups receive consecutive primes in coordinate order. Thus every prime in group j≥2j \ge2 is at least (j−1)u(j-1)u. The last address cycle alone has length at least ((r−1)u)u((r-1)u)^u. Each address cycle has length at most p∗up_*^u, and hence ∣A∣=t2+o(1)|A| = t^{2+o(1)}. At every site the same ordering gives

ur−1(r−1)!≤dv≤p∗r+1,dv=t12+o(1)u^{r-1}(r-1)! \le d_v \le p_*^{r+1}, \qquad d_v = t^{12+o(1)}

by Stirling’s formula. There are exactly 6n(2u−1)2g=t3+o(1)6n(2u-1)2^g = t^{3+o(1)} active sites. Since D=r+1D=r+1 gives 2D=to(1)2^D=t^{o(1)}, the two bounds on ∣B∣|B| yield N=t17+o(1)N=t^{17+o(1)}, uniformly over the clauses and the choice of copying trees.

A shorter address with one checksum

Can we still isolate two endpoints on a copying line with fewer coordinates? Duplicating every digit used 2g2g coordinates for a word of length gg. We will use just one extra digit to record a checksum, bringing the cost down to g+1g+1.

We also shrink the alphabet. A group with uu labels costs up to p∗up_*^u states in a single divisor cycle. We would like that cost to be to(1)t^{o(1)}, while retaining enough words to name all tt identifiers. Let λ≥3\lambda\ge3 be the least integer with λλ≥t\lambda^\lambda\ge t, set u=max⁡(3,⌈λ/⌈log⁡2λ⌉⌉)u=\max(3,\lceil\lambda/\lceil\log_2\lambda\rceil\rceil), and take the least g≥1g \ge1 with ug≥tu^g \ge t. Dividing the alphabet size by a logarithmic factor makes u=o(λ)u=o(\lambda), yet log⁡u∼log⁡λ\log u\sim\log\lambda. Thus the required word length still satisfies g∼λg\sim\lambda.

For a word a=(a1,…,ag)a=(a_1,\ldots,a_g), put σ(a)=∑iai mod u\sigma(a)=\sum_i a_i \bmod u. A varying slot can occupy any of the 2ug2u^g sites

S(a)=(a,σ(a)),I(a)=(a,σ(a)+1 mod u).S(a)=(a,\sigma(a)), \qquad I(a)=(a,\sigma(a)+1 \bmod u).

Think of S(a)S(a) as a stable address and I(a)I(a) as the intermediate site on a move to the next address. In base three, for instance, a move from S(2,1)S(2,1) to S(0,1)S(0,1) visits (2,1,0),(2,1,1),(0,1,1)(2,1,0),(2,1,1),(0,1,1). Give every identifier a distinct word, including the padding identifier. Its address is the corresponding SS site. On plane jj fix slot jj to the stable address of its literal and let the other two slots vary independently. Sign and clause tests still take place at stable addresses.

Join S(a)S(a) to I(a)I(a). From I(a)I(a) one can move to S(a′)S(a') whenever a′a' is obtained by increasing one digit of aa by one modulo uu. This second edge keeps the checksum fixed, even when the digit wraps around. Why do we see exactly two possible sites on each coordinate line? If a digit varies, the other digits and the checksum determine it uniquely for each of the two types. If the checksum varies, the word fixes its two possible values. Hence an edge line in one copy isolates its two endpoints.

These edges form a connected bipartite graph on the slot, since a path of length two increments any digit of a stable site and each edge joins an SS site to an II site. In the product of the two varying slots, the parity of the number of II slots changes along every edge. In particular, all pairs of stable addresses have even parity. As in § 3, impose complementary bits along a spanning tree. Each literal bit extends uniquely, the six sign tests still identify the copies of a variable, and every clause still reads its three literal bits. Assigning 1/21/2 at every active site remains feasible. Lemma 2 therefore gives the same assignment–quotient bijection and cycle restrictions.

For the state count, put r=3(g+1)r = 3(g + 1), so D=r+1D = r + 1. We have log⁡t∼λlog⁡λ\log t \sim\lambda\log\lambda. Assign consecutive primes in coordinate order as before. The largest prime has index O(gu)O(gu), so log⁡p∗≤(2+o(1))log⁡λ\log p_* \le(2 + o(1)) \log\lambda. The rr address groups each cost at most p∗up_*^u states and the plane group at most p∗3p_*^3. Since u=o(λ)u = o(\lambda), this gives log⁡∣A∣=o(log⁡t)\log|A| = o(\log t) as intended. At every site we again have

ur−1(r−1)!≤dv≤p∗r+1.u^{r-1}(r - 1)! \le d_v \le p_*^{r+1}.

By Stirling’s formula the logarithms of the two bounds are both (6+o(1))log⁡t(6 + o(1)) \log t. The 6n6n literal copies each have (2ug)2(2u^g)^2 active sites, giving t3+o(1)t^{3+o(1)} in total. Since 2D=to(1)2^D = t^{o(1)}, we obtain N=t9+o(1)N = t^{9+o(1)}, uniformly over formulas and copying trees. Enumerating the 4(u+1)r=t3+o(1)4(u + 1)^r = t^{3+o(1)} faces and writing the tables as in § 3.3 takes polynomial time in the formula length. The estimates count states. Writing their successors in binary adds at most a logarithmic factor.

Routing by test and literal

In the checksum construction a literal occupies an entire product of two slot graphs on a plane, although a test of that literal on the plane reads it at just one site. To reduce the cost further, we give separate addresses to tests and literals. A test is a clause or one of the six sign tests of a variable. At stage zero a test keeps its address fixed and follows a path from padding to the literal it reads. At stage one the literal keeps its address fixed, and a tree joins the tests that read it. A single edge between the two stages at each such meeting point makes all occurrences of that literal on the plane read the same bit. Only the paths and trees needed to deliver those bits have to be activated. Figure 3 follows two tests that request the same literal.

Two tests on one plane request the same literal

Figure 3. Two tests on one plane request the same literal ℓ\ell. Each stage-zero path varies the literal address at a fixed test. A single stage edge then reverses the bit. The stage-one tree joins the two stable test addresses at fixed ℓ\ell. Its path has even length because stable and intermediate sites alternate. Dashed lines stand for paths with their internal sites omitted. Both tests therefore read bb at padding.

Use two address slots, a stage coordinate with two labels and a plane coordinate with three labels. Give distinct identifiers to the mm clauses and the 6n6n sign tests of § 3. A clause requests one literal on each of its three planes, even if it repeats a literal. A sign test requests a literal on two planes. There are m+6nm + 6n test identifiers and 2n+12n + 1 literal or padding identifiers. Thus a common address space of capacity T=max⁡(m+6n,2n+1)T = \max(m + 6n, 2n + 1) suffices for either slot. Choose λ,u,g\lambda, u, g as in the checksum construction with TT in place of tt. Each slot uses its own prime labels on the same abstract checksum graph with g+1g + 1 coordinates. Write S(α)S(\alpha) for the stable address of identifier α\alpha, including S(⊥)S(\bot) for padding in the literal slot.

On each plane give the following sites capacity one, and give every other site capacity zero.

  • At stage zero, fix the test slot to S(τ)S(\tau) for each participating test τ\tau. In the literal slot take a path from S(⊥)S(\bot) to S(ℓ)S(\ell), where ℓ\ell is the literal requested on this plane. Mark its edges.

  • At stage one, fix the literal slot to S(ℓ)S(\ell) for each requested literal ℓ\ell. In the test slot choose one test requesting ℓ\ell and join its stable address to those of all the others. Take a spanning tree of the union of the paths and mark its edges. If only one test requests ℓ\ell, the tree is a single site.

For both stages we route between stable addresses by incrementing digits in coordinate order. There are at most u−1u-1 increments per digit and two edges per increment, hence at most 2g(u−1)2g(u-1) edges per route. Use a fixed vertex order to select each spanning tree.

Which active sites does each marked line read?

  1. A stage-zero edge line fixes the plane, stage and test address, so only one path can meet it. Its two marked endpoints are active. The two-site property of the checksum graph excludes any further site.

  1. A stage-one edge line fixes the plane, stage and literal address, so only one tree can meet it. The same two-site property isolates its endpoints.

  1. For an occurrence (τ,ℓ)(\tau,\ell), mark the stage line through (S(τ),S(ℓ))(S(\tau),S(\ell)) on its plane. It meets the end of the test path and a site of the literal tree. These are its only two sites, since the stage takes just two values. A path or tree may visit another stable address along its route. We mark the stage line there only if the address pair is itself a requested occurrence.

  1. The plane line through (S(τ),S(⊥),0)(S(\tau),S(\perp),0) reads exactly the planes participating in τ\tau. Only those planes have a stage-zero path for that test, and each such path starts at padding.

On the first three kinds of lines impose the complementary-bit interval for their two endpoint primes. On a plane line impose its sign or clause test. Every other face receives its default interval. Lines from different kinds free different coordinates or fix different stages. At a given stage, edge lines for different tests (at stage zero) or different literals (at stage one) have different fixed addresses. If two traversals use the same line, its two endpoints give the same interval.

For consistency, colour each active site by the parity of its stage plus the number of II addresses in its two slots. Every address edge changes one address type, and a stage edge changes the stage. Each complementary-bit equation therefore joins opposite colours. All the stable test addresses in a stage-one literal tree carry the same bit. Crossing to stage zero complements that bit once. The remaining path to padding has even length because both ends are stable. Thus every occurrence of ℓ\ell on plane jj reads the same bit bj,ℓb_{j,\ell}, the complement of the tree’s stable bit. Conversely, specifying these readouts fills the trees and then the paths uniquely. Every literal is requested on each plane by the sign tests. They impose the same six-cycle as in Section 3, and the clause tests impose (5). We recover both the assignment–quotient correspondence and the feasible half array.

There are r=2(g+1)r=2(g+1) address groups followed by the stage and plane groups of sizes two and three. Assign consecutive odd primes in that order and retain the guard prime 2. Here T=Θ(n+m)T=\Theta(n+m) and g∼λg\sim\lambda. As before, ∣A∣=To(1)|A|=T^{o(1)}. At every site the bounds ur−1(r−1)!≤dv≤p∗r+2u^{r-1}(r-1)!\le d_v\le p_*^{r+2} now give dv=T4+o(1)d_v=T^{4+o(1)}. The 3m+12n3m+12n participating test–plane pairs give distinct stage-zero padding sites. Each pair needs at most one route in each stage, so both stages together use O((n+m)gu)O((n+m)g u) sites. Hence ∣V+∣=T1+o(1)|V^+|=T^{1+o(1)}. Since 2r+2=To(1)2^{r+2}=T^{o(1)}, the state-count bounds yield N=(n+m)5+o(1)N=(n+m)^{5+o(1)}. There are 12(u+1)r=T2+o(1)12(u+1)^r=T^{2+o(1)} faces, and the construction takes polynomial time including the explicit output. In particular, N=n5+o(1)N=n^{5+o(1)} when m=O(n)m=O(n). For unrestricted clause density the three-slot construction gives the separate bound N=(2n+1)9+o(1)N=(2n+1)^{9+o(1)}.

Computational checks

These computations illustrate the reduction on instances small enough to check independently. For the one-bit example in Section 2, we built the three target successor tables. In the order of the intervals [0,3][0,3], [3,3][3,3] and [1,2][1,2], they contain respectively 15 792, 11 844 and 13 160 states. From their cycle types we recovered two, one and zero quotient classes. For each quotient we built its product table with AA and checked its cycle type against the target.

For the SAT constructions we stored each cycle length with its multiplicity. Equation (1) lets us multiply these lists exactly, even for the following targets built from the single clause (x∨¬x∨x)(x \lor\neg x \lor x).

ConstructionDistinct cycle lengths in BB∣B∣|B|
Duplicated digits27 693329 236 589 030 252 537 126
Test and literal addresses58 86842 733 726 046 144 284 221 840

Table 1 (PDF p. 13).

The clause is a tautology, so a decoder should find two quotient classes. Replacing it by (x∨x∨x)(x\lor x\lor x) leaves one assignment. Adding (¬x∨¬x∨¬x)(\neg x\lor\neg x\lor\neg x) to that clause leaves none. A separate decoder receives just the cycle lists of AA and BB. It factors the lengths in AA to recover the prime groups and reads the coefficients in BB to reconstruct the interval constraints. It then enumerates the feasible bits without access to the formula. For the duplicated-digit construction, which uses 150 active sites for one variable, it reconstructed the constraints, found respectively two, one and zero quotient classes, and verified each quotient by multiplication. For the two-address construction in § 4.3, the decoder reconstructed all 49 152 faces on each of the three inputs and found the same counts.

For seven formulas with one to five variables we also compared the assignments obtained from the two-address interval constraints with direct Boolean enumeration. The two sets agreed for every formula. The formulas, scripts and per-instance counts are in the reproduction package (commit f7145d2).

Scalar polynomials and uniqueness

What can we learn about XX by observing AXAX after kk steps? A pair returns to its starting point exactly when both coordinates do. If ϕk(X)\phi_k(X) counts the states fixed by the kkth iterate, then ϕk(AX)=ϕk(A)ϕk(X)\phi_k(AX)=\phi_k(A)\phi_k(X). On a dd-cycle all dd states return when d∣kd\mid k, and none return otherwise. This gives the formula ϕk(Z)=∑d∣kdzd\phi_k(Z)=\sum_{d\mid k} dz_d, which extends to every rational cycle sum Z=∑dzdCdZ=\sum_d z_dC_d. Multiplicativity extends to these sums by bilinearity. In the language of Burnside rings, this count is the mark of the subgroup generated by the kkth power of a generator of the infinite cyclic group acting by the permutation [7 §2, (2-6)]. The marks determine ZZ one cycle length at a time. Once the shorter lengths are known, subtracting their contributions from ϕk(Z)\phi_k(Z) leaves kzkkz_k.

Call kk visible when ϕk(A)>0\phi_k(A)>0, that is, when some cycle length of AA divides kk. Division by ϕk(A)\phi_k(A) then recovers the mark of XX. At every other index the product mark is zero for every XX. Thus AZ=AZ′AZ=AZ' exactly when Z,Z′Z,Z' agree in all visible marks. For the opening example A=C2A=C_2, only the even indices are visible. Both candidate quotients 2C12C_1 and C2C_2 have two returning states at every even step. Their numbers of fixed points differ at the first step, which the product cannot detect.

Corollary 4. Fix a nonconstant scalar polynomial q(z)=∑i=0rciziq(z)=\sum_{i=0}^{r}c_i z^i with nonnegative integral coefficients and cr>0c_r>0. Interpret a coefficient cic_i as ciC1c_iC_1 and write QQ for this polynomial on systems. For explicit permutations A,BA,B, deciding AQ(X)=BAQ(X)=B is NP-complete and counting its quotient classes is #P-complete under parsimonious reductions. Hardness holds under the cycle restrictions of Theorem 1, with AA part of the input.

Proof. We will replace the target of each hard division instance by a target BQBQ with exactly the same solutions XX. The reason this can work is that marks add under disjoint union and multiply under direct product. Hence ϕk(Q(X))=q(ϕk(X))\phi_k(Q(X))=q(\phi_k(X)), so we can apply qq to each visible mark separately.

For the constructed instance let Y0=Y(0)Y_0=Y(0) and Y∗=Y(xˉ)Y_\ast=Y(\bar{x}) at the feasible half assignment. Then Y0Y_0 is signed integral, Y∗Y_\ast is nonnegative rational, and AY0=AY∗=BAY_0=AY_\ast=B. In the constant yes branch use Y0=Y∗=C1Y_0=Y_\ast=C_1. In the constant no branch of Section 3 one may take $Y_0=

{#eq:1}

−3C1+2C2+C3-3C_1 + 2C_2 + C_3 and Y∗=(C2+C6)/2Y_* = (C_2 + C_6)/2, which have the same stated properties by (1). Form BQ=AQ(Y0)B_Q = A Q(Y_0). On visible indices its marks are ϕk(A)q(ϕk(Y∗))\phi_k(A)q(\phi_k(Y_*)), and on other indices they vanish. Hence BQ=AQ(Y∗)B_Q = A Q(Y_*). Its cycle multiplicities are integral by the first construction and nonnegative by the second. Its size is ∣A∣q(∣B∣/∣A∣)>0|A|q(|B|/|A|) > 0. Its cycle lengths are squarefree, since direct products take least common multiples. For every permutation XX, strict increase of qq on the nonnegative reals gives

AQ(X)=BQ⟺ϕk(X)=ϕk(Y∗) for every visible k⟺AX=B.A Q(X) = B_Q \Longleftrightarrow\phi_k(X) = \phi_k(Y_*)\ \text{for every visible } k \Longleftrightarrow A X = B.

To compute BQB_Q we enumerate the ordered tuples of terms of Y0Y_0 in each signed product. There are polynomially many such tuples for fixed rr, and each coefficient and cycle length has polynomial bit length. The displayed size of BQB_Q is polynomial, so we can write out its successor table.

For membership, 1≤∣X∣≤∣B∣1 \le|X| \le|B| on a yes-instance. The summand AXrA X^r in a permutation target forces XX to be a permutation, since a positive Cartesian power of a nonsurjective map is nonsurjective. One fixed-width guess for each entry of the cycle histogram up to ∣B∣|B| gives one accepting path per solution. For a guessed histogram of total size nXn_X, first check that 1≤nX≤∣B∣1 \le n_X \le|B| and ∣A∣q(nX)=∣B∣|A|q(n_X) = |B|. Reject the guess if either check fails. For each ii with ci>0c_i > 0, the summand ciXic_iX^i then has cinXi≤q(nX)=∣B∣/∣A∣c_i n_X^i \le q(n_X) = |B|/|A| states. Evaluate the fixed polynomial using the cycle product rule and compare the cycle type of AQ(X)A Q(X) with that of BB.

Suppose now that we know there is at most one quotient. How hard is it to decide whether it exists? Another question starts with an arbitrary instance and asks whether it has at most one quotient. The bijection with satisfying assignments answers both.

Corollary 5. If a deterministic polynomial-time algorithm distinguishes zero quotient classes from exactly one on promised explicit permutation instances, then NP = RP. Deciding whether there is at most one quotient class is coNP-complete. Both statements hold under the divisor and target restrictions of Theorem 1.

Proof. Apply Valiant–Vazirani isolation to a SAT instance [20]. An unsatisfiable formula always stays unsatisfiable. A satisfiable one acquires exactly one solution with inverse-polynomial probability. Use bounded-fan-in Boolean gates and a biconditional for each gate when converting to clauses of width at most three. Each input assignment then has exactly one gate extension if it is accepted. The parsimonious reduction preserves the promise in the two cases just described. Polynomially many independent repetitions give RP success probability. Answers on multiple-solution outputs cannot cause a false acceptance on an unsatisfiable input.

For the second claim adjoin a fresh variable through a tautological clause. The number of quotient classes is twice the number of satisfying assignments. It is at most one exactly on unsatisfiable formulas. Two distinct verified cycle histograms certify the complement.

The promise here concerns a single pair A,BA,B. Global injectivity of the polynomial across all right-hand sides is a separate tractable condition [15].

How many divisor cycles suffice? Our reduction uses a growing number of divisor cycles. What happens with just two? For A=Ca+CbA = C_a + C_b with a=pαa = p^\alpha and b=qβb = q^\beta powers of distinct primes, lcm⁡(a,b)\operatorname{lcm}(a,b) has (α+1)(β+1)(\alpha+ 1)(\beta+ 1) positive divisors. The counting bound of Bridoux et al. therefore applies with exponent four for two primes and nine for their squares, even as p,qp,q vary [2 Thm. 1]. Now allow arbitrary lengths a,ba,b with neither dividing the other. Can one polynomial-time algorithm decide whether Ca+CbC_a + C_b divides an explicit permutation BB, even when lcm⁡(a,b)\operatorname{lcm}(a,b) may have arbitrarily many divisors? Our reduction leaves this question open.

References

  1. [1]R. Ascone, A. E. Porreca, and M. Rolland. Polynomial equations over bijective dynamical systems and their semirings extensions. Extended abstract, Workshop on Cellular Automata and Boolean Automata Networks, UCNC 2026. doi:10.5281/zenodo.20431158. Accompanying slides, nos. 17–21.DOI
  2. [2]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.DOI
  3. [3]J. De Loera and S. Onn. The complexity of three-way statistical tables. SIAM Journal on Computing 33, 819–836, 2004. doi:10.1137/S0097539702043803.arxiv.org/abs/math/0207200
  4. [4]A. Dennunzio, V. Dorigatti, F. Formenti, L. Manzoni, and A. E. Porreca. Polynomial equations over finite, discrete-time dynamical systems. In Cellular Automata (ACRI 2018), LNCS 11115, 298–306, 2018. Publisher.DOI
  5. [5]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. doi:10.46298/dmtcs.14590.DOI
  6. [6]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. doi:10.1007/s11047-026-10068-7.
  7. [7]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, 1–41, 1989. Publisher.DOI
  8. [8]M. Gadouleau and M. Johnson. Semirings of formal sums and injective partial transformations. arXiv:2603.26508, 2026.arxiv.org/abs/2603.26508
  9. [9]M. Gadouleau, S. Riva, M. Rolland, and M.-E. Voge. Solving polynomial equations over partial discrete dynamical systems. arXiv:2609.39724, 2026.arxiv.org/abs/2609.39724
  10. [10]R. M. Karp. Reducibility among combinatorial problems. In Complexity of Computer Computations, pp. 85–103, 1972. doi:10.1007/978-1-4684-2001-2_9.DOI
  11. [11]É. Naquin and M. Gadouleau. Factorisation in the semiring of finite dynamical systems. Theoretical Computer Science 998, 114509, 2024. Publisher. Preprint, 2022, §7, p. 20.
  12. [12]T. H. D. Phan, C. Crespelle, and A. Richard. Tensor product of functional graphs: algorithms for factorization and polynomial root-finding restricted to the cycle part. SSRN 5316210, 2025.
  13. [13]A. E. Porreca. The semiring of dynamical systems. Author’s account, 28 June 2020, and CANA seminar slides, 6 October 2020, PDF pp. 91–94.DOI
  14. [14]A. E. Porreca and M. Rolland. Solving pseudo-injective polynomial equations over finite dynamical systems. In AUTOMATA 2025, LNCS 15831, 171–187, 2025. Publisher. arXiv:2504.06986.arxiv.org/abs/2504.06986
  15. [15]A. E. Porreca and M. Rolland. Injective and pseudo-injective polynomial equations: from permutations to dynamical systems. arXiv:2604.04065v2, 2026. See also the CiE 2025 paper on injectivity.arxiv.org/abs/2604.04065
  16. [16]S. Riva. Factorisation de systèmes dynamiques discrets. Doctoral thesis, 2022. University repository.
  17. [17]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. Author’s copy.
  18. [18]J. B. Rosser and L. Schoenfeld. Approximate formulas for some functions of prime numbers. Illinois Journal of Mathematics 6, 64–94, 1962. doi:10.1215/ijm/1255631807.DOI
  19. [19]L. G. Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing 8, 410–421, 1979. doi:10.1137/0208032.DOI
  20. [20]L. G. Valiant and V. V. Vazirani. NP is as easy as detecting unique solutions. Theoretical Computer Science 47, 85–93, 1986. Publisher.

Paper details

vlnc:W_rjz5f4zs
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
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 ChatGPT, Anthropic Claude Opus

View statement
Looking for related papers…
Contents