Short Presburger arithmetic is hard

08/28/2017 ∙ by Danny Nguyen, et al. ∙ 0

We study the computational complexity of short sentences in Presburger arithmetic (Short-PA). Here by "short" we mean sentences with a bounded number of variables, quantifiers, inequalities and Boolean operations; the input consists only of the integer coefficients involved in the linear inequalities. We prove that satisfiability of Short-PA sentences with m+2 alternating quantifiers is Σ_P^m-complete or Π_P^m-complete, when the first quantifier is ∃ or ∀, respectively. Counting versions and restricted systems are also analyzed. Further application are given to hardness of two natural problems in Integer Optimizations.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1. Introduction

1.1. Outline of the results

We consider short Presburger sentences, defined as follows:

where the quantifiers alternate, the variables have fixed dimensions , and is a fixed Boolean combination of integer linear systems of fixed lengths (numbers of inequalities):

In other words, everything is fixed in (Short-PA), except for the entries of the matrices 

and of the vectors 

in . We also call a short Presburger expression.

The feasibility of short Presburger sentences is a well known open problem which we resolve in this paper. Connected to both Integer Programming and Computational Logic, it was called a “fundamental question” by Barvinok in a recent survey [Bar17]. Many precursors to (Short-PA) are well known, including

Integer Linear Programming


and Parametric Integer Programming:

where is a convex polyhedron given by . In both cases, the problems were shown to be in P, by Lenstra in 1982 and Kannan in 1990, respectively (Theorem 1.8). Traditionally, the lengths of the systems in both (IP) and (PIP) are not restricted. However, it is known that they both can be reduced to the case of a bounded length system (c.f. Sec. 8.1 [NP17c]).

Our main result is a complete solution of the problem. We show that for a fixed , deciding (Short-PA) is -complete (Theorem 1.5). This disproves111Assuming the polynomial hierarchy does not collapse. a conjecture by Woods [Woo04, 5.3] (see also [Woo15]), which claims that decision is in P.

Let us emphasize that until this work even the following special case remained open:

where and are convex polyhedra given by and , respectively. We also show that (GIP) is NP-complete (Theorem 1.2). This resolves an open problem by Kannan [Kan92].

Our reduction is parsimonious and also proves that the corresponding counting problem is #P-complete:

There is a natural geometric way to view these problems. Problem (IP) asks whether a given rational polyhedron contains an integer point. Problem (PIP) asks whether the projection of  contains all integer points in some polyhedron . Finally, problem (GIP) asks whether there is an -slice of a polyhedron for which the projection contains all integer points in some polyhedron .

1.2. Precise statements

For alternating quantifiers, we have the first hard instance of (Short-PA) :

Here is a short Presburger expression in , and . We can also define the counting problem

Theorem 1.1.

Deciding (Short-PA) is NP-complete, even for a short Presburger expression of at most inequalities in variables , , . Similarly, computing (Short-PA) in this case is #P-complete.

For systems of inequalities, we also get:

Theorem 1.2.

Deciding (GIP) is NP-complete, even for a system of at most inequalities in variables , , , when is an interval and is a triangle. Similarly, computing (GIP) in this case is #P-complete.

The third dimension in the theorem can be lowered to at the cost of increasing the length of the linear system:

Theorem 1.3.

Deciding (GIP) is NP-complete, even for a system of at most inequalities in variables , , , when is an interval and is a triangle. Similarly, computing (GIP) in this case is #P-complete.

This substantially strengthens our earlier result [NP17c], which considers (GIP) with a “long system”, i.e., a system arbitrarily many inequalities:

Theorem 1.4 ([NP17c]).

Deciding (GIP) is NP-complete, for a system of unbounded length in variables , , .

At the time of proving Theorem 1.4, we thought it would be the strongest negative result (see Section 1.5 below). Nevertheless, the new results in theorems 1.11.2 and 1.3 say that at the level of three quantifiers, both Integer Programming and Presburger Arithmetic quickly saturate to a high level of complexity, even when all parameters are bounded.

The decision part of Theorem 1.1 can naturally be generalized to short Presburger sentences of more than quantifiers:

Theorem 1.5 (Main result).

Fix . Let be alternating quantifiers with . Deciding short Presburger sentences of the form

is -complete. Similarly, when , deciding short Presburger sentences as above is -complete. Here is a short Presburger expression of at most inequalities in variables , , and .

The proof of the above results uses a chain of reductions. We start with the AP-COVER problem on covering intervals with arithmetic progressions. This problem is NP-compete by a result of Stockmeyer and Meyer [SM73] (see Section 9). The arithmetic progressions are encoded via continued fractions by a single rational number . We use the plane geometry of continued fractions and “lift” the construction to a Boolean combination of polyhedra in dimension 5, proving Theorem 1.1. We then “lift” the construction further to convex polytopes and , which give proofs of theorems 1.2 and 1.3, respectively. While both constructions are explicit, the first construction gives a description of  by its 24 facets, while the second gives a description of  by its 40 vertices; the bound of 8400 facets then comes from McMullen’s Upper bound theorem (Theorem 5.1). Finally, we generalize the problem AP-COVER and the chain of reductions to quantifiers.

1.3. Applications in integer optimization

The first application of our construction is the following hardness result on the bilevel optimization of a quadratic function over integer points in a polytope.

Theorem 1.6.

Given a rational interval , a rational polytope and a quadratic rational polynomial , computing:


is NP-hard. This holds even when has at most facets.

The polytope can be given either by its vertices or by its facets, as the theorem holds in both cases.

The second application is to the hardness of the Pareto optima. Assume we are given polytope , and functions restricted to the domain . For a point , the corresponding outcome vector is called a Pareto minimum, if there is no other point and , such that coordinate-wise and . The goal is to minimize the value of an objective function over all Pareto minima of on .

Theorem 1.7.

Given a rational polytope , two rational linear functions , a rational quadratic polynomial , and rational linear objective function , computing the minimum of over the Pareto minima of on is NP-hard. Moreover, the corresponding -approximation problem is also NP-hard. This holds even when has at most facets.

Again, the polytope can be given either by its vertices or by its facets. Here by -approximation we mean approximation up to a multiplicative factor of .

We prove both theorems in Section 8. See also 11.6 and 11.7 for some background and open problems.

1.4. Historical overview

Presburger Arithmetic was introduced by Presburger in [Pre29], where he proved it is a decidable theory. The general theory allows unbounded numbers of quantifiers, variables and Boolean operations. A quantifier elimination (deterministic) algorithm was given by Cooper [Coo72], and was shown to be triply exponential by Oppen [Opp78] (see also [RL78]). A nondeterministic doubly exponential complexity lower bound was obtained by Fischer and Rabin [FR74] for the general theory. This pioneering result was further refined to a triply exponential deterministic lower bound (with unary output) in [Wei97], and a simply exponential nondeterministic lower bound for a bounded number of quantifier alternations [Für82] (see also [Sca84]). Of course, in all these cases the number of variables is unbounded.

In [Sch97], Schöning proved NP-completeness for two quantifiers , where and is a Presburger expression in variables, i.e., a Boolean combination of arbitrarily many inequalities in . This improved on an earlier result by Grädel, who also established that similar sentences with alternating quantifiers and a bounded number of variables are complete for the -th level in the Polynomial Hierarchy [Grä87]. Roughly speaking, one can view our results as variations on Grädel’s result, where we trade boundedness of  for an extra quantifier.

Let us emphasize that when the number of variables is unbounded, even the most simple systems (IP) become NP-complete. The examples include the KNAPSACK, one of the oldest NP-complete problems [GJ79]. Note also that even when matrix  has at most two nonzero entries in each row, the problem remains NP-complete [Lag85].

In a positive direction, the progress has been limited. The first breakthrough was made by Lenstra [Len83] (see also [Sch86]), who showed that (IP) can be solved in polynomial time in a fixed dimension (see also [Eis03] for better bounds). Combined with a reduction by Scarpellini [Sca84], this implies that deciding (Short-PA) is in P.

The next breakthrough was made by Kannan [Kan90] (see also [Kan92]), who showed that (PIP) in fixed dimensions is in P, even if the number  of inequalities is unbounded, i.e. the matrices and can be “long”. This was a motivation for our earlier Theorem 1.4 from [NP17c], which ruled out “long” systems for (GIP).

Theorem 1.8 (Kannan).

Fix . The formula (PIP) in variables , with inequalities can be decided in polynomial time, where is part of the input.

Kannan’s Theorem was further strengthened by Eisenbrand and Shmonin [ES08] (see 10.2). All of these greatly contrast with the above hardness results by Schöning and Grädel, because here only conjunctions of inequalities are allowed.

The corresponding counting problems have also been studied with great success. First, Barvinok [Bar93] showed that integer points in a convex polytope can be counted in polynomial time, for a fixed dimension  (see also [Bar06, BP99]). He utilized the short generating function approach pioneered by Brion, Vergne and others (see [Bar08] for details and references). Woods [Woo04] extended this approach to general Boolean formulas.

In the next breakthrough, Barvinok and Woods showed how to count projections of integer points in a (single) polytope in polynomial time [BW03]. Woods [Woo04] extended this approach to general Presburger expressions  with a fixed number of inequalities (see also [Woo15] and an alternative proof in [NP17a]). As a consequence, he showed that deciding (Short-PA) is in P. This represents the most general positive result in this direction:

Theorem 1.9 (Woods).

Fix and . Given a short Presburger expression in variables with at most inequalities, the sentence

can be decided in polynomial time. Moreover, the number of solutions

can be computed in polynomial time.

1.5. Kannan’s Partition Theorem

In [Kan90], Kannan introduced the technology of test sets for efficient solutions of (PIP). The Kannan Partition Theorem (KPT), see Theorem 10.1 below, claims that one can find in polynomial time a partition of the -dimensional parameter space into polynomially many rational (co-)polyhedra

so that only a bounded number of tests need to be performed (see 10.1 for precise statement details).

In [NP17a], we showed that KPT if valid would imply a polynomial time decision algorithm for (Short-PA), and in particular (GIP) for a restricted system. Thus, at the time of proving Theorem 1.4 in [NP17c], we thought that [NP17a] and [NP17c] together would completely characterize the complexity of (GIP), depending on whether the system is restricted or not.

In view of our theorems and 1.5, it strongly suggests that KPT may actually be erroneous. However, we did not expect this at the time of writing [NP17a]. In fact, the prevailing view was that (Short-PA) would always be in P, which neatly aligned with the results in [NP17a] (conditional upon KPT). Now that the hardness results are known, we are actually able combine the current techniques with some of those in [NP17a] to obtain the following quantitative result, which strongly contradicts KPT:

Theorem 1.10.

Fix and let . Let be the total bit length of the matrix in KPT. Then for the number of pieces in Kannan’s partition , we must have for some constant .

We conclude no polynomial size partition  exists as claimed by KPT. See Section 10 for a detailed presentation of this result and its implications, 11.1 for our point of view, and 11.2 for the gap in the original proof of KPT.

2. Notations

  • We use and

  • Universal/existential quantifiers are denoted .

  • Unspecified quantifiers are denoted by , etc.

  • Unquantified Presburger expressions are denoted by , etc.

  • We use for a disjunction and for a conjunction .

  • All constant vectors are denoted , etc.

  • We use to denote both zero and the zero vector.

  • All matrices are denoted , etc.

  • All integer variables are denoted , etc.

  • All vectors of integer variables are denoted , etc.

  • In a vector , we draw as a vertical and as a horizontal coordinate.

  • We use to denote the floor function.

  • The the vector with coordinates is denoted by .

  • Half-open intervals are denoted by , , etc.

  • A polyhedron is an intersection of finitely many closed half-spaces in .

  • A copolyhedron is a polyhedron with possibly some open facets.

  • A polytope is a bounded polyhedron.

  • Subsets of are denoted by , etc.

3. Basic properties of finite continued fractions

Every rational number can be written in the form:

where . If , we have another representation:

On the other hand, if , then we also have:

It is well known that any rational can be written as a continued fraction as above in exactly two ways (see e.g. [Kar13, Khi64]

), one with an odd number of terms and the other one with an even number of terms.

If a continued fraction evaluates to a rational value , we identify it with the integer point . We write:

From now on, we will only consider continued fractions with an odd number of terms:

To facilitate later computations, we will relabel these terms as:

The convergents of are -dimensional integer vectors, defined as:


We call the convergents for . If and then we have the properties:

  • , , , .

  • , .

  • , .

  • .

  • The quotients form an increasing sequence, starting with and ending with .

  • .

  • The quotients form a decreasing sequence, starting with , and ending with .

C0 C1 C2 Ck+1

D0 D1 Dk

y1 y2

Figure 1. The curves (bold) and .

Denote by the origin in . The geometric properties of these convergents are:

  • Each vector and is primitive in , meaning .

  • Each segment contains exactly integer points, since .

  • Each segment contains exactly integer points, since .

  • The curve connecting is (strictly) convex upward (see Figure 1).

  • The curve connecting is (strictly) convex downward.

  • There are no interior integer points above and below . In other words, is the upper envelope of all non-zero integer points between and .

4. From arithmetic progressions to short Presburger sentences

4.1. Covering with arithmetic progressions

For a triple , denote by the arithmetic progression:

We reduce the following classical NP-complete problem to (Short-PA):

Input: An interval and triples for .
Decide: Is there such that , where ?

The problem AP-COVER was shown to be NP-complete by Stockmeyer and Meyer (Theorem 9.1). A short proof of this is included in §9.1 for completeness. We remark that the inputs to the problem are in binary. We can assume that each , i.e., each contains more than integer. This is because we can always increase and add the last integer to any progression that previously had only a single element. Note that AP-COVER is also invariant under translation, so we can assume that and all are positive integers.

Next, let:

We have:

i.e., the interval contains and all . Moreover, we have:


Note that can be computed in polynomial time from the input of AP-COVER, and

Let us construct a continued fraction

with the following properties:

  • All .

  • For each , we have .

  • For each , we have .

  • For each , if

    then we have .

  • For each , if

    then we have .

  • For each , the segment contains exactly integer points. Moreover, the set

    is exactly .

  • For each , the segment contains no integer points apart from the two end points.

We construct iteratively as follows. We say an integer vector is congruent to mod , denoted , if . As in (3.1), let and .

  1. [leftmargin=7em]

  2. Let . Then

  3. Take so that


    We can solve for mod because from (4.1). So there exists s.t. .

  4. Take . This implies

    By Property (G2), we also have exactly integer points on .

  5. After these steps, we have integer points on . Every two such consecutive points differ by . Reduced mod , they give:

    Thus, we have .  Conditions (1)–(7) hold so far.

  6. Take so that . Since we have the recurrence

    this is equivalent to solving

    Again we can solve for mod because from (4.1). So there exists s.t. .

  7. Take . This implies

    This satisfies condition (4) for . Now we can start encoding with .

  8. One can see that in Step 4 was appropriately set up to facilitate Step 5. It is conceptually easier to start with Step 5 and retrace to get the appropriate condition for . Taking also implies that there are no other integer points on apart from the two endpoints.

  9. Take so that . This is similar to Step 2. Again we use condition (4.1).

  10. Take , which implies

    After this, we again get exactly integer points on . Reduced mod , they give .  Note that conditions (1)–(7) still hold.

  11. The rest proceeds similarly to Steps 4–7, for :

  12. Take so that

  13. Take , which implies

  14. Take so that .

  15. Take , which implies

    The segment contains exactly integer points.

  16. After these four steps, we get .  Conditions (1)–(7) hold throughout.

All modular arithmetic mod in the above procedure can be performed in polynomial time. The last Step gives:

All terms and are in the range , so the final quotient can be computed in polynomial time using the recurrence (3.1). This implies that and have polynomial binary lengths compared to the input of AP-COVER. The curve connecting is shown in Figure 2.

O C0 C1 C2 C3 C4 C2k

Figure 2. The curve .

Here each bold segment contains integer points. Each thin black segment contains no interior integer points. The dotted segment contains integer points, the first of which we will not need. Let be minus the first integer points on . For brevity, we also denote .

4.2. Analysis of the construction

We define:


By condition (7), every integer point lies on one of the segments , , , . Moreover, by condition (6), for we have:

Therefore, we have:

Recall that AP-COVER asks whether:

By (4.2), this is equivalent to:

which can be rewritten as:


Next, we express the condition in short Presburger arithmetic. Let and be the cone between and , i.e.,

For each , denote by the parallelogram with two opposite vertices and and sides parallel to and (see Figure 3). We also require that horizontal edges in are open, i.e.,


O y Py p q y1 y2 C2k

Figure 3. The parallelogram . The upper and lower edges of are open (dotted). Here we denote .
Lemma 4.1.

For , we have:


First, assume . Recall that is minus the first integer points on . Therefore, we have . Since sits inside , we also have , which implies . Let be the concave region above and below . By property (G6), contains no interior integer points. Since , we have . Therefore, the parallelogram in (4.4) contains no integer points. We conclude that satisfies the RHS in (4.5).

Conversely, assume satisfies the RHS in (4.5) but . The following argument is illustrated in Figure 4. First, implies . Also, the parallelogram contains no integer points. By property (G6), if , it must lie strictly below . Let and be the integer points on that are immediately above and below (see Figure 4). In other words, is the integer point immediately above the intersection of with the upper edge of , and is the integer point immediately below the intersection of with the right edge of . Since contains no integer points, particularly those on , the points and must be adjacent on , i.e., they form a segment on .222Note that and are not necessarily two consecutive vertices and of . They could be two consecutive points on some segment . Now we draw a parallelogram with two opposite vertices and edges parallel to those of (the dashed bold parallelogram in Figure 4). It is clear that lies inside and also contains . Take to be the reflection of across the midpoint of . Since and are integer points, so is . We also have . Note also that lies on the opposite side of compared to . Therefore, we have , contradicting property . ∎

C y y’ x x’ Py O D

Figure 4. is the reflection of across the midpoint of .
Remark 4.2.

There is a subtle point about the existence of in the above proof. It is clear that exists because lies below . However, if lies too low, the right edge might not intersect . For example, in Figure 5, we have and lies on the line . This this case, contains no integer points and its right edge does not intersect . Thus, we have no and the geometric argument in Figure 4 does not work. However, this can be easily fixed by requiring , noting that AP-COVER is invariant under a simultaneous translation of and all .

C C0 C1 C2k y Py O y1 y2

Figure 5. Here , , and yet contains no integer points (dotted edges are open).

4.3. Proof of Theorem 1.1 (decision part)

Combining (4.3), (4.4) and (4.5), the negation of AP-COVER is equivalent to:


The condition can be expressed as:

This existential quantifier can be absorbed into because they are connected by a disjunction. The restricted quantifier with is just

Overall, we can rewrite (4.6) in prenex normal form:


All strict inequalities with integer variables can be sharpened. For example is equivalent to . This final form contains variables and inequalities.

In summary, we have reduced (the negation of) AP-COVER to (4.7). This shows that (4.7) is NP-hard, and so is (Short-PA). For NP-completeness, by Theorem 3.8 in [Grä87], if (Short-PA) is true, there must be a satisfying with binary length bounded polynomially in the binary length of . Given such a polynomial length certificate , one can substitute it into (Short-PA) and verify the rest of the sentence, which has the form . Here is again a short Presburger expression. By Corollary 1.9, this can be checked in polynomial time. Thus, the whole sentence (Short-PA) is in NP. This concludes the proof of the decision part of Theorem 1.1.

5. Proof of theorems 1.2 and 1.3 (decision part)

We will recast (4.7) into the form (GIP). For the polytopes and in (GIP), let and


see Figure 6.

O y1 y2 C C0 C1 C2k g1