On the decidability of finding a positive ILP-instance in a regular set of ILP-instances

The regular intersection emptiness problem for a decision problem P (intReg\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\textit{int}}_{{\mathrm {Reg}}}}$$\end{document}(P)) is to decide whether a potentially infinite regular set of encoded P-instances contains a positive one. Since intReg\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\textit{int}}_{{\mathrm {Reg}}}}$$\end{document}(P) is decidable for some NP-complete problems and undecidable for others, its investigation provides insights in the nature of NP-complete problems. Moreover, the decidability of the intReg\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\textit{int}}_{{\mathrm {Reg}}}}$$\end{document}-problem is usually achieved by exploiting the regularity of the set of instances; thus, it also establishes a connection to formal language and automata theory. We consider the intReg\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\textit{int}}_{{\mathrm {Reg}}}}$$\end{document}-problem for the well-known NP-complete problem Integer Linear Programming (ILP). It is shown that any DFA that describes a set of ILP-instances (in a natural encoding) can be reduced to a finite core of instances that contains a positive one if and only if the original set of instances did. This result yields the decidability of intReg\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\textit{int}}_{{\mathrm {Reg}}}}$$\end{document}(ILP).


Introduction
The problem Integer Linear Programming (ILP for short) asks whether a given set of inequalities with integer coefficients has an integer solution.ILP is among the first problems for which NP-hardness was shown (it is on Karp's original list of 21 NP-complete problems [14]), and it is of great practical relevance in mathematical optimization [13,21,22,26].There are a large number of academic prototypes as well as commercial implementations of ILP-solvers that are applied in various contexts [5,11,19,20]; therefore, ILP is arguably of similar importance as the well-known Boolean satisfiability problem.For recent theoretical papers on ILP see, e. g., [7,8].
Linear and Integer Linear Programs are often used to model observations of the real world under the assumption that some properties are present.Important fields of applications are for example image segmentation [16] and motion segmentation [17].These models often face uncertainties due to lack of information or measurement errors [12].One possibility to handle this problem is to take every possible instance into account, in which the uncertainty is replaced by an actual value, and ask whether one of them is solvable.

P. Wolf
In doing so, we get a potentially infinite set of instances under which we seek a solvable one.For example, suppose we have a system of two inequalities a 11 x 1 + a 12 x 2 ≤ b 1 and a 21 x 1 + a 22 x 2 ≤ b 2 with two integer variables x 1 and x 2 and only partial knowledge of the coefficients a 11 , a 12 , b 1 , a 21 , a 22 , b 2 .Due to measurement inaccuracies, all we know is that a 11 is a power of 2; a 12 is even and negative; b 1 is positive and less than 100; a 21 is congruent to 3 modulo 29; a 22 is 1 less than an odd power of 2; and b 2 is negative.The described inequalities form an infinite family of inequalities, and the described system represents an infinite family S of instances of ILP.Since each coefficient fits a regular pattern, a DFA can describe the encodings of exactly the instances in S.
Compact representations of finite sets of instances have already been considered for other problems.In graph modification, 1 the task is to transform a given graph using a given set of edit operations into a graph of a certain graph-family using as few operations as possible [2,18].The possible edit operations give rise to an edit distance [9] with respect to the set of graphs; thus, the above-described task can be seen as checking whether the set of all graphs within a certain distance from the given graph contains a member of the specified graph-family.The same can be done for string-problems where a given string is to be transformed (by using certain operations) into a target string [4,34].The int Reg -problem concerning graph problems and graph properties was recently considered in [6,38], where several general decidability results were obtained.
Searching for a positive instance among infinitely many instances of a problem P seems to be a natural generalization of this setting.If we consider regular sets of instances, this task can be formalized as checking whether a given regular language of P-instances (represented by a deterministic finite automaton) and the fixed language of positive P-instances have a non-empty intersection.This was the original viewpoint of the line of research introduced by Güler et al. [6,10,35,36,38], where this problem is called the int Reg -problem of P (or int Reg (P) for short). 2  The int Reg -problem has independently been studied under the name regular realizability problem R R(L), where the filter language L plays the role of problem P as defined above, i. e., R R(L) = int Reg (L) (see [1, 23-25, 27, 30-32]).The R R problem appeared when considering models of generalized nondeterminism (GNA) where an auxiliary memory is used as a source of nondeterminism [29].For each GNA class, there are complete R R(L) problems where the filter language L consists of prefixes of GNA-certificates (or guess words) [30].That fact already gives R R-problems which are complete under log-space reductions for LOG, NLOG, P, NP, PSPACE, EXP, and 1 .This observation motivated the attempt to present with the R R-problem 'a specific class of algorithmic problems that represents complexities of all known complexity classes [...] in a unified way' [31].It turned out that R R-problems are universal in the sense that for any problem P, there exists an R R-problem R R(L) with the same complexity under disjunctive reductions in nondeterministic log-space (note that P and L are different languages).Recently, the R R problem of protocols of one-way and two-way finite automata equipped with an auxiliary data structure was studied [25].
In [32], instead of focusing on which complexity classes can be covered by an R Rproblem, the authors concentrate on context-free filter languages and present examples for which R R(L) is either P-complete, NLOG-complete or has an intermediate complexity.In [27], the decidability of the R R-problem with languages of permutations of binary words as filters was considered.In this line of research, the filter languages are closely related to computations of specific machine models.As a consequence, the regularity of the input language is not exploited at all and the hard part of a problem is coded into regular languages consisting of single words only.In [31], the author notes that the presented reductions 'cut off almost all properties of regular languages'.
In [1], int Reg (L) was studied for L with low computational complexity, but which describe structural properties of words that have high relevance for combinatorics on words and formal language theory (e.g., set of primitive words, palindromes, etc.).In this regards, (efficient) decision procedures are obtained.
In contrast to these research questions, the line of work initiated in [10,35] focuses on classical (hard) computational problems as filter languages and respective decision procedures heavily take advantage of the regularity of the set of input instances.Investigating the int Reg -problem for NP-complete problems shows that the decidability of their int Regproblem is not trivial, e. g., int Reg (SAT) is decidable [10], whereas int Reg (Bounded Tiling) is not [35,37]. 3This is particularly interesting because the original hardness proofs of SAT and Bounded Tiling are both given by directly encoding Turing-machine computations into a problem instance [3,28].Finding a generic characterization of NP-complete problems with a decidable int Reg -problem is still an open problem.This work continues this line of research, and we will focus on the NP-complete integer linear programming problem as the filter language, i. e., we investigate the problem int Reg (ILP).
Our main result is that int Reg (ILP) is decidable.The idea is to transform the given DFA that represents the regular set of instances into a condensed one that accepts a finite set of instances, such that the condensed set contains a positive instance if and only if this is the case for the original set. 4 This is done by first identifying for all pairs of states the set of coefficients that can be read between these two states, and then choosing a finite number of representatives for each such set of coefficients (in a sense, these are the coefficients that are 'most promising' regarding possible solutions).Then, again for all pairs of states, we identify a set of whole inequalities that can be read between these two states and that only have coefficients from the set of 'promising' coefficients constructed before.Finally, we will again choose suitable representatives for those sets of inequalities, from which we will construct the desired condensed automaton.We will also give bounds on the number and length of words accepted by the condensed automaton and, in the conclusions, discuss the chosen encoding and present an alternative encoding.The presented arguments can easily be adapted to prove the decidability of the int Reg -problem for Linear Programming (with integer coefficients).

Preliminaries
We assume the reader to be familiar with the basics of formal language theory and the complexity class NP.For a language descriptor A (e. g., regular expressions or automata), L(A) denotes the language described by A. With [n], n ∈ N, we denote the set {1, . . ., n}.A deterministic finite automaton (DFA) A is a tuple (Q, , δ, q 0 , F) where Q is a finite set of states, a finite alphabet, δ : Q × → Q the (partial) transition function, q 0 the start state, and F is the set of final states.The transition function δ extends to the function δ * : Q × * → Q in the usual way.We will only consider partial automata where every state is coaccessible, i. e., from every state, some final state is reachable.
We first give a formal definition of the problem Integer Linear Programming.While the standard-form of ILP varies in different areas, we refer to the definition in [33] where this problem is called LIQ.We will refer to the described problem as ILP.The problem is NP-complete if we ask for solutions in Z [33].
The problem will be encoded in the following way.The whole set A will be encoded in one word.For each pair (α, β), the elements of α and the β-value are encoded in binary over {0,1}.Each positive integer will be preceded with a +, while each negative integer will be preceded with a −.The integers of α will be separated from β by a ≤ symbol.The inequalities themselves are terminated by $-symbols.Since we want to talk about regular languages of ILP-instances, we aim to have an encoding which is verifiable by a finite automaton.Therefore, we allow the inequalities of an ILP-instance to have different numbers of variables.The assignment of the coefficients to the variables is implicitly made by the order in which the coefficients occur.So, the ith encoded coefficient in an inequality refers to variable x i and is referenced as the coefficient with index i.As the inequalities of an ILP-instance may have different numbers of coefficients, they are interpreted as filled up with coefficients zero until all inequalities have the same number of coefficients and hence the same number of variables.Alternative encodings are discussed in Sect.6.More formally, is the set of all encoded ILP-instances, and with ILP enc we denote the set of all solvable encoded ILP-instances.As an example, consider the following integer linear program and one possible encoding: ((5, 1, 0, −7), 15) , ((0, −8, 1, 0), −4) , ((1, 0, 0, 0), −1) , Note that coefficients zero can either occur with a + or a − sign.
The question we want to investigate is whether the set of solvable ILP-instances, encoded in the above-described way, and a regular language, given by an automaton, have a non-empty intersection.

Construction of the condensed automaton
We will follow the ideas presented in [10] of investigating what kinds of loops can occur in the automaton without violating the encoding format, namely loops inside a coefficient, loops over whole coefficients, and loops over whole inequalities.There are several kinds of inequalities that can be processed by a finite automaton from states q to q : -inequalities with an infinite number of nonzero coefficients, -inequalities with a finite number of nonzero coefficients such that there exists a coefficient that can be an arbitrary large, -and inequalities with a finite number of nonzero coefficients such that all coefficients are bounded.
Inequalities of the first kind can always be satisfied as we explain in detail later.For the inequalities of the second and the third kind, we present an algorithm that collects representatives for the inequalities in a set reps( q,q ).For the third kind, inequalities are added as they are and the decidability algorithm will just do the exhaustive search since there is only a finite number of such inequalities.For the second kind, the algorithm adds inequalities with the smallest possible absolute value of a coefficient to the set of representatives as well as inequalities of the form (x i > 0) or (x i < 0) for corresponding unbounded coefficient a i .We show that the satisfiability of an inequality from the set of representatives reps( q,q ) leads to the satisfiability of an inequality from q,q .
We will now go through the technicalities of finding the set of inequality representatives.
Definition 3 Let A = (Q, , δ, q 0 , F) be a DFA.We define for all q, q ∈ Q and s ∈ {+, −} the coefficient transition set s q,q andβtransition sets B s q,q as Intuitively speaking, these transition sets contain all coefficients and β-values which can be completely read between q and q .Note that automata recognizing the transition sets are easily obtained from the original automaton.When q, q and s are clear from the context, then we will simply write and B.
We now want to find a set of representatives reps( ) for each coefficient transition set .The set reps( ) will contain only the smallest and largest coefficient, which in the following we will denote extreme coefficients, from the set .Since all inequalities are of the form increasing the absolute value of a positive summand α i x i makes the inequality system harder to be solved, while decreasing it may only enlarge the set of solutions (correspondingly for negative summands).So, we only have to consider the largest and smallest coefficient α i contained in the coefficient transition set.The largest and smallest coefficient will correspond, in combination with a negative and positive x i value, respectively, to the smallest negative and positive summand, respectively.If a coefficient transition set is infinite, it contains coefficients with an arbitrarily large magnitude, which we will represent by the meta-characters +∞ and −∞ in order to indicate that we can replace them with large enough values.Similarly, if a β-transition set B + q,q is infinite, we will use +∞-symbol as a representative (indicating that we can find arbitrary large β-values and therefore such inequalities can be ignored), and for β-transition sets B − q,q we choose the element with the smallest magnitude as representative.
In the following definition, the function min returns from a subset of the language L(([+|−][0|1(0|1) * ]) * ) the string (if existent) with the smallest value when interpreted as a binary encoded integer with preceding sign, while max returns the string with the largest value.
Definition 4 For transition sets s q,q and B s q,q , we define: reps( + q,q ) := {min( + q,q ), +∞}, if | + q,q | = ∞ {min( + q,q ), max( + q,q )}, otherwise, Since the transition sets are given by finite automata, it can be checked whether they are finite or infinite.Recall that the elements in the transitions sets have no preceding zeros, i.e., the only elements with a letter 0 after the sign are +0 and −0.Hence, for a transition set + q,q , the element min( + q,q ) is among the shortest words in + q,q .Since + q,q is given by a DFA, the shortest words in the language are labels of simple paths in the automaton.Hence, we can enumerate the finitely many simple paths of the automaton in order to find the element min( + q,q ).Similarly, we can find max( − q,q ) among the shortest words of − q,q .The next step is to identify all inequalities which can be completely read in between two states and that only contain extreme coefficients, i. e., members from reps( ) and reps(B) as coefficients and β-values.Definition 5 Let A = (Q, , δ, q 0 , F) be a DFA with L(A) ⊆ L enc .For every pair of states q, q ∈ Q, we define the inequality transition set q,q as: Now we want to pick finitely many representatives for every inequality transition set q,q .From these representatives, we then build the condensed automaton cond(A) which plays the crucial role in our main technical theorem stating that Some sets have the property that for any ILP-instance, we can find in an inequality that can be added to the instance without making it unsatisfiable.For those inequality transition sets, we simply choose $ as the representative to indicate that this transition set does not participate in the problem as we can always find a satisfiable inequality in it.Two types of inequality transition sets have this property.If q,q contains an inequality with an +∞symbol as β-value, then an inequality with an arbitrary high actual β-value can be read in between q and q .So, for every value of the left side of the inequality we can read an even larger right side.The other type of sets are those which contain inequalities with an unbounded number of nonzero coefficients.Recall that the sets only contain coefficients which are representatives of sets and hence the number of different coefficients in all sets is finite.Hence, the only reason a set is infinite is because the number of coefficients in the inequalities can be arbitrarily large.Therefore, those inequality transition sets are exactly the sets which are infinite after we removed all inequalities ending with more than |Q| = n consecutive coefficients zero.By removing more than n consecutive coefficients zero from the end of the sum, we ensure that there is a nonzero coefficient under the last n coefficient.If the set is still infinite, we can find inequalities with nonzero coefficients with an arbitrary high index.Inequalities with more than n consecutive coefficients zero after the last nonzero coefficient can be ignored, because there is an equivalent inequality with less than n coefficients zero in the inequality transition set.
It remains to consider the case when the modified inequality transition sets are finite.In this case, we can iterate through the finitely many inequalities.Note that if an inequality ξ contains a coefficient α i = +∞ or α i = −∞, then we can replace this inequality with an inequality where α i has an arbitrarily high magnitude.Consider a solution vector x for ξ .In the case that α i = +∞ and x i < 0, we can replace the inequality ξ with an inequality ξ which is identical to ξ except for the coefficient α i which is replaced by an actual coefficient such that the term α i x i is negative and dominates the inequality in the sense that α i x i ≤ β − j =i α j x j .Hence, we know that for every solution vector x we can replace ξ by a satisfied inequality ξ if x i < 0. For the case that x i > 0, we find the minimal coefficient with which we can replace α i in the respective coefficient transition set and hence can replace α i = +∞ in ξ by this value.Therefore, we can replace an inequality ξ containing at least one ∞ coefficients by a set of inequalities where for every coefficient α i = +∞ the inequality x i < 0 and for every coefficient α i = −∞ the inequality x i > 0 is contained.The remaining inequalities not containing any ∞ coefficient are simply added to the set of representatives for the inequality transition set.Recall that, whenever we chose a representative +∞ or −∞ for a coefficient transition set, then we also took the coefficient with the smallest absolute value min( + q,q ) or max( − q,q ) into the set of representatives.Hence, for each inequality in q,q containing an ∞ symbol, there is a similar inequality in the set q,q where the ∞ symbols are replaced with coefficients with smallest magnitude.This especially handles the edge case that a variable x i with unbounded coefficient is set to zero.
Algorithm 1 Computing reps( q,q ) on input q,q if ∃w ∈ q,q which ends with +∞$ then return Note that there are only finitely many sets reps( q,q ) which are by construction all of a finite size.

P. Wolf
We will now construct a condensed automaton which will have the finitely many inequalities, chosen as a representative, as its alphabet.Definition 6 Let A = (Q, , δ, q 0 , F) be a deterministic finite automaton with L(A) ⊆ L enc .We define cond(A) := (Q, , δ , q 0 , F) with the alphabet = q,q ∈Q reps( q,q ) and δ = {(q, ξ, q ) | ξ ∈ reps( q,q )}.Lemma 3 will show that it is enough to consider simple paths in cond(A).

Correctness of the condensed automaton
We will now present several lemmas which in the end will prove that L(A) ∩ ILP enc = ∅ if and only if L(cond(A)) ∩ ILP enc = ∅.First, we will show that it is sufficient to consider only the largest and smallest coefficient which can be read in between two states.Lemma 1 Let A = (Q, , δ, q 0 , F) be a DFA, let w ∈ L(A) ∩ ILP enc with solution x and let α i j be the jth coefficient of the ith inequality of w.Let w = w α i j w .If α i j = a i j b i j c i j , b i j = ε, and δ * (q 0 , w a i j ) = δ * (q 0 , w a i j b i j ), then the following holds: 1. Assume x j ≥ 0 and α i j has a + sign.Let w result from w by replacing α i j with a i j c i j .
Then w ∈ L(A) ∩ ILP enc and x is a solution for w .2. Assume x j ≥ 0 and α i j has a − sign.Let w result from w by replacing α i j with a i j (b i j ) 2 c i j .Then w ∈ L(A) ∩ ILP enc and x is a solution for w .3. Assume x j ≤ 0 and α i j has a + sign.Let w result from w by replacing α i j with a i j (b i j ) 2 c i j .Then w ∈ L(A) ∩ ILP enc and x is a solution for w .4. Assume x j ≤ 0 and α i j has a − sign.Let w result from w by replacing α i j with a i j c i j .
Then w ∈ L(A) ∩ ILP enc and x is a solution for w .

Proof
The fact that w is accepted by A follows from the definition of α i j , which states that A is in the same state before and after reading the sub-word b i j .Therefore, b i j can be pumped.Since we know that x is already a solution for w we have to show that it remains a solution if we change one inequality in the described way.Recall that all considered inequalities are of the form α • x ≤ β.
In (1) x j , as well as its coefficient, are non negative integers satisfying the inequality.In w the value of the coefficient α i j has decreased by removing b i j (which is not empty) decreasing also the value of the summand a i j c i j • x j , hence decreasing the sum of all summands in the inequality which has already been smaller than β.Thus, the altered inequality of w is also satisfied and since the other inequalities have not been altered, the ILP-instance w is also satisfied by the solution x.
In (2) the value of the summand α i j • x j is negative, hence increasing α i j decreases the value of the summand and therefore the value of the left side of the inequality.We do so by pumping b i j , therefore w is also satisfied by x.
Next, we will focus on whole inequalities and show that restricting the inequalities in words from L(A) to the above-defined representatives does not affect the existence of a solvable ILP-instance in L(A).We already explained before the definition of the sets of representatives for inequality transition sets in Sect. 3 that for every solution vector x we can replace inequalities with a +∞ β-value by inequalities which are satisfied by x.We further argued (and elaborated in Lemma 1) that for every solution vector x we can replace an inequality ξ with a +∞ or −∞ coefficient α i with an inequality ξ where in dependence of the sign of the value of x i , this coefficient is replaced by an actual coefficient with the smallest absolute value in the respective coefficient transition set or with a coefficient with a large enough absolute value such that the following holds.If any inequality obtained by replacing α i by some coefficient from the respective coefficient transition set is satisfied by x, then the obtained inequality ξ is satisfied by x.As we only need to maintain the existence of a solvable inequality system, it is safe to replace all inequalities obtained by replacing α i by the inequality ξ with a minimal absolute value of α i and the inequality demanding the right sign of the value of x i in order to dominate the inequality by pumping the value of α i .
With respect to inequality transition sets containing inequalities with arbitrarily high indexed nonzero coefficients, we will show next how to simultaneously replace such inequalities in a way that the replacements are satisfied by an extension of x.So, if the ILP-instance is solvable without inequalities from sets which are represented by $-symbols, then we can enlarge the instance and the solution to include those inequalities.
For the next lemma, we want to distinguish the infinite inequality transition sets without an unbounded β-value from the finite ones.

Definition 7
Inf := q,q | reps( q,q ) = {$} ∧ q,q ∩ L L Val * ≤ +∞$ = ∅ Fin := q,q | reps( q,q ) = {$} We will now find alternative representatives for the sets in Inf such that if an ILP-instance consisting only of inequalities from the sets in Fin has a solution x, then we can extend the ILP-instance with any combination of alternative representatives of the sets in Inf , such that x can be extended to a solution of the extended ILP-instance (we shall prove this in Lemma 2).This shows that we can ignore inequalities from the sets in Inf , i. e., the ones with representative.

Definition 8 Let σ : [|Inf |] → Inf be an arbitrary but fixed ordering of the sets in Inf .
Let n := |Q| and # ± (w) denote the number of signs in an inequality w.The function min lex returns the lexicographical minimal element of a set. 5For every 1 ≤ i ≤ |Inf | we define for the inequality transition set σ (i) in Inf a set ofalternative representatives arep as For each fixed i the assignment of arep(σ (i)) in the above definition can be determined by computing the intersection of two regular sets given by DFAs, yielding a finite language.This finite language can be enumerated in order to find the lexicographical minimal element.The idea is to pick inequalities as alternative representatives which together form a matrix in row echelon form.For every inequality we assign the variable x k with the highest indexed nonzero coefficient α k with a value of which magnitude is large enough, such that the summand α k x k dominates the inequality.An inequality in the sets of Fin can only consist of up to n = |Q| different coefficients.The definition of arep( ) ensures that the representatives of ∈ Inf contain more coefficients than any representative of the finite inequality transition sets.It also ensures that the number of coefficients contained in the representing inequality is strictly monotonously rising with the order σ .Especially, the index of the highest nonzero coefficient of arep(σ (i + 1)) is higher than the index of the highest nonzero coefficient of arep(σ (i)).
Lemma 2 Let w be a solvable ILP-instance consisting only of inequalities from sets in Fin .Let x be a valid solution of w.Then, for every ILP-instance w consisting of w and additional inequalities from {arep( ) | ∈ Inf } the vector x can be extended to a solution x of w .
Proof Let x = (x 1 , x 2 , . . ., x i ), let m be the number of variables in w , and let var-set(ξ ) be a function returning the variables appearing in the inequality ξ with a nonzero coefficient.Let coeff (ξ, y j ) denote the coefficient of variable y j in the inequality ξ , let value(y j ) denote the assigned value x j of the variable y j in the constructed solution x , and let fi(ξ ) refer to the right side β of the inequality ξ .Algorithm 2 assigns values to the new variables y i+1 , y i+2 , . . ., y m appearing in w such that x = (x 1 , . . ., x i , x i+1 , . . ., x m ) is a solution of the instance w and works as follows.
Algorithm 2 Extending solution x of ILP-instance w to solution x of w .
We go through the inequalities appearing in w which have been chosen as alternative representatives for the sets in Inf in the same order as when we assigned the representatives.Thus, the number of appearing variables per inequality is rising.In every considered inequality, there is at least one variable which has not appeared in the previously considered inequalities.We assign the new variables with a zero value, except for the variable with the highest index.This variable (MaxVar) gets a value which compensates all the other summands in the inequality.The sign of MaxVar is converse to the sign of its coefficient resulting in a negative summand.We can choose the value of MaxVar freely, since the variable has not appeared in any other inequality we considered earlier.If it appears in any later considered inequality, there will always be at least one new variable in the inequality which has not appeared earlier, and which can again compensate every other summand.It is easy to see that the considered inequality CurIneq is satisfied by the chosen variable assignment.Hence, x = (x 1 , . . ., x i , value(y i+1 ), . . ., value(y m )) is a solution of the ILP-instance w .
As a last step, we show that it suffice to consider only simple paths in cond(A) in order to find a solvable ILP-instance in L(cond(A)), since we can always remove inequalities from a solvable ILP and maintain solvability.Lemma 3 Let w, w ∈ L enc and w be w without an arbitrary inequality ξ from w. (So, w is w with one inequality less.)If w ∈ ILP enc then w ∈ ILP enc .
Proof Adding an inequality can only decrease the set of solutions of the ILP-instance.So, removing an inequality cannot make the instance unsolvable.
We will now show that if there is a solvable ILP-instance in L(cond(A)), then we can replace any $-symbols in this instance by actual inequalities, resulting in a solvable ILP-instance in L(A).On the other hand, if there is a solvable ILP-instance in L(A), the modifications we made on A while constructing cond(A) preserve the existence of a solvable ILP-instance in the obtained language L(cond(A)).

Proof
We first prove the only if direction.Let w ∈ L(A) ∩ ILP enc be the label of an accepting path p in A representing a solvable ILP-instance.Let x be a solution of w.Let w only contain the inequalities of w, which are read between some states q and q in p and for which q,q ∈ Fin .All other inequalities in w are replaced by -symbols in w .According to Lemma 3 w is still a solvable ILP-instance.Lemma 1 states that by pumping coefficients in w up or down, according to the sign of the associated variable in x, we obtain an ILP-instance w which is still solvable.In case of pumping up a coefficient α i such that the term α i x i is negative we can replace the inequality in which α i appears by x i < 0 for α i > 0 and x i > 0 for α i < 0. In case of pumping down, the string representing the smallest absolute value for a coefficient is chosen among the shortest possible strings.The resulting string w is an element of L(cond(A)) and still a solvable ILP-instance.Hence, L(cond(A)) ∩ ILP enc = ∅.
For the other direction, let w ∈ L(cond(A)) ∩ ILP enc .By the definition of cond(A), w only consists of inequalities from sets in Fin or the $-symbol.If w is already a member of L(A), the claim follows.Assume w / ∈ L(A).By the assignment of the sets reps( q,q ) by Algorithm 1, w contains at least one inequality or one inequality of the form x i < 0 or x i > 0. Let x be a solution of the ILP described by w.First, assume w contains some inequality of the form x i < 0 or x i > 0. We focus on the case x i < 0, the other case is analogous.Let p be the path induced by w in cond(A) and let q, q be the states in p between which the inequality x i < 0 is read.Then, by the definition of reps( q,q ) we find an inequality ξ in q,q where the coefficient α i has value +∞.Since the constraint x i < 0 is satisfied by x using a pumping argument, we find an inequality ξ in q,q where all coefficients except α i have minimal absolute values and for which α i is positive and α i x i ≤ β − j =i α j x j .Hence, ξ is satisfied by an extension of x (ξ might introduce new variables to w which need to be assigned).Thereby, we can replace inequalities containing ∞ coefficients from the set Fin by inequalities which can be read between the same pair of states in the automaton A without falsifying the ILP.
Next, we focus on inequalities in w which are represented by $-signs.Let q, q be the states in p between which an inequality $ is read.By Algorithm 1, the set q,q either contains an inequality with an ∞-symbol as β-value or is in Inf .We first handle all $-transitions in the path p for which q,q is in Inf .
Definition 8 defines representatives which can be read between q and q in A instead of $.Following Lemma 2, w can be enlarged with inequalities from {arep( ) | ∈ Inf } without making the ILP-instance represented by w unsolvable.So, if we replace the $-transitions in the path p by paths in A corresponding to the alternative representatives from Definition 8, we get a path p with the ILP-instance w as its label.
Finally, we replace all $-transitions in p for which q,q contains inequalities with unbounded β-values indicated by a string ending with ∞$ in q,q .Therefore, we choose an inequality which can be read between q and q where all coefficients have minimal absolute 123 value and a value for β above j α j x j .Since β is positive and can be pumped, we can find such an inequality.Clearly, the inequality obtained in such a way is satisfied by x.We conclude by observing that the obtained string w is accepted by A and an extension of the vector x is a solution for the ILP represented by w .
Hence, L(A) ∩ ILP enc = ∅.Now, we are ready to put the pieces together and present our main result.In the following, we give a decision procedure for the int Reg -problem of ILP.

Theorem 2
The problem int Reg (ILP) is decidable.
Proof Since L enc is regular, we can restrict L(A) to the regular language L(A) ∩ L enc .In the following, let A = (Q, , δ, q 0 , F) be a deterministic finite automaton accepting the restriction of L(A) to L(A) ∩ L enc .For the automaton A, the Definitions 3 and 4 describe the construction of coefficient transition sets and the assignment of their representatives.In Definition 5, inequality transition sets are constructed based on those representatives.These inequality transition sets get representatives themselves by the Algorithm 1.In Definition 6, a new automaton cond(A) is defined, based on the representatives for the inequality transition sets.All those constructions can be computed by an algorithm.Theorem 1 states that L(A) ∩ ILP enc = ∅ ⇔ L(cond(A)) ∩ ILP enc = ∅.Finally, Lemma 3 tells us that if there is a solvable ILP-instance in L(cond(A)) at all, then there is a solvable ILP-instance w in L(cond(A)) which can be read on a simple path in cond(A).Since there are only finitely many simple paths in an automaton, and testing a given ILP-instance for solvability can be done in finite time, we can test all words in L(cond(A)) which correspond to labels of simple paths in cond(A) for membership in ILP enc in finite time.Hence, L(A) ∩ ILP enc = ∅ is decidable.

Bounds
We give bounds on the number of words we need to consider in L(cond(A)), as well as on their length regarding the alphabet of cond(A).
Theorem 3 Let A = (Q, , δ, q 0 , F) be a deterministic finite automaton.Then, in order to decide whether L(A) ∩ ILP enc = ∅ it suffices to consider up to Proof As we only consider simple paths in cond(A), the length of considered words in L(cond(A)) regarding is bounded by |Q|.Therefore, also the number of inequalities per considered ILP-instance is bounded by |Q|.An inequality can consist of up to |Q| coefficients and a β-value or of a single $-symbol.Each coefficient transition set was assigned with two representatives.As we have one transition set for each sign, the up to 2|Q| 2 coefficient transition sets yield in total up to 4|Q| 2 representatives for coefficient transition sets.The sets B q,q were assigned with single representatives,6 so there are in total up to 2|Q| 2 representatives for β-transition sets.
The total number of inequalities consisting of up to |Q| coefficients and a β-value or consisting only of $ is bounded by The total number of ILP-instances consisting of up to |Q| inequalities of that form is bounded by This is also an upper bound on the number of words which have to be considered in L(cond(A)).
Proof The number of considered words in L(cond(A)) is bounded by 2 O(|Q| 2 log(|Q|)) .The length of considered words in L(cond(A)) regarding the alphabet of cond(A) is bounded by O(|Q|).As each representative of a coefficient transition set appearing in words of L(cond(A)) is of length at most |Q|, the length of words in L(cond(A)) considering the alphabet is bounded by |Q| 2 .Therefore, we can guess some word in L(cond(A)) and check its membership in ILP enc by solving the represented ILP-instance.Since ILP is NP-complete int Reg (ILP)∈ NP follows.For a given ILP-instance, we can construct a DFA accepting only this instance in polynomial time.Hence int Reg (ILP) is NP-complete.

Conclusion
According to [30], the presented results are stable under applying a length-preserving morphism to the encoding scheme.The results are also stable under changing the binary encoding to any base-k encoding.Recall that in order to talk about regular sets of problem-instances, we want to have a problem encoding which can be verified by a deterministic finite automaton.In particular, we cannot verify with a DFA that all variables appear in a certain inequality or that the inequalities have the same length.Therefore, we have implicitly filled the inequalities with coefficients zero to ensure the same number of variables per inequality.Note that this forbids an explicit matrix representation of an ILP-instance.Instead of referencing the variables of an inequality implicitly by the number and order of the coefficients we could also use another encoding, where we explicitly name the variables and the coefficients.In this setting multiple occurrences of the same variable would be possible and would be interpreted as a summation of terms.Here, we would define transition sets for coefficients and for variables.We would not pump the number of variables in an inequality but instead pump the label of a variable to make it independent of other variables and inequalities.We would still treat the coefficients in the same way and we would also consider only simple paths.In terms of the 'int Reg -techniques' of [35] we would switch from the replacing technique to the separating technique and the int Reg -problem of ILP in this variable-explicit encoding would still be decidable.
Although we considered partial DFAs, the construction also works for partial NFAs.It might be worthwhile to investigate further extensions of int Reg (ILP) such as Boolean combinations of inequalities or quadratic programming.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.