{'fraction_non_alphanumeric': 0.05726612452666211, 'fraction_numerical': 0.009590911912595444, 'mean_word_length': 3.5694227769110762, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 58, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the Path-Width of Integer Linear Programming

We consider the feasibility problem of integer linear programming (ILP). We show that solutions of any ILP instance can be naturally represented by an FO-definable class of graphs. For each solution there may be many graphs representing it. However, one of these graphs is of path-width at most 2n, where n is the number of variables in the instance. Since FO is decidable on graphs of bounded path- width, we obtain an alternative decidability result for ILP. The technique we use underlines a common principle to prove decidability which has previously been employed for automata with auxiliary storage. We also show how this new result links to automata theory and program verification.


Introduction
Alur and Madhusudan in [1] have proposed nested words as a natural graph representation of runs of pushdown automata (PDA). A run is a sequence of moves which relate consecutive configurations of the PDA. A move is represented by a node, and nodes are linked through a linear order capturing the sequence of moves in the run. Further, nodes corresponding to matching push and pop moves are also linked together through (nested) matching edges. Thus, nested words naturally reflect the semantics of PDA.
This concept of representing runs with graphs has been extended to other classes of automata with multiple stacks and queues. For example, runs of multi-stack PDA can be represented as multiply-nested words, i.e. nested words with a nested relation for each stack. Similarly, runs of distributed automata can be represented with graphs. A distributed automaton consists of a finite number of PDAs communicating through unbounded queues. A natural graph representation for a run is composed of a finite number of nested words, each representing an execution of a single PDA, with additional edges modelling queues: a node representing the action of sending a message is linked to the corresponding node representing the action of receiving that message.
A surprising result by Madhusudan and Parlato shows that those graph representations straightforwardly lead to uniform decision procedures for several problems on these automata. In [19], it is shown that the emptiness problem for PDAs as well as several restrictions of multi-stack PDAs and distributed automata is decidable, as the class of graphs representing the runs of these automata has bounded treewidth, and furthermore it is definable in monadic second-order logic (MSO). Thus, checking the existence of an accepting run of those automata is equivalent to the satisfiability of the MSO formula charactering runs on the class of graphs of bounded tree-width. The tree-width of a graph is a parameter that tells how close to a tree a graph is [4]. The problem of MSO satisfiability on graphs is undecidable in general, but decidable on the class of bounded tree-width graphs [6,24].
Although this is a mathematical reduction from the emptiness problem for automata to MSO satisfiability on graphs, the novelty here is not the reduction itself. In fact, since the problem is decidable, one could first solve it and then write an MSO formula that is satisfiable on graphs of tree-width 1 if and only if the problem admits a positive answer. In contrast, the principle outlined in [19] is that a natural graph representation that logically captures the semantics of these automata-not containing algorithmic insights-is sufficient for decidability.
Among the problems that have been shown decidable using this principle we have: (1) state reachability problem [19], model-checking of LTL [3,16], and generalised LTL [15] for various restrictions of multi-stack PDA [23,12,2,14], and (2) the reachability problem [19,10] for subclasses of distributed automata that communicate through unbounded queues [13,11]. The surprising aspect is that the new proofs are uniform and radically different from the ones previously proposed in the literature which are specifically crafted using different techniques on a case-by-case basis. This strengthens the intuition that a common principle governs the decidability of (those) problems. In general, the above principle could be lifted to decision problems. Although it may not be always applicable, it is interesting to establish its generality or limits by looking at other decidability results known in the literature.
In this paper, we consider the feasibility problem for integer linear programming (ILP, for short) that asks whether, given a finite set I of linear constraints, there is an assignment of its variables such that all the constraints are satisfied 1 . We show that the decidability principle based on bounded tree-width graph representations applies to the ILP feasibility problem in a stronger sense as described below.
As a first contribution we give a natural graph representation for the solutions of an instance I of ILP. The nodes of the graph represent a unary encoding of the solution, i.e. each node is labelled with exactly one variable of I, and the number of nodes with the same label is the value of the corresponding variable in the solution. The edges are used to enforce the constraints of the system. For simplicity, consider a system with only one constraint, where each variable is associated with one coefficient. Depending on the sign of this coefficient each variable can contribute to the overall value of the constraint by either increasing or decreasing it. Each node will have a number of edges equal to the absolute value of the corresponding coefficient. We use edges to pair nodes whose corresponding coefficients have different signs. Thus, a graph with well-matched nodes is a solution. In case of multiple constraints, we reiterate the above mechanism for each constraint individually, labelling the edges with the constraint represented. Since multiple "matchings" are possible for the same solution, a solution may have several of those graphs representing it. We prove that the class of graphs representing the solutions of an instance I can be defined in first-order logic. See Figure 1 for an example of a solution for a two-constraints system.
In general, the class of graphs representing all solutions may have unbounded path-width. We show that, for any solution, there always exists a graph representing it of path-width at most 2n, where n is the number of variables of I, and this constitutes the second contribution of the paper. The path-width of a graph measures its closeness to a path (rather than a tree, as for tree-width). This provides us with a restriction of the decidability principle outlined above for the case of ILP, where bounded path-width is already sufficient as opposed to the general case where the tree-width needs to be bounded.
As a last contribution we define, for each ILP instance I, a finite state automaton A I over the alphabet of I's variables, such that the Parikh image [21] of A I is exactly the set of all solutions of I. This construction relies on the proof of bounded path-width we provide. Furthermore, this automaton can also be seen as a Boolean program P I of size linear in the size of I as opposed to the exponential size of A I , such that I is feasible iff a given location in P I is reachable. This gives a symbolic alternative to solve ILP using program verification tools.
Organization of the paper. In Sec. 2, we give basic definitions on graphs, tree-width, MSO on graphs, and the feasibility problem of ILP. In Sec. 3, we present the graph representation for ILP solutions, and give its FO characterisation. In Sec. 4, we give the bounded path-width theorem, and in Sec. 5 we describe the automata for ILP. We conclude with some remarks and future work in Sec. 6.
Related Work. Many approaches are known for solving the ILP feasibility problem, based on, e.g., branch-and-bound [17], the cutting-plane method [9], the LLL algorithm [18], the Omega test [22], finiteautomata theory [5,8,25]. The latter defines finite-automata representations for the set of solutions of an ILP instance but, differently from our approach, they are based on representing the binary encodings of the integers involved in the solutions. The exponential bound on the minimal solutions of an ILP instance [20] implies that, for any feasible instance I, there is an exponential bound B, such that some (but not all) solutions have a graph representation of path-width bounded by B. We prove that there exists a bounded path-width graph representation for each solution of an instance I and the bound depends only on the number of variables of I.

Preliminaries
Given two integers i and j with i ≤ j, we denote with [i, j] the set of all integers k such that i ≤ k ≤ j.
Monadic second-order logic on graphs: Fix two disjoint finite alphabets where V is a finite set of vertices, E is a finite multi-set of (undirected) edges represented by unordered pairs of elements of V , for each a ∈ Σ V , V a ⊆ V is a set of a-labelled vertices, and, for each b ∈ Σ E , E b ⊆ E is a multi-set of b-labelled edges. When Σ V = Σ E = / 0, G is called simply a graph. Let v, v ∈ V , and π = v 0 , v 1 , . . . , v t be any sequence of distinct vertices of G with v = v 0 and v = v t . A path in G from v to v is any sequence π such that {v i−1 , v i } ∈ E, for every i ∈ [1,t]. In the rest of the paper, we denote any edge of the form {u, v} simply with a pair (u, v) with the meaning that it is an unordered pair.
We view graphs as logical structures, where V is the universe. Each set of vertices V a is a unary relation on vertices and each multi-set of edges E b is a binary relation on vertices. Monadic secondorder logic (MSO for short) is nowadays the standard logic to express properties on these structures. We fix a countable set of first-order variables (denoted by lower-case symbols, e.g., x, y) and a countable set of second-order variables (denoted by upper-case symbols, e.g. X,Y ). The first-order, resp., secondorder, variables are interpreted as vertices, resp., sets of vertices, in the graph. An MSO formula ϕ is defined by the following grammar: x, y are first-order variables, and X is a second-order variable. The semantics of MSO is defined as usual. First-order logic (FO, for short) is the restriction of MSO to formulas over first-order variables.
A class of (Σ V , Σ E )-labelled graphs C is MSO-definable, resp., FO-definable, if there is an MSO, resp., FO, formula ϕ such that C is exactly the class of (Σ V , Σ E )-labelled graphs that satisfy ϕ.
Tree/path-width of graphs: A tree-decomposition of a graph G = (V, E) is a pair (T, bag), where T = (N, →) is a tree 2 and bag : N → 2 V is a function, that satisfies the following: • For every v ∈ V , there is a vertex n ∈ N such that v ∈ bag(n).
• For every edge (u, v) ∈ E, there is a vertex n ∈ N such that u, v ∈ bag(n).
• If u ∈ (bag(n) ∩ bag(n )), for vertices n, n ∈ N, then for every n that lies on the unique undirected path from n and n in T , u ∈ bag(n ).
A path-decomposition of a graph G = (V, E) is a tree-decomposition (T, bag) such that T is a linear graph (i.e., a tree with exactly two leaves).
The width of a tree/path-decomposition of G is the size of the largest bag in it, minus one; i.e. max n∈N {|bag(n)|} − 1. The tree-width, resp., path-width, of a graph is the smallest of the widths of any of its tree-decompositions, resp., path-decompositions. The notions of tree/path-decomposition and tree/path-width are extended to (Σ V , Σ E )-labelled graphs by ignoring vertex and edge labels.

Satisfiability of MSO:
The satisfiability problem for MSO is undecidable in general but it is decidable when restricting the class of models to graphs of bounded tree/path-width.
Theorem 1 (Seese [24]). The problem of checking, given k ∈ N and ϕ ∈ MSO over (Σ V , Σ E )-labelled graphs, whether there is a (Σ V , Σ E )-labelled graph G of tree-width at most k that satisfies ϕ, is decidable.
The problem of checking, given k ∈ N and an MSO-formula ϕ, whether there is a graph G ∈ C of tree-width at most k that satisfies ϕ, is decidable.
Integer Linear Programming (ILP): An ILP instance is constituted by a set of equations of the form [1,m] is a vector of size m, and all elements of A and b are integers 3 . The ILP feasibility problem, asks to check whether there exists an integer vector s of size n such that A s = b ( s is called a solution of A x = b). For the sake of simplicity, in this paper we only consider solutions composed of non-negative integers.

Graph representation for ILP solutions
representing it (but possibly more than one). Furthermore, we show that is FO definable, which gives a polynomial time reduction from the ILP feasibility problem to the satisfiability problem of FO.
We first give the intuition behind the graph representation of a solution, before we formalize and prove the results outlined above. Consider an ILP instance A , if any, has the following features. Each vertex of G is labelled with an index from the set [0, n], and the tuple s = (s 1 , s 2 , . . . , s n ) is a solution of A x = b, where s i is the number of G vertices labelled with variable index i. Intuitively, all vertices of G labelled with i give a unary representation of s i . Furthermore, G has a unique vertex labelled with 0, which represents the vector b. To impose that s is a solution of A x = b, G is equipped with edges labelled with indices of constraints (each edge is labelled with a unique index). In order to satisfy the j-th constraint we impose that every vertex labelled with a variable index i ∈ [1, n] is the end-point of |a j,i | edges labelled with j. Similarly, the unique vertex representing b is the end-point of |b j | edges labelled with j. A vertex also comes with a sign for each constraint: for an i-labelled vertex v and the j-th constraint (1) if i ∈ [1, n] (it is a variable index) then v has the same sign as a j,i , otherwise (2) v is the unique vertex labelled with 0, and has the opposite sign of b j . All edges labelled with j concern the j-th constraint. Thus, we further impose that an edge labelled with j is always incident to vertices with opposite signs. Intuitively, since the end-points of vertices represent the constants of the matrix A in unary, we can do the arithmetic related to each constraint by just matching these end-points (through edges). In fact, for a constraint j each node labelled with i ∈ [1, n] will contribute with |a j,i | edges with the same sign of a j,i . A similar argument holds for the node labelled with 0. Therefore, imposing the matchings described above we make sure that a j,1 ·x 1 +. . .+a j,n ·x n = b j holds. Since the matchings are imposed for all constraints we have that G faithfully represents a solution for all the linear constraints. It is worth noting that, we do not deliberately impose how matchings are accomplished. Thus, the same solution s may have several graphs in G [A x = b] representing it. We now provide an example to illustrate this intuition.
The edges above, resp., below, the vertices correspond to the first, resp, the second, equation. The signs attached to the vertices are the signs of the corresponding coefficients in the two constraints. The vertex labelled by 0 is omitted because it has no incident edges.

Proof. Let
We show that for every j ∈ [1, m], sol(G) = (|V 1 |, . . . , |V n |) is a solution of the equation a j,1 · x 1 + . . . + a j,n · x n = b j . Let a j,0 = −b j . The set of indices [0, n] can be partitioned in two sets {p 1 , . . . , p s } and {n 1 , . . . , n t } s.t. for every k ∈ [1, s], a j,p k is positive and for every k ∈ [1,t], a j,n k is negative. By definition, all the edges of G labelled by j are between a vertex in V p 1 ∪ . . . ∪V p s and a vertex in V n 1 ∪ . . . ∪V n t . Also, for every i ∈ [0, n], the degree of every vertex in V i equals |a j,i | and thus the number of edges labelled by j can be written as both |V p 1 | · a j,p 1 + . . . + |V p s | · a j,p s and |V n 1 | · |a j,n 1 | + . . . + |V n t | · |a j,n t |, which proves that sol(G) is a solution of a j,1 · x 1 + . . . + a j,n · x n = b j .
For the reverse, we show that for every solution s = (s i ) i∈ [1,n] sol(G) = s. Therefore, for every i ∈ [1, n], the set V i consists of s i vertices. Then, for every equation a j,1 · x 1 + . . . a j,n · x n = b j we consider the partition of [0, n] into {p 1 , . . . , p s } and {n 1 , . . . , n t } exactly as above. We also consider that a j,0 = −b j and s 0 = 1. The fact that s is a solution implies that s p 1 · a j,p 1 + . . . + s p s · a j,p s = s n 1 · |a j,n 1 | + . . . + s n t · |a j,n t |, which shows that it is possible to define a multi-set of edges E j satisfying the constraints in Definition 1.
Proposition 1 implies that the feasibility of an ILP instance is reducible to the problem of checking the existence of a graph satisfying the properties in Definition 1.
The following result shows that the class of graphs G [A x = b] from Definition 1 is definable in first-order logic.

Proposition 3. For any ILP instance A x = b, there exists a first-order logic formula Φ[A x = b] such that for any graph G, G
Proof. The formula Φ[A x = b] is defined as the conjunction of the formulae VertexLabels, Opposite, and Degree, which express condition (1), (3), and (4) in Def. 1, respectively.
The condition on the vertex labels is given by the following formula: where ⊕ is the exclusive disjunction. The formula Opposite is defined by: where opposite j (u, v) says that the coefficients of the variables x i and x i that label u and resp., v, in the jth constraint, have opposite signs. Formally, for any j ∈ [1, m], let pos j be the set of i such a j,i ≥ 0 together with 0, if b j ≥ 0. Analogously, let neg j be the set of i such a j,i < 0 together with 0, if b j < 0. Then, To express the constraint on the number of incident edges in a vertex of the graph, we introduce predicates of the form E k j (u, v) with k ∈ N * , which holds iff there are exactly k edges labelled by j between u and v. Let max be the maximum value in A or b, in absolute value. Then, where the sub-formula ψ 1 expresses the fact that, for any u and v, there exists exactly one predicate E k j (u, v) which holds and degree i, j in ψ 2 is defined by:

Bounded Path-width
In this section we show that for each solution s of A x = b there is always a path-like graph representation in G [A x = b]. More precisely, we show that for any solution of an ILP instance with n variables, there is a graph representation of this solution of path-width 2n. Thus, the decidability of the ILP feasibility problem can be directly derived by the decidability of FO on the class of bounded path-width graphs.

Lemma 1. For each solution s of A x = b with n variables, there is a graph G ∈ G [A x = b] whose pathwidth is upper-bounded by 2n.
Proof. For each solution s, G [A x = b] may contain several graphs G with s = sol(G). All of those have the same number of vertices with the same label as well as the same number of edges with the same label. Here, we show that among all graphs in G [A x = b] representing s, there exists one whose path-width is bounded by 2n. Without loss of generality we assume that s is a reduced solution, i.e. it is not a multiple of another solution and that s does not contain 0.
Let s = (s 1 , . . . , s n ). The proof is given by fixing b = 0. In this case the path-width can be bounded by 2n−1. At the end we show how to generalize the proof to any b. [1,m] ), is in special form if it satisfies the following two conditions: (1) there is a partition {V k } k∈ [1,t] of V such that no two vertices of V k are labelled with the same variable index (i.e. |V k ∩ V i | ≤ 1 for all i, k), and (2) there is a partition {E k } k∈ [1,t] of E such that for all k, all edges in E 1 ∪ . . . ∪ E k only relate vertices in We now define a path decomposition for G in special form. We say that a vertex v in V in a subgraph of G is fully matched if the subgraph contains all edges of G involving v. The bags of the path decomposition of G are given by the sequence B 0 . It is clear that the linear graph whose vertices are the bags B 1 p , . . . , B k p is a path decomposition for G. The size of the bags depends on the particular partition of vertices and edges. Figure 2: A path decomposition of the first graph in Figure 1 In Figure 2 we give the graph and its path decomposition computed by our algorithm explained below for the ILP instance in Example 1. The sets V 1 , . . . ,V 5 are indicated by the dotted lines. For each vertex, the bags B 1 p , . . . , B 5 p to which it belongs to are indicated below it. Notice that the graph in the figure is isomorphic to the first graph in Figure 1.
In the following, we will define {V k } k∈ [1,t] and {E k } k∈ [1,t] such that the sizes of the bags are bounded by 2n. The idea is to pick the V k in a particular order such that it is always possible to add edges making sufficiently many vertices fully matched which allows to drop them from the corresponding bag. We will show that it is always possible to have at most 2 vertices labelled by the same variable in each bag.
We will give now an auxiliary algorithm allowing us to define the partition {V k } k∈ [1,t] . Consider two sets of counters c 1 , . . . , c n and r 1 , . . . , r m associated with the matrix A in a way that we explain below. Let s l = max(s 1 , . . . , s n ). Initially ∀i.c i = 0. We define two possible actions on c i : When c i changes, all the counters r j are updated to ∑ i ((number of INCREASE(i)) · a j,i ). It is clear that, if we perform exactly s i times INCREASE(i) for each i ∈ [1, n] and s l times REDUCE(), all the counters reach zero. The meaning of the counters c i is purely functional to the algorithm we show below. The purpose of the counters r j is to tell how far (in the j-th constraint) the solution is when the current assignment of the variable x i is set to the number of INCREASE(i). When r j = 0, the j-th constraint is satisfied.
Given the above mechanism, the counters c i and r j will range within a bounded interval if we use the following algorithm to determine the exact sequence of steps to perform: It is easy to see that for all counters c i we have 0 ≤ c i < 2 · s l and after reduce steps 0 ≤ c i ≤ s l . For the solution of the ILP instance of Example 1 the sequence of counter values (c 1 , c 2 , c 3 ) computed before and after each of the five REDUCE() steps is (0, 0, 0) → · · · (5, 5, 5) 0, 0, 0). Similarly, the sequence of counter values (r 1 , r 2 ) at each reduce step is (2, 0), (3, −5), (1, 0), (2, −5), (0, 0). Now we prove by induction on the number of steps that r j = c 1 a j,1 + · · · + c n a j,n s l .
Trivially the property holds at the beginning as all counters c i are set to 0. If the k-th step is INCREASE(i), this new value will be: r j + a j,i = r j + s l s l a j,i = c 1 a j,1 + · · · + (c i + s l )a j,i + · · · + c n a j,n s l = r j .
If the k-th step is REDUCE(), then: r j = (c 1 − s 1 )a j,1 + · · · + (c n − s n )a j,n s l = r j − s 1 a j,1 + · · · + s n a j,n s l = r j (note that REDUCE() steps do not affect the counters r j ). This proves expression (1). Furthermore, since c i s l < 2, we have: |r j | = | c 1 a j,1 s l + · · · + c n a j,n s l | < 2 · n · max i |a j,i | which gives an upper bound on the absolute value of the counters r 1 , . . . , r m .
We define now the partition {V k } k∈ [1,t] (where t is the number of REDUCE steps) by taking as V 1 a set of vertices containing exactly one vertex labelled by each i ∈ [1, n] and as V k (for k > 1) a set of vertices containing exactly one vertex labelled by i for each INCREASE(i) operation done between the k-th and (k + 1)-th REDUCE step. Now, it remains to define the partition of edges {E k } k∈ [1,t] . First we define for each vertex v labelled by i of the set V 1 ∪ · · · ∪ V k (k ≥ 1) and each constraint j the number of open edges. Let open j, We will show that the number of open edges open j,i (V 1 ∪ · · · ∪V k ) can be bounded by |a j,i | for each k. That means that each subgraph (V 1 ∪ · · · ∪ V k , E 1 ∪ · · · ∪ E k ) contains at most one vertex labelled by i not completely matched. That in turn means that B k p never contains more than 2 vertices labelled by i, since B k p is composed of all vertices of V 1 ∪ · · · ∪V k not completely matched as well as all vertices of V k (which contains at most one vertex for each variable).
We first define, from the sequence of values c 1 j , . . . , c t j of c j after each reduce step for each variable i, a sequence c 1 j,i , . . . , c t j,i of integers. These integers will indicate the number of open edges for each type of vertex after each reduce step (the number is positive or negative depending on the sign of a j,i ). Let r 1 j , . . . , r t j be the sequence of values of the counter r j after reduce steps. We define the sets pos j = {i | a j,i ≥ 0} and neg j = {i | a j,i < 0}. Then, for each k ∈ [1,t] we define for each value r k j its positive part r k j,pos = (∑ p∈pos j (c k p · a j,p ))/s l and its negative part r k j,neg = (∑ p∈neg j (c k p · a j,p ))/s l such that r k j = r k j,pos + r k j,neg . In the example we have the following successive values for the (r k 1,pos , r k 2,pos ) : Now, we can show that we can choose {E k } k∈ [1,t] such that open j,i (V 1 ∪ · · · ∪ V k ) = |c k j,i |. Furthermore, since |c k j,i | ≤ |a j,i | we can always make sure that there is at most one not fully matched vertex for each variable i in V 1 ∪ · · · ∪V k . To show that inductively let us consider the situation just before the k-th REDUCE() step. V k contains vertices corresponding to variables i with an INCREASE(i) operation after the (k − 1)-th REDUCE() (for k = 1, V k contains a vertex for each variable i). The number of open edges (before adding E k ) of variable i which we call d k−1 j,i is given by d k−1 j,i = c k−1 j,i + a j,i (or just a j,i for k = 1) for the vertices labelled by variable i for which an INCREASE(i) operation has been performed after the (k − 1)-th REDUCE(); and the number of open edges is d k−1 j,i = c k−1 j,i for the other variables i. We know that ∑ p∈pos j d k−1 j,p + ∑ p∈neg j d k−1 j,p is equal to ∑ p∈pos j c k j,p + ∑ p∈neg j c k j,p because of (a) and (b). That means that before and after a REDUCE() the difference between "positive" and "negative" open edges is the same. Furthermore ∑ p∈pos j d k−1 j,p ≥ ∑ p∈pos j c k j,p and ∑ p∈neg j d k−1 j,p ≤ ∑ p∈neg j c k j,p and due to (c), |c k j,i | decreases w.r.t. |c k−1 j,i | for not increased variables. Therefore, E k can be defined such that the number of open "positive" edges and open "negative" edges decreases simultaneously to get to c k j,i from d k−1 j,i . This concludes the proof for b = 0.
If b = 0, we just consider having an additional variable labelled by 0 with coefficients a j,0 = −b j (for 1 ≤ j ≤ m). The vertex labelled by 0 can be put into all V k . The edges involving 0 are computed like the other edges.
From Lemma 1 and Proposition 2 we get the following theorem. From that we obtain the following corollary.

Corollary 2. An ILP instance A x = b with n variables is feasible if and only if the first order formula
is satisfiable on the class of graphs with path-width 2n.

Automata construction for ILP
In this section, we show a direct automata construction from an ILP instance A x = b such that the Parikh image of the automaton coincides with the set of solutions of the ILP instance. We call such machines ILP automata.
We reuse the ideas in the proof of Lemma 1 from Section 4 in order to build an automaton whose states are tuples of integer numbers representing the possible values of the counters r 1 , . . . , r m , paired with a bit B ∈ {0, 1}. We can think of each accepting run of the automaton as a way of discovering a solution (x 1 = s 1 , . . . , x n = s n ) for the ILP instance, starting with an initial assignment (x 1 = 0, . . . , x n = 0) and continuing by increasing exactly one x i at each step. The run should also contain a step where the vector of coefficients − b is added to the current valuation of r 1 , . . . , r m . The bit B is used to ensure that − b is added exactly once. The way we have enumerated graph vertices in order to obtain path decompositions of bounded width defines also the manner in which to pick an x i for the next increase such that the counters have bounded range (which implies that the state space is bounded). Formally, Definition 2 (ILP AUTOMATA). Let I A x = b be an ILP instance over the variables V = {x 1 , . . . , x n } and m constraints. The ILP automaton A I associated to I is the DFA (Σ, Q, δ , s 0 , F) defined as follows. For a tuple of natural numbers r = (r 1 , r 2 , . . . , r m ) we say that r is bounded iff r j ≤ 2 · n · max i |a j,i | for every j ∈ [1, m]. Let R m be the set of all bounded m-tuples r. Then, is the set of states; • the transition map δ : Q × Σ → 2 Q is defined as follows. Let A i be the i'th column of A. Then, otherwise.
• the initial state s 0 is the pair (0, 0 m ), where 0 m is an m-tuple of 0's.
• the set of final states F is the singleton {(1, 0 m )}.
Let Σ = {a 1 , a 2 , . . . , a t } be an alphabet, and Σ * be the set of all words over Σ. The Parikh image of a language L ⊆ Σ * is a mapping Parikh : L → N t that associates to each word w ∈ L the tuple of natural numbers (p 1 , p 2 , . . . , p t ), where p i is the number of occurrences of the symbol a i in w, for every i ∈ [1,t]. Proof. (Sketch) By the construction of A I , the Parikh image of any word accepted by the automaton is a solution of I. Now, given a solution s of I, take the sequence of steps INCREASE(i) and REDUCE() used to define a path decomposition for the graph representation of s in Lemma 1. The projection of this sequence on the steps INCREASE(i) corresponds to an accepting run in the automaton A I (each INCREASE(i) corresponds to a transition over the symbol x i ).
An interesting aspect of the automaton A I is that it can be implemented as a compact Boolean program P I whose size is linear in the size of I, as opposed to the exponential size of A I . P I has a (bounded) variable r i for each constraint, and a bit B to keep track of whether b has already been used. These variables are all initialized to zero. P I iteratively guesses a symbol in Σ and updates the variables according to the transition function of A I . Now a special control location is reachable if and only if A I accepts a word (when all constraint counters are 0 and B is set to 1). The intrinsic characteristic of P I is that checking the reachability of the special location gives an answer to the ILP problem, and further this can be done with any verification tools designed for (Boolean) programs.

Conclusion
In this paper we have investigated whether the intuition of interpreting ILP solutions with labelled graphs that are MSO definable and of bounded tree-width also applies to the ILP feasibility problem. We have given a positive answer to this question showing that ILP feasibility can indeed be reduced in polynomial time to the satisfiability problem of FO (rather than MSO) on the class of bounded pathwidth (as opposed to bounded tree-width) graphs which is again decidable by Seese's theorem [24]. What we have not explored yet is whether our approach could also entail the optimal complexity of the problem. Although the ILP feasibility problem is NP-complete, the Boolean programs derived from the automata construction of Section 5 only lead to a PSPACE procedure. We believe it is interesting to shed some light in this regards. Furthermore, continuing the exploration in other directions by applying the approach of [19] and the one we propose in this paper to other decision problems is also an interesting venue for future research. For example, for several other classes of automata their decision procedures for the emptiness problem is derived by checking that the Parikh image of the language accepted by them satisfies a set of linear constraints (see for example [7]). We believe that combining the behaviour graphs of these automata with the solution graphs we proposed for ILP could lead to further applications of the approach to broader classes of automata.