Abstract 1 Introduction 2 Preliminaries 3 Cycles 4 Generalized Collatz sequences 5 Self-avoiding Traces 6 Proofs 7 Conclusion References

Loop Termination and Generalized Collatz Sequences

Mishel Carelli ORCID CISPA Helmholtz Center for Information Security, Saarbrücken, Germany
Abstract

Linear-constraint loops are programs whose transition relation is specified by a system of linear inequalities. The termination problem asks, given a loop, whether it admits an infinite computation. Decidability of termination remains open for linear-constraint loops over integers, rationals, and reals. We focus on loops over integers and show that they are tightly connected to generalized Collatz sequences – integer sequences generated by maps that are linear on each residue class modulo a fixed natural number. We prove that termination of one-variable linear-constraint loops is decidable in polynomial time, provided a long-standing conjecture about generalized Collatz sequences holds. Conversely, we show that any decision procedure for one-variable loops would prove or refute specific instances of this conjecture, which remain open. Moreover, we show that if a one-variable loop has a cyclic trace, then it also has a cyclic trace of length at most two.

Keywords and phrases:
Program Verification, Loop Termination, Generalized Collatz Sequences, Linear-Constraint Loops
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Funding:
Mishel Carelli: This work was supported by the European Research Council (ERC) Grant HYPER (No. 101055412).
Copyright and License:
[Uncaptioned image] © Mishel Carelli; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic and verification
Related Version:
Full Version: https://arxiv.org/abs/2605.15094
Acknowledgements:
I want to thank Arkadiy Aliev, Bernd Finkbeiner, and Joël Ouaknine for the useful discussions.
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Termination analysis is a long-standing topic in theoretical computer science. The Halting Problem – deciding whether a Turing machine halts on a given input – is undecidable, going back to Turing’s original work. Nevertheless, termination can become decidable when restricted to certain classes of programs.

In this paper, we analyze the open problem of termination for Single-Path Linear-Constraint Loops (SLC). This problem originates in program analysis and verification, where incomplete but efficient approaches such as ranking functions [22] and transition invariants [21] are used as building blocks in verification tools to prove termination and other liveness properties [8, 21, 10] and in Horn Clauses solvers [5, 27].

SLCs are loops of the form

while(C𝒙d)doA(𝒙𝒙)b. (1)

Here, 𝒙 is the vector of values of the program variables in the current step, and 𝒙 denotes their values in the next step. Moreover, A and C are matrices with rational coefficients, and b and d are rational vectors. Later in the paper, we introduce an equivalent definition with the loop guard omitted. The decision problem is: given such a loop, does there exist an infinite computation with program variables taking values in from some initial state?

The question of whether this problem is decidable was posed two decades ago [7], and remains open to this day, not only for loops over , but also over and . Recently, decidability over has been established in the two-variable case [9].

Decidability of termination varies across loop classes. We now discuss two additional classes of linear loops to illustrate the current landscape.

On the positive side, a prominent decidable class of linear loops called affine SLCs, in which the transition is deterministic and has the form

𝐰𝐡𝐢𝐥𝐞(C𝒙d)𝐝𝐨𝒙:=A𝒙+b.

Termination of affine SLCs has been proved decidable over [26] – via spectral analysis of A – over [7], by symbolic reasoning about matrix powers through eigenvalues, and over [11], using different tools from geometry of numbers, such as the Khachiyan–Porkolab result on deciding whether a convex semi-algebraic set contains an integer point.

On the negative side, another relevant class of linear loops called Multi-Path Linear-Constraint Loops, which allows conditional choice among several linear updates:

𝐰𝐡𝐢𝐥𝐞(true)𝐝𝐨𝒙:={A1𝒙+b1if C1𝒙d1,Ak𝒙+bkif Ck𝒙dk.

Termination of such multi-path loops is undecidable over and [6] and over [1], even for k=2, via encodings of counter machines.

In [7], Braverman asked: “How much nondeterminism can be introduced in a linear loop with no initial conditions before termination becomes undecidable?” Motivated by this question and in light of the subsequent results, SLCs occupy an intriguing middle ground between deterministic, decidable affine SLCs and highly expressive, undecidable multi-path loops. Because nondeterminism in SLCs is convex, it does not allow for modeling the unstructured nondeterminism of counter machines, at least not in a straightforward way.

In [2], the authors show that allowing a single irrational coefficient makes SLC termination undecidable over , and they describe the SLC termination problem as “the most intriguing” among loop-termination problems.

For a complete explanation of these results and further references, we refer the reader to the recent survey on linear loop termination [3].

In this work, we study the SLC termination problem for the case of one variable. While this restriction may seem severe, we show that this problem is deeply non-trivial even for one-variable loops, connecting it with a long-standing number theoretic conjecture about generalized Collatz sequences.

The study of Generalized Collatz sequences is a long-standing topic in number theory [18, 17, 15, 19, 13, 16]. These integer sequences are generated by generalized Collatz mappings of the form

T(x)=mixrid,if xi (mod d)

The Uniform Distribution conjecture [18] asserts that every unbounded generalized Collatz sequence is uniformly distributed modulo dα for every α. We formulate a weaker statement, the Reachability Conjecture, which posits that every sequence generated by generalized Collatz mappings of a certain type called weak Collatz mappings, reaches a certain residue class modulo d at least once. We prove the Reachability Conjecture for d=2.

Our main result shows that, if the Reachability Conjecture holds, then termination of one-variable SLCs is decidable in polynomial time.

For the other direction, we show that any algorithm deciding termination of one-variable SLCs would, given a weak Collatz mapping, determine whether the Reachability Conjecture holds for all sequences generated by that mapping. All cases with modulus d>2 remain open. This suggests that further progress on SLC decidability will require a deeper understanding of generalized Collatz sequences.

Let us give the high-level explanation of the results of this paper and its structure.

Section 2 introduces the basic definitions and notation. In particular, we define the SLC termination problem and split it into two subproblems: deciding the existence of cycles (finite traces from some state to itself), and deciding the existence of self-avoiding traces (infinite traces that never repeat a state).

Section 3 studies cycles. We show that deciding the existence of a cycle of a bounded length can be reduced to an instance of Integer Linear Programming problem. The main result of this section is that for a one-variable loop, the existence of any cycle implies the existence of a cycle of length at most two; hence cycle-detection problem is decidable for one-variable loops.

Section 4 introduces generalized Collatz sequences, and states the Uniform Distribution and Reachability Conjectures. We prove the Reachability conjecture for the case d=2, and we prove that a one-variable SLC termination-checking algorithm, if it existed, could verify specific open instances of this conjecture.

Section 5 analyzes self-avoiding traces and shows that, assuming the Reachability Conjecture, termination of one-variable SLCs is decidable in polynomial time. The proof is geometric in nature. We view the transition relation as a polyhedron in 2 and analyze its Minkowski-Weyl decomposition. Intuitively, we identify where the transition polyhedron “points to”. Simplifying, the self-avoiding trace exists if the polyhedron points in the direction where the absolute value of the variable grows. However, several corner cases arise, in one of which, the trace of SLC forms a weak Collatz sequence, which avoids a certain residue class modulo d. If the Reachability conjecture holds, we can conclude that this kind of execution needs to terminate. Otherwise, the presented approach results in a semi-algorithm, which does not give an answer in these specific cases.

Section 6 presents the formal proofs of the results from Sections 3, 4, and 5.

Section 7 summarizes the results.

2 Preliminaries

2.1 Notation

We denote the sets of natural numbers, integers, rationals, and reals by ,,, and , respectively. The sets of positive, negative, and nonnegative real numbers are denoted by +, , and 0.

Given Sn, we write S:=Sn for its set of integer points.

Given T2n and zn, define the slice Tz:={x2n(z,x2)T}.

Vectors v1,v2n are collinear if there exists r such that v1=rv2; we write v1v2. If v1 and v2 are not collinear, we write v1v2.

For p,q, gcd(p,q) denotes the greatest natural number that divides both p and q.

For x define

sign(x):={1if x>0,1if x<0,0if x=0.

2.2 Convex sets and the Minkowski–Weyl theorem

Given S1,S2n, the Minkowski sum is

S1+S2:={y+zyS1,zS2}.

A set Kn is convex if for all x,yK and all λ[0,1], we have λx+(1λ)yK.

The topological closure of Sn is denoted cl(S) (the set of limits of the sequences of elements of S). A set S is closed if S=cl(S).

Intersections of families of closed sets are closed, and intersections of families of convex sets are convex.

Definition 1.

Let Sn.

  1. 1.

    A convex hull of S is defined by

    conv(S)={i=1kαivik,αi[0;1],viS,i=1kαi=1}
  2. 2.

    A nonnegative (conic) hull is defined by

    nonneg(S)={i=1kαivik,αi0,viS}

A convex cone is a set Cn such that for every c1,c2C and every λ0, we have λc1C and c1+c2C. Every convex cone is a convex set.

Definition 2.

Let Kn be a nonempty convex set. The recession cone of K is

rec(K):={vnK+0vK}.

For every nonempty convex K, rec(K) is a closed convex cone. A cone K is pointed if K(K)=0.

The following classical result appears in §8.9 of [24].

Theorem 3 (Minkowski–Weyl Theorem).

Let Pn. The following are equivalent:

  1. 1.

    P is a polyhedron, i.e., P={xnAxb} for some Ak×n and bk.

  2. 2.

    There exist w1,wlP and v1,,vmn, such that

    P=conv(w1,,wl)+rec(P)=conv(w1,,wl)+nonneg(v1,,vm)

Moreover, if P is given by linear inequalities with rational coefficients, then wi and vi can be chosen with rational entries.

Note that any polyhedron Pn is closed and convex, because every linear inequality defines a closed half-space in n and P is an intersection of finitely many half-spaces.

The following result trivially follows from basic results in convex geometry, but we present the proof of this exact formulation for the sake of completeness.

Proposition 4.

The following statements hold for closed convex cones C2.

  1. 1.

    C can be represented as nonneg(v1,,vm) for some vi2 with m3.

  2. 2.

    If v1,v22 and v1v2, then nonneg(v1,v2) contains no line in 2.

  3. 3.

    If C cannot be generated by two vectors, then C is either a half-plane or the whole plane.

Proof.

By §8.9 of [24], C decomposes as C=C+lin(C), where lin(C):=C(C) is the lineality space and C is a pointed cone.

If lin(C)=2, then C=2=nonneg((0,1),(1,0),(1,1)).

Assume lin(C) is a line, say nonneg(v,v), and C2. Then 2=H1H2lin(C), where H1 and H2 are the open half-planes with boundary lin(C). If CHi for some i1,2, then HiC. Hence C is either the line nonneg(v,v) or, if there exists vClin(C), a half-plane nonneg(v,v,v).

Finally, if lin(C)=0, then C=C is pointed and therefore generated by two vectors (see, e.g., Example 2.39 in [25]); in this case, it cannot contain a line by definition of pointedness.

The next statement is Corollary 8.3.3 in [23].

Proposition 5 (Recession cone of an intersection).

If P1 and P2 are closed convex sets with P1P2, then rec(P1P2)=rec(P1)rec(P2).

2.3 Loops

We consider Single-Path Linear-Constraint Loops (SLC). Throughout, SLCs are over the integers.

The vector of variables is 𝒙=(x1,,xn)T. A state is a valuation over integers, i.e., a vector in n. The vector of variables at the next step is 𝒙=(x1,,xn)T. An SLC is specified by a system of linear inequalities

A(𝒙𝒙)b, (2)

where Ak×2n and bk.

 Remark 6.

This definition differs from (1) in the Introduction because it omits an explicit loop guard. The two forms are expressively equivalent, since the guard can be encoded in the transition relation.

The transition polyhedron is the set 2n of vectors satisfying (2).

 Remark 7.

Since we study integer-valued loops, the actual transitions between states are elements of . We nevertheless work over the reals when convenient for proofs.

We identify an SLC with its transition polyhedron 2n, and denote it by . We denote the size of the binary encoding of A and b as ||.

A trace is a sequence of states s1,s2, such that (si,si+1) for all i1.

The SLC termination problem is to decide, for a given SLC, whether it has an infinite trace.

2.4 Cycles and Self-avoiding Traces

We divide the termination problem into two problems for two different types of infinite traces.

For an SLC, a cycle of length k is a finite trace s1,,sk,s1. The existence of a cycle implies the existence of an infinite trace. The converse need not hold:

Example 8.

The SLC x=x+1 has no cycle but admits an infinite trace.

An infinite trace s1,s2, is self-avoiding if sisj for all ij.

Observation 9.

An SLC has an infinite trace if and only if it has a cycle or a self-avoiding trace.

In the remainder of the paper, we analyze the problems of deciding the existence of a cycle and the existence of a self-avoiding trace separately for a given SLC.

3 Cycles

3.1 Bound on a cycle length

Although cycles are finite objects (unlike self-avoiding traces), deciding their existence for an SLC remains nontrivial, since a cycle can have arbitrary length. By contrast, deciding the existence of a cycle whose length is bounded is decidable.

Proposition 10.

Given an SLC and M, deciding whether has a cycle of length at most M is in 𝖭𝖯 with respect to ||M.

Proof.

It is known that the feasibility problem for Integer Linear Programming (ILP) – deciding whether a rational polyhedron contains an integer point – is 𝖭𝖯-complete [20]. We give a polynomial-time reduction from our problem to ILP.

Given and M, for each m{1,,M} we construct an ILP instance encoding the existence of a cycle of length exactly m:

Pm={(𝒙1,,𝒙m)(𝒙m,𝒙1)i<m:(𝒙i,𝒙i+1)}.

Then has a cycle of length at most M iff one of the polyhedra Pm contains an integer point. Each ILP instance has size 𝒪(||M).

Proposition 26 of [9] shows that for Linear-Constraint Loops over or , the existence of a bounded infinite sequence is equivalent to the existence of a cycle of length one. The next proposition shows that this equivalence fails over .

Proposition 11.

For every n, there exists an SLC over n variables that has a cycle of length 2n and no cycles of smaller length.

Proof.

Fix n and consider the set of states S:={0,1}n. Take any cycle C on S, so that each sS appears exactly once; |C|=2n. Let T be the set of transitions of C, so T{0,1}2n. Let :=conv(T), which as a convex hull of a finite set of integer points, can be defined as an SLC. We claim that =T, i.e., conv(T) has no integer points other than its vertices in T. This implies that the minimal cycle length of conv(T) is 2n.

Suppose, to the contrary, that there exists pT. Enumerate T={t1,,t2n} and write p=i=12nαiti with αi[0,1] and iαi=1. Without loss of generality, assume α1>0 and choose a coordinate j such that tj1pj (such a j exists since t1p). Because pj=i=12nαitji is an integer and each tji{0,1}, the only way the convex combination can be an integer is if all tji with αi>0 are equal. This contradicts tj1pj. Hence, no such p exists.

Since there is no universal bound on the minimal cycle length, it is natural to ask whether a bound depending on the number of variables exists.

Question 12.

For every n, does there exist a constant M(n) such that every loop over n variables that has a cycle also has a cycle of length at most M(n)?

If the answer to Question 12 is positive, then cycle detection reduces to checking for cycles of length at most M(n). If M(n) is computable, this yields decidability of cycle detection.

There exist convex sets that are not polyhedra (e.g., convex sets defined by quadratic inequalities). We now show that a positive answer to Question 12 extends from polyhedral relations to arbitrary convex relations.

Proposition 13.

Suppose that every SLC 2n with a cycle also has a cycle of length at most M(n). Then any convex relation 𝒯2n with a cycle also has a cycle of length at most M(n).

Proof.

If 𝒯 has a cycle represented by the set of transitions {t1,,tm}𝒯, then conv(t1,,tm)𝒯 by convexity. The polyhedron conv(t1,,tm) has a cycle and therefore, by hypothesis, has one of length at most M(n). This cycle is contained in 𝒯.

3.2 One variable case

The following Theorem shows that the answer to Question 12 is positive for n=1 with M(1)=2.

Theorem 14.

If an SLC 2 has a cycle, then it has a cycle of length at most 2.

Sketch of proof.

Let us informally explain the idea of the proof with an illustration from Figure 1(a). Consider the set of transitions of a cycle (the black points). The center of this set lies on the diagonal (the green point). If it has integer coordinates, then we obtain a length-one cycle. Otherwise, it lies on a unit square in the integer lattice. Two vertices of this unit square lie on the diagonal representing length-one cycles (the blue points). The other two vertices lie on the anti-diagonal, representing a length-two cycle (the red points). We then consider several cases, branching on the signs of different values, such as the largest value among the states of the cycle. In some cases, we show that contains points on the diagonal below or above the blue points, yielding the existence of the length-one cycles. In the remaining cases, we show contains points on the anti-diagonal on both sides of the green point, implying the existence of a length-two cycle. The formal argument is presented in Section 6.

(a) Cycle intuition.
(b) SLC +.
Figure 1:

4 Generalized Collatz sequences

The classical Collatz problem remains open. A key difficulty is its residue-class–dependent dynamics modulo 2. Several generalizations have been studied, replacing the modulus 2 by other moduli and considering related piecewise-linear maps [12]. In particular, the framework proposed by Möller [19] has been investigated both theoretically and empirically [16]. In this paper, we focus on the Uniform Distribution Conjecture of Matthews and Watts [18], formulated for Möller’s generalization.

Let d be a positive integer with d2. Let m0,,md1 be nonzero integers such that gcd(mi,d)=1 for every i. Let R={r0,,rd1} be a set of integers with the property that for each i, miiri(modd). Then the generalized Collatz mapping T: is given by

T(x):=mixrid,if xi (mod d)

For n we define the sequence {Tk(n)}k recursively by

Tk(n):={n,if k=0,T(Tk1(n)),if k>0

A sequence {sk}k is called unbounded if for every n there exists k such that |sk|>n.

We recall a longstanding number-theoretic conjecture, first stated by Matthews and Watts [18] and further discussed, with empirical support, in [16].

Conjecture 15 (Uniform Distribution Conjecture).

If the sequence {Tk(n)}k is unbounded, it is uniformly distributed modulo dα for each α1, i.e.

limN1Ncard{kNTk(n)i(moddα)}=1dα

for i=0,,dα1.

In this paper, we state a weaker version of this conjecture. First, let us define a more restricted class of generalized Collatz mappings.

Let d be a positive integer d2, let m be a nonzero integer with gcd(d,m)=1, and let a be an integer. Then a weak Collatz mapping T: is given by

T(x):=mx(a+i)d,where 0i<d, with mxa+i(mod d).
Conjecture 16 (Reachability Conjecture).

Let T be a weak Collatz mapping. Suppose for some n the sequence {Tk(n)}k is unbounded. Then there exists k0 such that mTk(n)a(modd).

The proofs of the next two propositions are presented in Section 6.

The following proposition implies that Conjecture 16 holds for mappings with d=2.

Proposition 17.

Let T be a generalized Collatz mapping with d>1. Suppose for some n the sequence {Tk(n)}k is unbounded. Then it visits at least two residue classes modulo d.

The next proposition links weak Collatz sequences to self-avoiding traces.

Proposition 18.

There exists a linear-time algorithm that takes as input a weak Collatz mapping T(x)=mx(a+i)d, with m>d, and outputs two one-variable SLCs, + and , such that:

  1. 1.

    + has an infinite trace if and only if there exists n such that, for every k0,

    mTk(n)a(modd)andTk(n)>0.
  2. 2.

    has an infinite trace if and only if there exists n such that, for every k0,

    mTk(n)a(modd)andTk(n)<0.

Proposition 18 implies that any decidability procedure for one-variable SLC termination, if it existed, could, given a weak Collatz mapping, determine whether the Reachability Conjecture holds for this particular mapping. This suggests that progress on decidability requires progress in understanding the behavior of weak Collatz sequences. We conclude with an example of a mapping for which the Reachability Conjecture remains, to our knowledge, open, and we are unaware of any results that imply it.

Example 19.

Consider the weak Collatz mapping

T(x)=4xi3,if 4xi(mod 3),

which can be rewritten as

T(x)=4x3.

For this particular T, it remains open whether it is true that for every n3 there exists k such that 3Tk(n).

Proposition 18 implies that this question is equivalent to the termination question for the SLC defined by

+:={(x,x)24x23x4x1 and x3}.

On the Figure 1(b), + is depicted as a red area, bounded by the two lines x=4x23 and x=4x13, starting from x=3, since for 3x, x<4x3.

5 Self-avoiding Traces

The following theorem is the main result of the paper.

Theorem 20.

If the Reachability Conjecture holds, then the termination of SLCs over one variable is decidable in polynomial time.

This section is devoted to proving Theorem 20. The treatment of cycles is given in Section 3. Now we turn our attention to self-avoiding traces. To determine the existence of self-avoiding traces, we make a case analysis, based on the geometric placement of in 2, split into four Lemmas 21, 23, 24, and 25. Before stating these lemmas, we introduce an auxiliary SLC that splits 2 into different parts.

Define the following sets.

I+={(x1,x2)20<x1<x2},I={(x1,x2)2x2<x1<0},
Δ+={(x1,x2)20<x1=x2},Δ={(x1,x2)2x1=x2<0},
Δ=Δ+Δ,I=I+I.

Note that the topological closure of I+, I and Δ are

cl(I+)=I+Δ+{(0,x2)2x20},
cl(I)=IΔ{(0,x2)2x20},
cl(Δ)=Δ{(0,0)}.

Recall that any SLC 2 can, by Theorem 3, be represented as

=conv(w1,wl)+rec()=conv(w1,,wl)+nonneg(v1,,vm),

with m3. Moreover, since is defined by the set of integer linear inequalities, we may assume that all wi and vi have rational coefficients.

The following case distinction, presented in four lemmas, is aimed at characterizing when a given SLC admits a self-avoiding trace, and is based on the number of generators of rec() and on the intersection of rec() with I+,I,Δ+ and Δ. Each lemma treats SLCs whose recession cone has a specific number of generators.

Lemma 21.

Let be an SLC. Suppose rec()=nonneg(v1,v2) and v1v2. Then:

  1. 1.

    If rec()I, then the loop has a self-avoiding trace.

  2. 2.

    If rec()(IΔ)=, then the loop does not have a self-avoiding trace.

  3. 3.

    If rec()Δ+ and I+, then the loop has a self-avoiding trace.

  4. 4.

    If rec()(IΔ)Δ and I=, then the loop does not have a self-avoiding trace.

  5. 5.

    If rec()Δ and I, then the loop has a self-avoiding trace.

  6. 6.

    If rec()(IΔ)Δ+ and I+=, then the loop does not have a self-avoiding trace.

Sketch of proof.

This lemma handles the case where rec() is pointed and generated by two noncollinear vectors. In this regime, is “large” in the sense that the number of integer points in its vertical slices, |n|, is unbounded as n varies. Consequently, we can decide whether the loop admits a self-avoiding trace by inspecting the direction of this cone.

Statements 1 and 2 are the essential ones.

The case where the recession cone intersects I, as in Figure 2(a), corresponds to Statement 1. In this case, it points in a direction in which the absolute value of the state increases; thus, admits a self-avoiding trace.

The case where the recession cone does not intersect IΔ, as in Figure 2(b), corresponds to Statement 2. In this case, it points only in directions in which the absolute value of the state decreases; thus, does not admit a self-avoiding trace.

The case in which the cone intersects Δ is slightly more delicate and requires analyzing the intersection I, which is done in the remaining statements.

The complete proof is given in Section 6.

(a) SLC that points towards I+.
(b) SLC that does not point towards IΔ.
Figure 2: SLC with recession cone generated by two noncollinear vectors.

The next lemma, Lemma 23, treats the case in which rec() is generated by a single vector. In this situation is infinite but “thin”: each vertical slice n is bounded. We quantify this thinness via the 0pt.

Definition 22.

For T2 and p, define the p-height of T by

0ptp(T):=sup{|Tz(1p)|z}.
Lemma 23.

Let be an SLC. Suppose rec()=nonneg(v) and v=(p,q) for p, q and GCD(p,q)=1. Then:

  1. 1.

    If |p|<|q|, sign(p)=sign(q) and 0pt|p|()|p|, then the loop has a self-avoiding trace.

  2. 2.

    If sign(p)sign(q), then the loop does not have a self-avoiding trace.

  3. 3.

    If |p|>1 and 1<0pt|p|()<|p|, then the loop does not have a self-avoiding trace if Conjecture 16 holds.

  4. 4.

    If |p|>1 and 0pt|p|()1, then the loop does not have a self-avoiding trace.

  5. 5.

    If 0pt|p|()=0, then the loop does not have a self-avoiding trace.

  6. 6.

    If |p|>|q|, then the loop does not have a self-avoiding trace.

  7. 7.

    If p=q=1 and I+, then the loop has a self-avoiding trace.

  8. 8.

    If p=q=1 and I+=, then the loop does not have a self-avoiding trace.

  9. 9.

    If p=q=1 and I, then the loop has a self-avoiding trace.

  10. 10.

    If p=q=1 and I=, then the loop does not have a self-avoiding trace.

Sketch of proof.

In this case, the cone is again pointed, but it is generated by a single vector. Since the cone is not “large” as in Lemma 21, it requires a more delicate analysis.

The cases where the recession cone does not intersect IΔ (Statements 2 and 6) are similar to Statement 2 of Lemma 21 and are handled in the same way.

The cases where the recession cone intersects I are the essential ones and correspond to Statements 1, 3, and 4, which are the most important in this Lemma.

The case where the height of is too small, as in Figure 3(a), corresponds to Statement 4. In this regime, traces correspond to a weak Collatz sequence that visits only one residue class. Thus, the non-existence of a self-avoiding trace follows from Proposition 17.

The case where the height of is large enough, as in Figure 3(b), corresponds to Statement 1. This case is analogous to Statement 1 of Lemma 21. Here we show the existence of a self-avoiding trace.

The case where the height of is at least 1 but less than |p|, as in Figure 1(b), corresponds to Statement 3. In this case, every trace is a weak Collatz sequence that visits fewer than |p| residue classes. If the Reachability Conjecture 16 holds, then the loop does not admit a self-avoiding trace.

The complete proof is presented in Section 6.

(a) Thin SLC.
(b) Thick SLC.
Figure 3: SLC with recession cone generated by one vector.
Lemma 24.

Let be an SLC. Suppose rec()=nonneg(v1,v2) and v1=v2=(p,q) for p0, q and GCD(p,q)=1. Then:

  1. 1.

    If 0<p<|q| and 0ptp()p, then the loop has a self-avoiding trace.

  2. 2.

    If p>1 and 1<0ptp()<p, then the loop does not have a self-avoiding trace if Conjecture 16 holds.

  3. 3.

    If p>1 and 0ptp()1, then the loop does not have a self-avoiding trace.

  4. 4.

    If 0pt|p|()=0, then the loop does not have a self-avoiding trace.

  5. 5.

    If p>|q|, then the loop does not have a self-avoiding trace.

  6. 6.

    If p=q and I, then the loop has a self-avoiding trace.

  7. 7.

    If p=q and I=, then the loop does not have a self-avoiding trace.

  8. 8.

    If p=q and 0pt1()2, then the loop has a self-avoiding trace.

  9. 9.

    If p=q and 0pt1()1, then the loop does not have a self-avoiding trace.

  10. 10.

    If p=0, then the loop does not have a self-avoiding trace.

Sketch of proof.

This lemma treats the case where rec() is a line (i.e., generated by vectors v1 and v1). In this setting, is unbounded but “thin”: each vertical slice n is bounded. Accordingly, we analyze the height 0ptp() to determine whether a self-avoiding trace exists.

The intuition is the same as in Lemma 23, but the argument requires some additional technicalities. The complete proof is presented in Section 6.

Lemma 25.

Let be an SLC. The following statements hold.

  1. 1.

    If rec()=nonneg(v1,v2,v3) and it cannot be generated by two vectors, then the loop has a self-avoiding trace.

  2. 2.

    If rec()={0}, then the loop does not have a self-avoiding trace.

Sketch of proof.

This Lemma analyzes the remaining two cases. The complete proof is presented in Section 6.

Finally, we are ready to prove the main theorem.

Proof of Theorem 20.

In fixed dimension, integer feasibility for rational polyhedra can be decided in polynomial time [14].

By Theorem 14, cycle detection for a one-variable SLC reduces to checking for cycles of length at most two. Each such check can be expressed as an ILP instance of dimension four, as in Proposition 10, and can therefore be performed in polynomial time.

Moreover, a Minkowski–Weyl decomposition of can be computed in polynomial time [4]. By Lemmas 21, 23, 24, and 25, the remaining analysis consists of a constant number of two-dimensional ILP feasibility checks, obtained by intersecting rec() with the cones I+,I,Δ+, and Δ, and, in certain cases, by computing the height.

It remains to argue that the height checks can also be carried out in polynomial time. If rec()=nonneg(v,v), then all vertical slices z are translates of one another; hence, the height is independent of z and can be computed from any single slice.

If =conv(w1,,w)+nonneg(v) with v=(p,q), sign(p)=sign(q), and gcd(p,q)=1, then the height of the slice z varies monotonically with z: it increases with z when p,q>0 and decreases with z when p,q<0.

Since conv(w1,,w) is bounded, there exists M such that the absolute values of the coordinates of all points in conv(w1,,w) are bounded by M.

Assume p,q>0. Then for any z2z1 we have z1+(z2z1)qpz2. Moreover, if z1M, then z1+(z2z1)qp=z2. Hence, it suffices to check the height at z=M.

If p,q<0, a symmetric argument shows that it suffices to check the height at z=M.

 Remark 26.

The algorithm in Theorem 20 can be used as a semi-algorithm without assuming that the Reachability Conjecture holds: one can repeat the case distinction from Lemmas 21, 23, 24, and 25. However, the procedure fails to return an answer in Case 3 of Lemma 23 and Case 2 of Lemma 24.

6 Proofs

6.1 Cycles

First, we state an auxiliary lemma.

Lemma 27.

Let a,α,b be integers. If sign(aα)=sign(bα)0, then

(baα2a+b2α,baα2a+b2α)conv((a,α),(α,b)).

Proof.

Define x=bαa+b2α. Note that 0<x<1 because sign(aα)=sign(bα)0.

Hence we obtain

x(a,α)+(1x)(α,b)conv((a,α),(α,b)).

Let us rewrite the expression.

x(a,α)+(1x)(α,b) =((bα)a+(aα)αb+a2α,(bα)α+(aα)bb+a2α)
=(baα2b+a2α,baα2b+a2α).

Proof of Theorem 14.

Suppose has a cycle C={s1,,sm}, where all si are different states (otherwise we can take a smaller cycle) and m>2. Then for every 1i<m: (si,si+1) and (sm,s1), so

(i=1msim,i=1msim).

Denote z:=i=1msim. Consider the translated relation :={(xz,yz)(x,y)} and translated states si:=siz. Then has a cycle (s1,,sm), and the corresponding average satisfies 0zz<1. Thus, without loss of generality, we may assume 0z<1. If z=0, then there is a cycle of length 1. Suppose this is not the case.

Let α denote the state of C with the largest absolute value, and let a and b be the neighboring states of α in C. Hence, (a,α) and (α,b) are in . Since |a|,|b||α| and all si are different, we have sign(aα)=sign(bα)0. Now we can apply Lemma 27 and obtain

(baα2a+b2α,baα2a+b2α)conv((a,α),(α,b)).

Denote β:=baα2a+b2α and consider the following cases.

Case 1: 𝜷𝟎 or 𝟏𝜷.

In this case, since 0z<1, either (0,0) or (1,1) can be expressed as a convex combination of (z,z) and (β,β), yielding a cycle of length one.

Case 2: 𝜶𝟎.

Note that αa,bα and a,b and α are distinct. Thus, a+b2α>0, and baα2<0, which implies β<0. Hence, the statement follows from Case 1.

Case 3: 𝟎<𝜶 and 𝟎<𝜷<𝟏.

Since 2α>a+b, rewriting β<1, we obtain

a+b2α<abα2,
α22α<abab,
(α1)2<(a1)(b1).

If, for some i, si=α, then we can take α instead of α and the statement follows from Case 2. Thus, we can assume that for every i we have α<si. Therefore,

|a|,|b|<α,
α<a,b<α,
α1<a1,b1<α1.

Hence inequality (α1)2<(a1)(b1) can be satisfied only if a=α+1 and b=α+2 or a=α+2 and b=α+1. Without loss of generality, assume the first case.

Then a is the smallest value in C. Let c denote the predecessor of a in C.

All states in C are different, and the length of C is at least 3, hence α+2c<α. Since sign(αa)=sign(ca)=1, then we can apply Lemma 27 to get

(αca2c+α2a,αca2c+α2a)conv((a,α),(c,a)),
(αc(α1)2c+3α2,αc(α1)2c+3α2).

If c<α1, then αc(α1)2c+3α20, hence (0,0)conv((αc(α1)2c+3α2,αc(α1)2c+3α2),(z,z)).

It remains to prove the statement for c=α1. Since (α1,1α) and (α,2α) are in we get that

(α12,32α)

It is easy to see that points (1,0) and (0,1) lie on the interval

[(α12,32α);(1α,α)],

because (α12,32α)=(12,12)+(α1,1α) and (1α,α)=(12,12)+(12α,α12). Hence, has a cycle of length 2.

6.2 Generalized Collatz Sequences

Proof of Proposition 17.

Assume the contrary, there exist T, n and i such that Tk(n)i (mod d) for every k0. Hence,

Tk+1(n)=miTk(n)rid.

We prove by induction on k, that for every k1

Tk(n)=nmikrij=0k1mijdk1jdk.

For k=1 we get T(n)=nmirid. Assuming the formula for k let us prove it for k+1,

Tk+1(n) =miTk(n)rid=mi(nmikrij=0k1mijdk1j)ridkdk+1
=nmik+1rij=0kmijdkjdk+1.

Hence, for every k1,

nmikrij=0k1mijdk1j0 (mod dk).

Multiplying it by mid yields

(mid)(nmikrij=0k1mijdk1j)=nmik+1ndmikri(mikdk)0 (mod dk).

Since dk0 (mod dk) and gcd(mi,d)=1, we obtain for every k that

nmindri0 (mod dk).

As this holds for all k and d>1, it follows that nmindri=0. Thus n=nmirid. Therefore Tk(n)=n for all k, contradicting unboundedness.

Proof of Proposition 18.

Recall that T has the form

T(x)=mx(a+i)d,if mxa+i(mod d)

Define

+:={(x,x)2mxad+1dxmxa1 and 0<x<x}

Note that,

+={(n,T(n))20<n<T(n) and mna(mod d)}.

Therefore every infinite trace of + is self-avoiding and corresponds to the unbounded sequence {mTk(n)}k with mTk(n)a(mod d), and Tk(n)>0, for every k0.

For the other direction, if there exists an infinite unbounded sequence {Tk(n)}k of positive values, then, since m>d, from some step it takes values large enough to have Tk(n)<Tk+1(n). It implies the existence of a self-avoiding trace of +.

The proof for

:={(x,x)2mxad+1dxmxa1 and 0>x>x}

is symmetric.

6.3 Self-avoiding Traces

Let us formulate an auxiliary notation and an auxiliary lemma.

C+={(x1,x2)2x10x2}C={(x1,x2)2x20x1}
Lemma 28.

Let v1,v2,w,u2 be nonzero vectors with v1v2, wC+, uC and w,unonneg(v1,v2). Then nonneg(v1,v2)Δ and nonneg(v1,v2)I.

Proof.

If wu, then nonneg(w,u) is a line contained in the closed cone nonneg(v1,v2), contradicting Proposition 4, since v1v2. Thus wu.

Let us prove that there exists α+, such that αw+(1α)ucl(Δ). Denote w=(w1,w2) and u=(u1,u2). Define α:=u2u1w1w2+u2u1. Since wC+ and uC, we obtain w1w20, u2u10 and since wu they cannot be both equal to 0. Hence denominator of α is nonzero and α0. A direct computation gives

αw+(1α)u =wu2u1w1w2+u2u1+uw1w2w1w2+u2u1
=(w1(u2u1)+u1(w1w2)w1w2+u2u1,w2(u2u1)+u2(w1w2)w1w2+u2u1)
=(w1u2u1w2w1w2+u2u1,w1u2u1w2w1w2+u2u1)cl(Δ).

Since wu we have αw+(1α)u(0,0), thus αw+(1α)uΔ. Recall that u,wnonneg(v1,v2), hence αw+(1α)uΔ.

Since αw+(1α)uv1, and αw+(1α)uv2, we get that αw+(1α)u is in the interior of nonneg(v1,v2), thus, some open neighborhood of αw+(1α)u is contained in nonneg(v1,v2), but any such neighborhood intersects I, since Δcl(I). Hence, the statement follows.

Proof of Lemma 21.

  1. 1.

    Without loss of generality assume nonneg(v1,v2)I+. The case when nonneg(v1,v2)I follows from the considered one applied to .

    The set nonneg(v1,v2)I+ is a (possibly nonclosed) convex cone as the intersection of two convex cones. Let us prove that it contains at least two noncollinear vectors. Indeed, for the contradiction, suppose there exists a vector v, such that every vector in nonneg(v1,v2)I+ is collinear to v. Thus, nonneg(v1,v2)I+nonneg(v).

    Informally, nonneg(v1,v2) contains “half of a neighborhood of v”. Formally, for angles π<ϵ1<ϵ2<π, let rotv(ϵ1,ϵ2) be the set of vectors vrot2 such that there exists an angle θ with ϵ1<θ<ϵ2 and vrot is the image of v under rotation by θ around the origin. Equivalently, rotv(ϵ1,ϵ2)={Rθvϵ1<θ<ϵ2}, where Rθ is the rotation matrix.

    Since vnonneg(v1,v2) and v1v2, there exists ϵ(0,π) such that either rotv(0,ϵ)nonneg(v1,v2) or rotv(ϵ,0)nonneg(v1,v2).

    Moreover, since I+ is open and vI+, we can choose ϵ>0 small enough such that rotv(ϵ,ϵ)I+. Consequently, one of the sets rotv(0,ϵ) or rotv(ϵ,0) is contained in nonneg(v1,v2)I+, contradicting the assumption that nonneg(v1,v2)I+nonneg(v).

    Hence, there are two non-collinear vectors w,unonneg(v1,v2)I+. Then

    |(nonneg(v1,v2)I+)n||nonneg(w,u)n|n|w|w|u|u||n.

    Hence, for sufficiently large n, there always exists a transition from n to a larger value, thus the loop has a self-avoiding trace.

  2. 2.

    Suppose there is a self-avoiding trace {si}i. If there are infinitely many negative and infinitely many positive states, then infinitely many indices i satisfy si<0<si+1 and infinitely many satisfy si>0>si+1. Thus, sets C+ and C are unbounded. In that case, their recession cones are non-empty, thus, by Proposition 5, there are non-zero vectors wrec()C+ and urec()C. Hence, by Lemma 28, rec()Δ. Contradiction.

    Suppose instead there are only finitely many negative si. The case when there are only finitely many positive si follows from the considered one for .

    Then there are infinitely many i such that si+1>si>0. By Theorem 3, =conv(w1,,wl)+rec(). Hence, for every i, there are wiconv(w1,,wl) and virec(), such that (si,si+1)=wi+vi. Consider the normalized vectors vivi along the infinite subsequence with si+1>si>0. Since it is an infinite sequence on a compact sphere, it must have a converging subsequence vijvij. Since for every j holds vijvijrec() this sequence must converge to vrec() and v=1. Let us prove that vcl(I+).

    Assume that vcl(I+). Since vijvij converges to v, for every ϵ there exists N, such that for every j>N, vijvijvϵ. Let us take ϵ<dist(v,cl(I+)). Thus, nonneg(v2vvϵ)cl(I+)=, hence by Proposition 5 rec(nonneg(v2vvϵ))rec(conv(w1,,wl)+I+)=, which implies that nonneg(v2vvϵ)(conv(w1,,wl)+I+) is bounded by Theorem 3. For every j>N, (sij,sij+1)wij=vijnonneg(v2vvϵ), but (sij,sij+1)I+, hence vijconv(w1,,wl)+I+. Since the sequence sij is unbounded and the set conv(w1,,wl) is bounded, the sequence vij is also unbounded, but it is contained in a bounded set. Thus vcl(I+) by contradiction.

    Since vcl(I+)rec() and rec()(I+Δ+)= we obtain v{(0,x2)2x2>0}, hence v=(0,1). There exists N, such that for every j>N holds |vijvij(0,1)|<0.1, hence vijvij{(x1,x2)x10}, because otherwise vijvijI+, which is impossible, since vijvijrec(). Since the set conv(w1,,wl) is bounded, the supremum sup{x1x2:(x1,x2)conv(w1,,wl)} is finite, denote it as K. Since sij=wij+vij from the proven above, for every j>N, 0<sij<K. That contradicts the distinctness of si and the assumption that there are only finitely many negative si.

  3. 3.

    If rec()Δ+, then Δ+rec(). If (a,b)I+, then (a,b)+Δ+, hence for any na it is always possible to make a transition to na+b. Thus, the loop has a self-avoiding trace.

  4. 4.

    Suppose there is a self-avoiding trace {si}i. If there are infinitely many negative and infinitely many positive states, then infinitely many indices i satisfy si<0<si+1 and infinitely many satisfy si>0>si+1. Thus, sets C+ and C are unbounded. In that case, their recession cones are non-empty, thus, by Proposition 5, there are non-zero vectors wrec()C+ and urec()C. Hence, by Lemma 28, rec()I. Contradiction.

    There cannot be only finitely many negative si, due to the argument identical to the argument in statement 2 of this lemma.

    If it contains only finitely many positive terms, then there is some index with 0>si>si+1, contradicting I=.

  5. 5.

    This statement follows from the statement 3 applied to .

  6. 6.

    This statement follows from the statement 4 applied to .

Proof of Lemma 23.

  1. 1.

    Assume 0<p<q. The case when q<p<0 follows from the considered one applied to .

    If 0pt|p|()p, then there exists z, such that

    |z(1p)|p.

    For any zz, using (p,q)rec() we can shift by (zz)/p along (p,q), which maps x1=z to x1=z and adds qp(zz) to the second coordinate. Hence

    |z(1p)||z(1p)+qp(zz)|=|z(1p)|p.

    Since |z| is convex |z(1p)|p implies that z contains at least p consecutive points from 1p, hence at least one of them is an integer. Thus |z|1.

    Since 0<p<q there exists N, such that for every zN, zI+. Hence, z[z+1;). Thus, for every z>max(N,z), it is possible to make a transition to a larger value. Hence, the loop has a self-avoiding trace.

  2. 2.

    Assume p<0<q. The case when q<0<p follows from the considered one applied to . In that case,

    rec()×+{(0,0)}.

    By Proposition 5 the set (2(×+)) is bounded. Therefore, any self-avoiding trace would eventually have to make transitions only from to +, which is impossible. Hence, no self-avoiding trace exists.

  3. 3.

    Assume 0<p,q. The case when p,q<0 follows from the considered one applied to . The case when sign(p)sign(q) follows from the statement 2 of this Lemma.

    Denote h=0pt|p|(). There exists z, such that |z(1p)|=h. Since is convex the points of z(1p) are of the form {qzaip}1ih for some a.

    Let us prove that for all z,

    z(1p)z(1p)+qp(zz). (3)

    For z>z since (p,q)rec() and zz>0 the following holds

    z(1p)+qp(zz)z(1p),

    but since |z(1p)|h we get (3).

    Suppose that z<z, then for any rz(1p), since (p,q)rec() and zz>0, we obtain r+qp(zz)z(1p). Thus, we get (3).

    Hence {(x,y)2y=qxaip, 1ih}.

    Non-existence of a self-avoiding trace follows from Conjecture 16, since h<p.

  4. 4.

    The proof is analogous to the proof of the statement 3, but at the end, instead of Conjecture 16, Proposition 17 needs to be applied.

  5. 5.

    In that case 2=, so the claim is immediate.

  6. 6.

    If |p|>|q|, then

    rec(){(x1,x2)2|x1|>|x2| or x1=x2=0}.

    Hence, the set {(x,y)2|x||y|} is bounded. Assume there is a self-avoiding trace {si}i. Then there are infinitely many i, such that |si|<|si+1|. Contradiction.

If p=q>0, then rec()=Δ+. If p=q<0, then rec()=Δ. Hence, the proofs of statements 6,7,8 and 9 are analogous to the proofs of statement 3, 4, 5 and 6 of Lemma 21 .

Proof of Lemma 24.

The proofs of 1, 2, 3, 4, 5, 6, and 7 are analogous to the proofs of Lemma 23, items 1, 3, 4, 5, 6, 7, and 8, respectively.

Assume p=q. Since gcd(p,q)=1 we have p=1, q=1.

Denote h=0pt1(). Take z, such that |z|=h. For every z,

z+(zz)z,

and since |z|h, equality holds

z+(zz)=z.

Denote 0=[a;b], then h=ba+1. Thus ={(x,y)ay+xb}. If h=1, then for every trace s1,s2,s3 we have s1+s2=s2+s3=a, hence s1=s3, the loop does not have a self-avoiding trace, thus statement 9 is proved.

If h2, then let us define a trace {si}i by

s1=2|a|,si+1={asi,if i is odd,bsi,if i is even.

For every odd i we get si+2=ba+si>si and si+1=asi<as1<a2|a|<0, hence this trace is self-avoiding. Thus, statement 8 is proved.

The statement 10 follows from the fact, that if p=0, then the set {xy.(x,y)} is bounded, thus an infinite trace can visit only the finite number of different states.

Proof of Lemma 25.

  1. 1.

    If rec()=nonneg(v1,v2,v3) and this cone cannot be generated by two vectors, then by Proposition 4 it is either a whole plane or a (closed) affine half-plane. In the former case, =2. For the latter case, note that any closed affine half-plane must intersect I, hence the argument of Lemma 21.1 applies and yields a self-avoiding trace.

  2. 2.

    If rec()={0}, then is bounded, hence any infinite trace can visit only a finite number of states and thus cannot be self-avoiding.

7 Conclusion

In this paper, we have studied the termination problem for SLCs over . We have observed that a loop has an infinite computation iff it admits either a cycle or a self-avoiding trace.

We first analyzed cyclic traces. For one-variable SLCs, we have proved that the existence of a cycle implies the existence of a cycle of length at most two. An open question is whether, for n>1, there exists a bound K(n) such that any n-variable loop that has a cycle also has one of length at most K(n).

Next, we have formulated the Reachability Conjecture for weak Collatz sequences – a special case of a long-standing conjecture – and proved it for modulus d=2. We have shown that a decision procedure for one-variable SLC termination would verify the Reachability Conjecture for specific mappings; for most mappings (in particular, all cases with d>2), the conjecture remains open.

Finally, assuming the Reachability Conjecture, we have established that termination of one-variable SLCs is decidable in polynomial time.

References

  • [1] Amir M. Ben-Amram. Mortality of Iterated Piecewise Affine Functions over the Integers: Decidability and Complexity. In Natacha Portier and Thomas Wilke, editors, 30th International Symposium on Theoretical Aspects of Computer Science (STACS 2013), volume 20 of Leibniz International Proceedings in Informatics (LIPIcs), pages 514–525, Dagstuhl, Germany, 2013. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2013.514.
  • [2] Amir M. Ben-Amram, Samir Genaim, and Abu Naser Masud. On the termination of integer loops. ACM Trans. Program. Lang. Syst., 34(4), 2012. doi:10.1145/2400676.2400679.
  • [3] Amir M. Ben-Amram, Samir Genaim, Joël Ouaknine, and James Worrell. Termination analysis of linear-constraint programs, 2025. doi:10.48550/arXiv.2509.06752.
  • [4] Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer-Verlag TELOS, Santa Clara, CA, USA, 3rd ed. edition, 2008.
  • [5] Tewodros A. Beyene, Corneliu Popeea, and Andrey Rybalchenko. Solving existentially quantified horn clauses. In Natasha Sharygina and Helmut Veith, editors, Computer Aided Verification, pages 869–882, Berlin, Heidelberg, 2013. Springer Berlin Heidelberg. doi:10.1007/978-3-642-39799-8_61.
  • [6] Vincent D. Blondel, Olivier Bournez, Pascal Koiran, Christos H. Papadimitriou, and John N. Tsitsiklis. Deciding stability and mortality of piecewise affine dynamical systems. Theor. Comput. Sci., 255(1–2):687–696, March 2001. doi:10.1016/S0304-3975(00)00399-6.
  • [7] Mark Braverman. Termination of integer linear programs. In Thomas Ball and Robert B. Jones, editors, Computer Aided Verification, pages 372–385, Berlin, Heidelberg, 2006. Springer Berlin Heidelberg. doi:10.1007/11817963_34.
  • [8] Byron Cook, Andreas Podelski, and Andrey Rybalchenko. Terminator: beyond safety. In Proceedings of the 18th International Conference on Computer Aided Verification, CAV’06, pages 415–418, Berlin, Heidelberg, 2006. Springer-Verlag. doi:10.1007/11817963_37.
  • [9] Quentin Guilmant, Engel Lefaucheux, Joël Ouaknine, and James Worrell. The 2-Dimensional Constraint Loop Problem Is Decidable. In Karl Bringmann, Martin Grohe, Gabriele Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 140:1–140:21, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2024.140.
  • [10] Matthias Heizmann, Jochen Hoenicke, Jan Leike, and Andreas Podelski. Linear ranking for linear lasso programs. In Dang Van Hung and Mizuhito Ogawa, editors, Automated Technology for Verification and Analysis, pages 365–380, Cham, 2013. Springer International Publishing. doi:10.1007/978-3-319-02444-8_26.
  • [11] Mehran Hosseini, Joël Ouaknine, and James Worrell. Termination of Linear Loops over the Integers. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019), volume 132 of Leibniz International Proceedings in Informatics (LIPIcs), pages 118:1–118:13, Dagstuhl, Germany, 2019. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2019.118.
  • [12] Jeffrey C. Lagarias. The 3x+1 problem: An overview, 2021. arXiv:2111.02635.
  • [13] George M. Leigh. A markov process underlying the generalized syracuse algorithm. Acta Arithmetica, 46:125–143, 1986. URL: https://api.semanticscholar.org/CorpusID:117635633.
  • [14] Hendrik W. Lenstra. Integer programming with a fixed number of variables. Math. Oper. Res., 8:538–548, 1983. doi:10.1287/MOOR.8.4.538.
  • [15] Keith R. Matthews. Some borel measures associated with the generalized collatz mapping. Colloquium Mathematicum, 63:191–202, 1992. URL: https://api.semanticscholar.org/CorpusID:54607478.
  • [16] Keith R Matthews. Generalized 3x+ 1 mappings: markov chains and ergodic theory. The ultimate challenge: The 3x, 1:79–103, 2010.
  • [17] Keith R. Matthews and A. M. Watts. A markov approach to the generalized syracuse algorithm. Acta Arithmetica, 45:29–42, 1985. URL: https://api.semanticscholar.org/CorpusID:118600406.
  • [18] Watts A. Matthews K. A generalization of hasse’s generalization of the syracuse algorithm. Acta Arithmetica, 43(2):167–175, 1984. URL: http://eudml.org/doc/205897.
  • [19] H. Möller. Über hasses verallgemeinerung des syracuse-algorithmus (kakutanis problem). Acta Arithmetica, 34:219–226, 1978. URL: https://api.semanticscholar.org/CorpusID:117690327.
  • [20] Christos H. Papadimitriou. On the complexity of integer programming. J. ACM, 28(4):765–768, October 1981. doi:10.1145/322276.322287.
  • [21] A. Podelski and A. Rybalchenko. Transition invariants. In Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004., pages 32–41, 2004. doi:10.1109/LICS.2004.1319598.
  • [22] Andreas Podelski and Andrey Rybalchenko. A complete method for the synthesis of linear ranking functions. In Verification, Model Checking, and Abstract Interpretation, 5th International Conference, VMCAI 2004, Venice, Italy, January 11-13, 2004, Proceedings, volume 2937, pages 239–251, January 2004. doi:10.1007/978-3-540-24622-0_20.
  • [23] R. Tyrrell Rockafellar. Convex Analysis. Princeton Landmarks in Mathematics and Physics. Princeton University Press, 1970.
  • [24] Alexander Schrijver. Theory of linear and integer programming. John Wiley & Sons, Inc., USA, 1986.
  • [25] Simon Telen. Introduction to toric geometry, 2022. arXiv:2203.01690.
  • [26] A. Tiwari. Termination of linear programs. In R. Alur and D. Peled, editors, Computer-Aided Verification, CAV, volume 3114 of LNCS, pages 70–82. Springer, July 2004. doi:10.1007/978-3-540-27813-9_6.
  • [27] Hiroshi Unno, Tachio Terauchi, and Eric Koskinen. Constraint-based relational verification. In Alexandra Silva and K. Rustan M. Leino, editors, Computer Aided Verification, pages 742–766, Cham, 2021. Springer International Publishing. doi:10.1007/978-3-030-81685-8_35.