Skip to main content
Log in

First-Order Orbit Queries

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

Orbit Problems are a class of fundamental reachability questions that arise in the analysis of discrete-time linear dynamical systems such as automata, Markov chains, recurrence sequences, and linear while loops. Instances of the problem comprise a dimension \(d\in \mathbb {N}\), a square matrix \(A\in \mathbb {Q}^{d\times d}\), and a query regarding the behaviour of some sets under repeated applications of A. For instance, in the Semialgebraic Orbit Problem, we are given semialgebraic source and target sets \(S,T\subseteq \mathbb {R}^{d}\), and the query is whether there exists \(n\in {\mathbb {N}}\) and xS such that AnxT. The main contribution of this paper is to introduce a unifying formalism for a vast class of orbit problems, and show that this formalism is decidable for dimension d ≤ 3. Intuitively, our formalism allows one to reason about any first-order query whose atomic propositions are a membership queries of orbit elements in semialgebraic sets. Our decision procedure relies on separation bounds for algebraic numbers as well as a classical result of transcendental number theory—Baker’s theorem on linear forms in logarithms of algebraic numbers. We moreover argue that our main result represents a natural limit to what can be decided (with respect to reachability) about the orbit of a single matrix. On the one hand, semialgebraic sets are arguably the largest general class of subsets of \(\mathbb {R}^{d}\) for which membership is decidable. On the other hand, previous work has shown that in dimension d = 4, giving a decision procedure for the special case of the Orbit Problem with singleton source set S and polytope target set T would entail major breakthroughs in Diophantine approximation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

Notes

  1. Note that this representation is not unique.

  2. Technically, the indices should be I,JI, but we omit the dependency of J on I for simplicity.

  3. Formally, only rational numbers should be allowed. However, the results of this section are meant to apply for a formula obtained by removing quantifiers in a general fooq. Thus, we must account for algebraic numbers as well.

  4. By splitting modulo 2, we could actually improve the bound in the proposition from 4k to 2k, but this further complicates the proof.

  5. We use x1,x2,x3 to represent constants or variables from x1,…,xm. For readability, we do not introduce double indices for these variables.

References

  1. Almagor, S., Ouaknine, J., Worrell, J.: The polytope-collision problem. In: 44Th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, pp. 24:1–24:14. Warsaw (2017)

  2. Almagor, S., Ouaknine, J., Worrell, J.: The semialgebraic orbit problem. In: 36Th International Symposium on Theoretical Aspects of Computer Science, STACS 2019, March 13-16, 2019, pp. 6:1–6:15. Berlin (2019)

  3. Baker, A., Wüstholz, G.: Logarithmic forms and group varieties. J. Reine Angew. Math 442(19-62), 3 (1993)

    MathSciNet  MATH  Google Scholar 

  4. Basu, S., Pollack, R., Roy, M.-F.: Algorithms in real algebraic geometry, vol. 20033, Springer (2005)

  5. Chonev, V., Ouaknine, J., Worrell, J.: The polyhedron-hitting problem. In: Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 940–956. SIAM (2015)

  6. Chonev, V., Ouaknine, J., Worrell, J.: On the complexity of the orbit problem. J. ACM 63(3), 23:1–23:18 (2016)

    Article  MathSciNet  Google Scholar 

  7. Cohen, H.: A course in computational algebraic number theory, vol. 138, Springer Science & Business Media (2013)

  8. Collins, G.E.: Quantifier elimination for real closed fields by cylindrical algebraic decompostion. In: Automata Theory and Formal Languages 2Nd GI Conference Kaiserslautern, May 20–23, 1975, pp. 134–183. Springer (1975)

  9. Gantmacher, F.R.: The Theory of Matrices. Number v. 2 in The Theory of Matrices Chelsea Publishing Company (1959)

  10. Halava, V., Harju, T., Hirvensalo, M., Karhumäki, J.: Skolem’s problem – on the border between decidability and undecidability. Technical Report 683 Turku Centre for Computer Science (2005)

  11. Harrison, M.A.: Lectures on Linear Sequential Machines. Technical report, DTIC Document (1969)

  12. Kannan, R., Lipton, R.J.: The orbit problem is decidable. In: Proceedings of the Twelfth Annual ACM Symposium on Theory of Computing, pp. 252–261. ACM (1980)

  13. Kannan, R., Lipton, R.J.: Polynomial-time algorithm for the orbit problem. J. ACM (JACM) 33(4), 808–821 (1986)

    Article  MathSciNet  Google Scholar 

  14. Lafferriere, G., Pappas, G.J., Yovine, S.: Symbolic reachability computation for families of linear vector fields. J. Symb Comput. 32(3), 231–253 (2001)

    Article  MathSciNet  Google Scholar 

  15. Mignotte, M.: Some useful bounds. In: Computer Algebra, pp. 259–263. Springer (1983)

  16. Mignotte, M., Shorey, T., Tijdeman, R.: The distance between terms of an algebraic recurrence sequence. J. für die reine und angewandte Math., 349 (1984)

  17. Müller-Olm, M., Seidl, H.: Computing polynomial program invariants. Inf. Process. Lett. 91(5), 233–244 (2004)

    Article  MathSciNet  Google Scholar 

  18. Ouaknine, J., Worrell, J.: Ultimate Positivity is Decidable for Simple Linear Recurrence Sequences. In: International Colloquium on Automata, Languages, and Programming, pp. 330–341. Springer (2014)

  19. Pan, V.Y.: Optimal and nearly optimal algorithms for approximating polynomial zeros. Comput. Math. Appl. 31(12), 97–138 (1996)

    Article  MathSciNet  Google Scholar 

  20. Renegar, J.: A faster PSPACE algorithm for deciding the existential theory of the reals. In: 29Th Annual Symposium on Foundations of Computer Science, pp 291–295. White Plains, New York (1988)

  21. Renegar, J.: On the computational complexity and geometry of the first-order theory of the reals. part i: Introduction. preliminaries. the geometry of semi-algebraic sets. the decision problem for the existential theory of the reals. J. Symb. Comput. 13(3), 255–299 (1992)

    Article  MathSciNet  Google Scholar 

  22. Tao, T.: Structure and randomness: pages from year one of a mathematical blog. American Mathematical Soc. (2008)

  23. Tarski, A.: A decision method for elementary algebra and geometry (1951)

  24. Vereshchagin, N.K.: Occurrence of zero in a linear recursive sequence. Mathematical notes of the Academy of Sciences of the USSR 38(2), 609–615 (1985)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shaull Almagor.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article belongs to the Topical Collection: Special Issue on Theoretical Aspects of Computer Science (2019)

Guest Editors: Rolf Niedermeier and Christophe Paul

Joël Ouaknine is supported by ERC grant AVS-ISS (648701) and by DFG grant 389792660 as part of TRR 248 (see https://perspicuous-computing.science). James Worrell is supported by EPSRC Fellowship EP/N008197/1. Shaull Almagor has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skodowska-Curie grant agreement No 837327.

Appendices

Appendix A: The case of only real eigenvalues

In this section we consider the Semialgebraic Orbit Problem in the case where the matrix A has only real eigenvalues, denoted ρ1,ρ2,ρ3. In this case, by converting A to Jordan normal form, there exists an invertible matrix \(B\in (\AA \cap {\mathbb {R}})^{3\times 3}\) such that one of the following holds:

  1. 1.

    \(A=B^{-1}\left (\begin {array}{ccc} \rho _{1} & 0 & 0\\ 0 & \rho _{2} & 0\\ 0& 0 & \rho _{3} \end {array}\right )B\), in which case \(A^{n}=B^{-1}\left (\begin {array}{ccc} {\rho _{1}^{n}} & 0 & 0\\ 0 & {\rho _{2}^{n}} & 0\\ 0& 0 & {\rho _{3}^{n}} \end {array}\right )B\).

  2. 2.

    \(A=B^{-1}\left (\begin {array}{ccc} \rho _{1} & 1 & 0\\ 0 & \rho _{2} & 0\\ 0& 0 & \rho _{3} \end {array}\right )B\) with ρ1 = ρ2, in which case \(A^{n}=B^{-1}\left (\begin {array}{ccc} {\rho _{1}^{n}} & n\rho _{1}^{n-1} & 0\\ 0 & {\rho _{1}^{n}} & 0\\ 0& 0 & {\rho _{3}^{n}} \end {array}\right )B\).

  3. 3.

    \(A=B^{-1}\left (\begin {array}{ccc} \rho _{1} & 1 & 0\\ 0 & \rho _{2} & 1\\ 0& 0 & \rho _{3} \end {array}\right )B\) with ρ1 = ρ2 = ρ3, in which case An = B− 1 \(\left (\begin {array}{ccc} {\rho _{1}^{n}} & n\rho _{1}^{n-1} & \frac 12n(n-1)\rho _{1}^{n-2}\\ 0 & {\rho _{1}^{n}} & n\rho _{1}^{n-1}\\ 0& 0 & {\rho _{1}^{n}} \end {array}\right )B\).

In any of the forms above, we can write

$$ A^{n} s=\left( \begin{array}{ccc} A_{1}(n){\rho_{1}^{n}}+B_{1}(n){\rho_{2}^{n}}+C_{1}(n){\rho_{3}^{n}}\\ A_{2}(n){\rho_{1}^{n}}+B_{2}(n){\rho_{2}^{n}}+C_{2}(n){\rho_{3}^{n}}\\ A_{3}(n){\rho_{1}^{n}}+B_{3}(n){\rho_{2}^{n}}+C_{3}(n){\rho_{3}^{n}} \end{array}\right) $$

where the Ai,Bi, and Ci are polynomials whose degree is less than the multiplicity of their corresponding eigenvalue.

In Sections 4 and 5, we reduce the problem to finding a solution to an almost self-conjugate system. In the case of real eigenvalues, the notion of almost self-conjugate is meaningless, as there are no complex numbers involved. Thus, following the analysis thereof, and plugging the entries of Ans, we reduce the problem to solving a system of expressions of the form \(\bigwedge _{J} R_{J}(A^{n}s)\sim _{J} 0\), where

$$ R_{J}(A^{n} s)= \sum\limits_{0\le p_{1},p_{2},p_{3}\le k} \alpha^{J}_{p_{1},p_{2},p_{3}}(n)\rho_{1}^{p_{1} n}\rho_{2}^{p_{2} n}\rho_{3}^{p_{3} n} $$
(4)

for some \(k\in {\mathbb {N}}\), and \(\alpha ^{J}_{p_{1},p_{2},p_{3}}(n)\) are polynomials.

Assuming ρ1,ρ2,ρ3 > 0 (otherwise we can split according to odd and even n), for each such expression we can compute a bound \(N\in {\mathbb {N}}\) based on the rate of growth of the summands, such that either for every n > N the equation holds, or for every n > N it does not hold.

Appendix B: The case where γ is a root of unity

We assume that \(\gamma =\frac {\lambda }{|\lambda |}\) is a root of unity. That is, there exists \(d\in {\mathbb {N}}\) such that γd = 1, so we have that \(\left \{\gamma ^{n}:n\in {\mathbb {N}}\right \}=\left \{\gamma ^{0},\ldots ,\gamma ^{d-1}\right \}\).

Let \(n\in {\mathbb {N}}\) and write m = (n mod d). We can now write

$$ A^{n}s=\left( \begin{array}{ccc} a_{1} |\lambda|^{n}\gamma^{m}+\overline{a_{1}}|\lambda|^{n}\overline{\gamma}^{m}+b_{1} \rho^{n}\\ a_{2} |\lambda|^{n}\gamma^{m}+\overline{a_{2}}|\lambda|^{n}\overline{\gamma}^{m}+b_{2} \rho^{n}\\ a_{3} |\lambda|^{n}\gamma^{m}+\overline{a_{3}}|\lambda|^{n}\overline{\gamma}^{m}+b_{3} \rho^{n} \end{array}\right) =\left( \begin{array}{ccc} 2\text{Re}(a_{1}\gamma^{m}) |\lambda|^{n}+b_{1} \rho^{n}\\ 2\text{Re}(a_{2}\gamma^{m}) |\lambda|^{n}+b_{2} \rho^{n}\\ 2\text{Re}(a_{3}\gamma^{m}) |\lambda|^{n}+b_{3} \rho^{n} \end{array}\right) $$

Observe that there exists \(n\in {\mathbb {N}}\) such that AnsT iff there exist 0 ≤ md − 1 and \(r\in {\mathbb {N}}\cup \left \{0\right \}\) such that Ard+msT. We can thus split our analysis according to \(m\in \left \{0,\ldots ,d-1\right \}\). For every such m, we need to decide whether there exists \(r\in {\mathbb {N}}\cup \left \{0\right \}\) such that \(\left (\begin {array}{ccc} 2\text {Re}(a_{1}\gamma ^{m}) |\lambda |^{m}(|\lambda |^{d})^{r}+b_{1} \rho ^{m}(\rho ^{d})^{r}\\ 2\text {Re}(a_{2}\gamma ^{m}) |\lambda |^{m}(|\lambda |^{d})^{r}+b_{2} \rho ^{m}(\rho ^{d})^{r}\\ 2\text {Re}(a_{3}\gamma ^{m}) |\lambda |^{m}(|\lambda |^{d})^{r}+b_{3} \rho ^{m}(\rho ^{d})^{r} \end {array}\right )\) Note that γm, |λ|m and ρm are constants. Therefore, these expressions contain only realalgebraic constants, the system can be viewed as a case handled in the setting of all real eigenvalues. We can thus proceed with the analysis in Section A.

Finally, we remark that \(d\le \deg (\gamma )^{2}\). The proof appears in [13], and we bring it here for completeness. Since γ is a primitive root of unity of order d, then the defining polynomial pγ of γ is the d-th Cyclotomic polynomial, so \(\deg (\gamma )={\Phi }(d)\), where Φ is Euler’s totient function. Since \({\Phi }(d)\ge \sqrt {d}\), we get that \(d\le \deg (\gamma )^{2}\). Therefore, the number of cases we consider is polynomial in the original input, and does not involve a blowup in the complexity.

Appendix C: Change of Basis Matrices in the 3 × 3 case

In this section we consider a diagonalisable matrix \(A\in {\mathbb {Q}}^{3\times 3}\) with complex eigenvalues. Thus, we can write A = PDP− 1 with \(D=\text {diag}(\lambda ,\overline {\lambda },\rho )\) with λÅ and \(\rho \in \AA \cap {\mathbb {R}}\).

Note that the columns of the matrix P are eigenvectors of A, and moreover, conjugate eigenvalues have conjugate eigenvectors and real eigenvalues have real eigenvectors. We can therefore assume

$$ P=\left( \begin{array}{ccc} a & \overline{a} & d\\ b & \overline{b} & e\\ c & \overline{c} & f \end{array}\right) $$

for a,b,cÅ and \(d,e,f\in {\mathbb {R}}\cap \AA \).

Lemma 4

Let E = diag(δ1,δ2,δ3) be a diagonal matrix, then every coordinate of PEP− 1 is of the form \(\alpha \delta _{1}+\overline {\alpha }\delta _{2}+\upbeta \delta _{3}\), where αÅ and \(\upbeta \in \AA \cap {\mathbb {R}}\).

Proof

The proof is straightforward: we compute the matrix P− 1, and then the product PEP− 1.

We leave it to the reader to verify the following: first, the determinant of P is pure-imaginary, i.e., \(\det (P)=mi\) for \(m\in {\mathbb {R}}\cap \AA \). Second, we have

$$ P^{-1}=\frac{1}{mi}\left( \begin{array}{ccc} f \overline{b}-e \overline{c} & d \overline{c}-f \overline{a} & e \overline{a}-d \overline{b} \\ c e-b f & a f-c d & b d-a e \\ b \overline{c}-c \overline{b} & c \overline{a}-a \overline{c} & a \overline{b}-b \overline{a} \end{array}\right) $$

Finally, it is very easy (yet tedious) to verify that PEP− 1 satisfies the claim. We demonstrate by computing the coordinate (PEP− 1)1,2.

We have that the first row of PE is \((a\delta _{1} , \overline {a}\delta _{2} , d \delta _{3} )\), and hence

$$ \begin{array}{@{}rcl@{}} (PEP^{-1})_{1,2}&=&(PE)_{1,1}P^{-1}_{1,2}+(PE)_{1,2}P^{-1}_{2,2}+(PE)_{1,3}P^{-1}_{3,2}\\ &=&\frac{1}{mi}\left( a\delta_{1}(d \overline{c}-f \overline{a})+ \overline{a}\delta_{2}(a f-c d)+d \delta_{3} (c \overline{a}-a \overline{c})\right)\\ &=&\frac{1}{m}\left( -i \delta_{1}(ad \overline{c}-a f\overline{a})+i \delta_{2}(\overline{a}c d - a f \overline{a})- i \delta_{3} (d c \overline{a}-d a \overline{c})\right) \end{array} $$

It is now easy to see that the coefficients of δ1 and δ2 are conjugates, and the coefficient of δ3 is real, as desired. □

Appendix D: Bounds on the Description Size of Points in Z f

We complete the analysis of Remark 2.

Recall that \(f(z)={\sum }_{m=0}^{k}{\upbeta }_{m} z^{m} +\overline {{\upbeta }_{m}}\overline {z}^{m}\), and \(Z_{f}=\left \{z: f(z)=0 \wedge |z|=1\right \}\). Further recall that for every 0 ≤ mk, βm is a polynomial in \(a_{1},a_{2},a_{3},\overline {a_{1}},\overline {a_{2}},\overline {a_{3}},b_{1},b_{2},b_{3}\), where all the latter are linear combinations of roots of the characteristic polynomial of A, and are therefore algebraic numbers of degree at most 3 and description polynomial in \({\left \lVert A\right \rVert }+{\left \lVert s\right \rVert }\).

We can now express the condition f(z) = 0 using a quantified formula in the first-order theory of the reals by replacing each of the constants above (i.e. a1, etc.) by their corresponding description, as per Section 2.2. It follows that in this description, there are at most 9 variables. We now employ the following result due to Renegar [21].

Theorem 5 (Renegar)

Let \(M \in {\mathbb {N}}\) be fixed. Let τ(y) be a formula of the first-order theory of the reals. Assume that the number of (free and bound) variables in τ(y) is bounded by M. Denote the degree of τ(y) by d and the number of atomic predicates in τ(y) by n.

There is a polynomial time (polynomial in \({\left \lVert \tau (\mathbf {y})\right \rVert }\)) procedure which computes an equivalent quantifier-free formula

$$ \begin{array}{@{}rcl@{}} \chi(\mathbf{y}) = \bigvee\limits_{i=1}^{I} \bigwedge\limits_{j=1}^{J_{i}} h_{i,j}(y) \sim_{i,j} 0 \end{array} $$

where each \(\sim _{i,j}\) is either > or =, with the following properties:

  1. 1.

    Each of I and Ji (for 1 ≤ iI) is bounded by \((n+d)^{O(1)}\).

  2. 2.

    The degree of χ(y) is bounded by (n + d)O(1).

  3. 3.

    The height of χ(y) is bounded by \(2^{{\left \lVert \tau (\mathbf {y})\right \rVert }(n+d)^{O(1)}}\).

We apply this theorem to the description of Zf given above, where we identify \({\mathbb {C}}\) with \({\mathbb {R}}^{2}\) so that f is indeed a polynomial. Then, we obtain in polynomial time a description of Zf. Moreover, the degrees of the entries is bounded by \({\left \lVert f\right \rVert }^{{\mathcal {O}}(1)}\) and their height is bounded by \(2^{{\left \lVert f\right \rVert }^{{{\mathcal {O}}(1)}}}\).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Almagor, S., Ouaknine, J. & Worrell, J. First-Order Orbit Queries. Theory Comput Syst 65, 638–661 (2021). https://doi.org/10.1007/s00224-020-09976-7

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-020-09976-7

Keywords

Navigation