Skip to main content
Log in

Integer Feasibility and Refutations in UTVPI Constraints Using Bit-Scaling

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

This paper is concerned with the design and analysis of a bit-scaling based algorithm for the problem of checking integer feasibility in a system of unit two variable per inequality (UTVPI) constraints (IF). The insights developed during algorithm design result in new techniques for extracting refutations of integer feasibility in such systems. Recall that a UTVPI constraint is a linear constraint of the form: \(a_i\cdot x_i+a_j \cdot x_j \le b_{ij}\), where \(a_i, a_j \in \{0,1,-1\}\) and \(b_{ij} \in {\mathbb {Z}}\). These constraints arise in a number of application domains including but not limited to program verification (array bounds checking and abstract interpretation), operations research (packing and covering), and logic programming. Over the years, several algorithms have been proposed for the IF problem. Most of these algorithms are based on two inference rules, viz. the transitive rule and the tightening rule. None of these algorithms are bit-scaling. In other words, the running times of these algorithms are parameterized only by the number of variables and the number of constraints in the UTVPI constraint system (UCS) and not by the sizes of input constants. We introduce a novel algorithm for the IF problem, which is based on a collection of new insights. These insights are used to design a new bit-scaling algorithm for IF that runs in \(O(\sqrt{n}\cdot m \cdot \log _2 C)\) time, where n denotes the number of variables, m denotes the number of constraints, and C denotes the absolute value of the most negative constant defining the UCS. An interesting consequence of our research is the development of techniques for extracting refutations of integer infeasibility in UCSs that are linearly feasible. If the UCS is linearly feasible, then our algorithm creates a 2CNF formula. The UCS has an integer refutation (i.e., does not have a lattice point) if and only if the created 2CNF formula has a resolution refutation (i.e., is unsatisfiable).

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

Access this article

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

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows: Theory, Algorithms and Applications. Prentice-Hall, Hoboken (1993)

    MATH  Google Scholar 

  2. Aspvall, B., Plass, M.F., Tarjan, R.E.: A linear time algorithm for testing the truth of certain quantified boolean formulas. Inf. Process. Lett. 8(3), 121–123 (1979)

    Article  MATH  Google Scholar 

  3. Bagnara, R., Hill, P.M., Zaffanella, E.: Weakly-relational shapes for numeric abstractions: improved algorithms and proofs of correctness. Form. Methods Syst. Des. 35(3), 279–323 (2009)

    Article  MATH  Google Scholar 

  4. Büning, H.K., Wojciechowski, P.J., Subramani, K.: Finding read-once resolution refutations in systems of 2CNF clauses. Theor. Comput. Sci. 729, 42–56 (2018)

    Article  MATH  Google Scholar 

  5. Buresh-Oppenheim, J., Mitchell, D.G.: Minimum 2CNF resolution refutations in polynomial time. In: Marques-Silva, J., Sakallah, K.A. (eds.) Theory and Applications of Satisfiability Testing—SAT 2007, 10th International Conference, Lisbon, Portugal, May 28-31, 2007, Proceedings, volume 4501 of Lecture Notes in Computer Science, pp. 300–313. Springer (2007)

  6. Bonet, M.L., Pitassi, T., Raz, R.: Lower bounds for cutting planes proofs with small coefficients. J. Symb. Log. 62(3), 708–728 (1997)

    Article  MATH  Google Scholar 

  7. Cook, W., Coullard, C.R., Turan, Gy.: On the complexity of cutting-plane proofs. Discrete Appl. Math. 18, 25–38 (1987)

  8. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  9. Dantzig, G.B., Eaves, B.C.: Fourier–Motzkin elimination and its dual. J. Comb. Theory (A) 14, 288–297 (1973)

    Article  MATH  Google Scholar 

  10. Goldberg, A.V.: Scaling algorithms for the shortest paths problem. SIAM J. Comput. 24(3), 494–504 (1995)

    Article  MATH  Google Scholar 

  11. Gomory, R.E.: Outline of an algorithm for integer solutions to linear programs. Bull. Am. Math. Soc. 64, 275–278 (1958)

    Article  MATH  Google Scholar 

  12. Haken, A.: The intractability of resolution. Theoret. Comput. Sci. 39(2–3), 297–308 (1985)

    Article  MATH  Google Scholar 

  13. Hochbaum, D.S., Naor, J.: Simple and fast algorithms for linear and integer programs with two variables per inequality. SIAM J. Comput. 23(6), 1179–1192 (1994)

    Article  MATH  Google Scholar 

  14. Hooker, J.N.: Generalized resolution and cutting planes. Ann. Oper. Res. 12(1–4), 217–239 (1988)

    Article  Google Scholar 

  15. Harvey, W., Stuckey, P.J.: A unit two variable per inequality integer constraint solver for constraint logic programming. In: Proceedings of the 20th Australasian Computer Science Conference, pp. 102–111 (1997)

  16. Jaffar, J., Maher, M.J., Stuckey, P.J., Yap, H.C.: Beyond finite domains. In: Proceedings of the Second International Workshop on Principles and Practice of Constraint Programming (1994)

  17. Lahiri, S.K., Musuvathi, M.: An efficient decision procedure for UTVPI constraints. In: Proceedings of the \(5^{th}\) International Workshop on the Frontiers of Combining Systems, September 19–21, Vienna, Austria, pp. 168–183. Springer, New York (2005)

  18. Miné, A.: The octagon abstract domain. High. Order Symb. Comput. 19(1), 31–100 (2006)

    Article  MATH  Google Scholar 

  19. Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Abstract DPLL and abstract DPLL modulo theories. In: LPAR, pp. 36–50 (2004)

  20. Pitassi, T., Urquhart, A.: The complexity of the Hajós calculus. In: 33rd Annual Symposium on Foundations of Computer Science, Pittsburgh, Pennsylvania, USA, 24–27 October 1992, pp. 187–196 (1992)

  21. Pudlák, P.: Lower bounds for resolution and cutting plane proofs and monotone computations. J. Symb. Log. 62(3), 981–998 (1997)

    Article  MATH  Google Scholar 

  22. Robinson, J.A.: A machine-oriented logic based on the resolution principle. J. ACM 12(1), 23–41 (1965)

    Article  MATH  Google Scholar 

  23. Schutt, A., Stuckey, P.J.: Incremental satisfiability and implication for UTVPI constraints. INFORMS J. Comput. 22(4), 514–527 (2010)

    Article  MATH  Google Scholar 

  24. Seshia, S.A., Subramani, K., Bryant, R.E.: On solving boolean combinations of UTVPI constraints. J. Satisf. Boolean Model. Comput. 3(1,2), 67–90 (2007)

    MATH  Google Scholar 

  25. Subramani, K.: On deciding the non-emptiness of 2SAT polytopes with respect to first order queries. Math. Log. Q. 50(3), 281–292 (2004)

    Article  MATH  Google Scholar 

  26. Subramani, K.: Optimal length tree-like resolution refutations for 2sat formulas. ACM Trans. Comput. Log. 5(2), 316–320 (2004)

    Article  MATH  Google Scholar 

  27. Subramani, K.: Optimal length resolution refutations of difference constraint systems. J. Autom. Reason.: JAR 43(2), 121–137 (2009)

    Article  MATH  Google Scholar 

  28. Subramani, K., Worthington, J.: Feasibility checking in Horn constraint systems through a reduction based approach. Theor. Comput. Sci. 576, 1–17 (2015)

    Article  MATH  Google Scholar 

  29. Subramani, K., Wojciechowski, P.J.: A combinatorial certifying algorithm for linear feasibility in UTVPI constraints. Algorithmica 78(1), 166–208 (2017)

    Article  MATH  Google Scholar 

  30. Subramani, K., Wojciechowski, P.J.: A certifying algorithm for lattice point feasibility in a system of UTVPI constraints. J. Comb. Optim. 35(2), 389–408 (2018)

    Article  MATH  Google Scholar 

  31. Subramani, K., Wojciechowki, P.: A polynomial time algorithm for read-once certification of linear infeasibility in UTVPI constraints. Algorithmica 81(7), 2765–2794 (2019)

    Article  MATH  Google Scholar 

  32. Subramani, K., Wojciechowski, P.J.: On integer closure in a system of unit two variable per inequality constraints. Ann. Math. Artif. Intell. 88(10), 1101–1118 (2020)

    Article  MATH  Google Scholar 

  33. Wojciechowski, P., Subramani, K., Chandrasekaran, R.: Analyzing read-once cutting plane proofs in Horn systems. J. Autom. Reason.: JAR 66, 239–274 (2022)

    Article  MATH  Google Scholar 

Download references

Acknowledgements

This research was supported in part by the Air-Force Office of Scientific Research through Grant FA9550-19-1-0177, in part by the Air Force Research Laboratory Information Directorate, through the Air Force Office of Scientific Research Summer Faculty Fellowship Program®, Contract Numbers FA8750-15-3-6003, FA9550-15-0001 and FA9550-20-F-0005, and in part by the NASA Established Program to Stimulate Competitive Research, Grant # 80NSSC22M0027.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to K. Subramani.

Ethics declarations

Conflict of interest

We have no conflict of interest with respect to this work.

Additional information

Publisher's Note

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

An extended abstract of this work was published in IWOCA 2016.

A Goldberg’s Algorithm

A Goldberg’s Algorithm

We now provide detailed description of Goldberg’s Algorithm (Goldberg()). Let \(\mathbf{G}\) be a directed graph and let \(-C\) be the smallest weight of any edge in \(\mathbf{G}\).

Initially, \(\epsilon = 2^{1+\lfloor \log _2 C\rfloor }\). This ensures that \(C<\epsilon \). Let \(\mathbf{p}\) be the price function for the vertices in \(\mathbf{G}\). Initially, \(\mathbf{p}\) is uniformly 0. For price function \(\mathbf{p}\), we define the reduced cost \(l_\mathbf{p}\) of an edge \(e = (x_i,x_j)\) as \(l_\mathbf{p}(e) =\) weight \((e) + p_i - p_j\). Note that \(\mathbf{p}\) is \(\epsilon \)-feasible if \(l_\mathbf{p}(e) > \epsilon \) for every edge in \(\mathbf{G}\).

Based on the value of \(l_\mathbf{p}\), the edge e can be classified as admissible or as improvable. The edge e is admissible if \(l_\mathbf{p}(e) \le 0\) and is improvable if \(l_\mathbf{p}(e) \le \frac{\epsilon }{2}\). A node \(x_i\) is improvable if it has an inbound improvable edge. Note that if \(\mathbf{G}\) has no improvable edges, then \(\mathbf{p}\) is \(\frac{\epsilon }{2}\)-feasible. The subgraph of \(\mathbf{G}\) consisting of the admissible edges is called the Admissible Graph \(\mathbf{G_p}\).

Goldberg() then calls Refine() to convert \(\mathbf{p}\) from an \(\epsilon \)-feasible (Definition 7) price function into an \(\frac{\epsilon }{2}\)-feasible price function. This is done until either:

  1. 1.

    It reaches a value of \(\epsilon \) for which no \(\epsilon \)-feasible solution is found. In this case, \(\mathbf{G}\) has a negative cycle c. Goldberg() then returns this negative cycle.

  2. 2.

    \(\mathbf{p}\) is a 1-feasible price function. In this case, \(\mathbf{p}\) is a feasible price function.

First, Refine() computes the Admissible Graph \(\mathbf{G_p}\). Then it computes the strongly-connected components (SCCs) of \(\mathbf{G_p}\). If any SCC of \(\mathbf{G_p}\) contains an edge \(e_{ij}\) from \(x_i\) to \(x_j\) with negative reduced cost, then \(\mathbf{G}\) has a negative cycle c. Note that c consists of the edge \(e_{ij}\) and the path from \(x_j\) to \(x_i\) in the SCC. Thus, once the edge \(e_{ij}\) is found, the cycle c can be constructed in O(m) time. Otherwise, each SCC of \(\mathbf{G_p}\) is contracted to a single vertex. This process is known as decycling and the resultant graph is called the Decycled Admissible Graph.

Refine() then utilizes processes known as Cut-Relabel (Cut-Relabel()) and Eliminate Chain (Eliminate-Chain()) to transform \(\mathbf{p}\) from an \(\epsilon \)-feasible price function into an \(\frac{\epsilon }{2}\)-feasible price function.

Cut-Relabel() operates on a set S of vertices such that no edges in \(\mathbf{G_p}\) leave S. Such a set S is called closed. Cut-Relabel() decreases the price function \(p_i\) by \(\frac{\epsilon }{2}\) for every vertex \(x_i \in S\). This has the following results:

  1. 1.

    Every improvable edge entering S is no longer improvable.

  2. 2.

    Every improvable vertex \(x_i \in S\) such that every improvable edge into \(x_i\) enters S is no longer improvable.

  3. 3.

    No additional edges are made improvable.

Thus, with a properly chosen set S, Cut-Relabel(), reduces the total number of improvable vertices.

Eliminate-Chain() operates on a path r containing improvable edges. Let \(e_j\) be the \(j^{th}\) improvable edge from the end of r. Additionally, let \(S_j\) be the set of vertices reachable from the destination vertex of \(e_j\). Eliminate-Chain() then calls Cut-Relabel() on each set \(S_j\). This has the following results:

  1. 1.

    The destination vertex of every improvable edge in r is no longer improvable.

  2. 2.

    No additional edges are made improvable.

Note that for each j, \(S_j \subseteq S_{j+1}\). Thus, Eliminate-Chain() can be executed in O(m) time.

If \(\mathbf{G_p}\) contains k improvable vertices, then there exists a set S or a path r such that running Cut-Relabel() on S or Eliminate-Chain() on r reduces the number of improvable vertices in \(\mathbf{G_p}\) by \(\sqrt{k}\). Additionally such a set or path can be found in O(m) time. Thus, Refine() can convert an \(\epsilon \)-feasible price function into an \(\frac{\epsilon }{2}\)-feasible price function with \(O(\sqrt{n})\) calls to either Cut-Relabel() or Eliminate-Chain().

This means that each call to Refine() takes at most \(O(\sqrt{n} \cdot m)\) time and \(\mathbf{p}\) is refined at most \(\log _2 C\) times. Thus, the algorithm has an overall running time of \(O(\sqrt{n} \cdot m \cdot \log _2 C)\).

1.1 A.1 Worked Example

Let \(\mathbf{G}\) be the directed graph in Fig. 5. We show what happens when Goldberg() is run on \(\mathbf{G}\).

Fig. 5
figure 5

Directed graph

Since the most negative edge weight in \(\mathbf{G}\) is \(-1\), we start with \(\epsilon = 2^{1+\log _2 1} =2\). Our initial 2-feasible price function \(\mathbf{p}\) assigns a value of 0 to every vertex. This is shown in Table 2.

Table 2 Initial price function \(\mathbf{p}\)

Every edge in \(\mathbf{G}\) is currently admissible (has non-positive reduced cost). Thus, the Graph in Fig. 5 is also the Admissible Graph \(\mathbf{G_p}\). The Admissible Graph \(\mathbf{G_p}\) has only one SCC with multiple vertices (\(x_6\), \(x_7\), and \(x_8\)). Thus, decycling \(\mathbf{G_p}\) combines these vertices into a single vertex. Let \(x_\alpha \) denote this vertex. The Decycled Admissible Graph is shown in Fig. 6.

Fig. 6
figure 6

Decycled Admissible Graph

Now that \(\mathbf{G_p}\) has been decycled, we can refine the 2-feasible price function \(\mathbf{p}\) into a 1-feasible price function. Recall that this is done by calling Cut-Relabel() and Eliminate-Chain() until no improvable vertices remain.

\(\mathbf{G_p}\) currently has 5 improvable vertices (\(x_2\), \(x_3\), \(x_4\), \(x_5\), and \(x_\alpha \)). The path \(x_1 \overset{-1}{\rightarrow } x_2 \overset{-1}{\rightarrow } x_3 \overset{-1}{\rightarrow } x_4\) contains \(3 > \sqrt{5}\) improvable vertices. Thus, we run Eliminate-Chain() on this path. This involves running Cut-Relabel() on set \(S_1\) (the set of vertices reachable from \(x_4\)), set \(S_2\) (the set of vertices reachable from \(x_3\)), and set \(S_3\) (the set of vertices reachable from \(x_2\)). These sets are shown in Fig. 7.

Fig. 7
figure 7

Sets \(S_i\) for Eliminate-Chain()

Recall that the vertex sets made by Eliminate-Chain() are nested. Thus, the price of vertices in \(S_1\) (the vertex \(x_4\)) is decreased by \(3 \cdot 1=3\), the price of vertices in \(S_2 \setminus S_1\) (the vertices \(x_3\) and \(x_\alpha \)) is decreased by \(2 \cdot 1 =2\), and the price of vertices in \(S_3 \setminus S_2\) (the vertices \(x_2\) and \(x_5\)) is decreased by \(1 \cdot 1 =1\). This results in the price function shown in Table 3.

Table 3 Price function \(\mathbf{p}\) after Eliminate Chain()

The change in price function changes the Admissible Graph \(\mathbf{G_p}\). Note that the edge from \(x_5\) to \(x_\alpha \) now has reduced cost \(0 + (-1) - (-2) =1\). Thus, this edge is no longer admissible. This new graph is shown in Fig. 8.

Fig. 8
figure 8

Decycled Admissible Graph after Eliminate-Chain()

\(\mathbf{G_p}\) currently has 2 improvable vertices (\(x_5\) and \(x_\alpha \)). The set \(S = \{x_5,x_\alpha \}\) is closed since no admissible edges leave S. S also contains 2 vertices such that all improvable edges into those vertices enter S. Thus, running Cut-Relabel() on S will reduce the number of improvable vertices by \(2 > \sqrt{2}\). The set S is shown in Fig. 9.

Fig. 9
figure 9

Set S for Cut-Relabel()

Calling Cut-Relabel() on the set S will reduce the price of the vertices in S (\(x_5\) and \(x_\alpha \)) by 1. This results in the price function shown in Table 4.

Table 4 Price function \(\mathbf{p}\) after Cut-Relabel()

The change in price function changes the Admissible Graph \(\mathbf{G_p}\). Note that the edge from \(x_1\) to \(x_5\) now has reduced cost \(-1 + 0 - (-2) =1\). Thus, this edge is no longer admissible. This new graph is shown in Fig. 10.

Fig. 10
figure 10

Decycled Admissible Graph after Cut-Relabel()

\(\mathbf{G_p}\) no longer has any admissible vertices. Thus, the price function \(\mathbf{p}\) is 1-feasible. Recall that this means that \(\mathbf{p}\) is a feasible price function. Thus, the current price function \(\mathbf{p}\) is returned by Goldberg().

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Subramani, K., Wojciechowski, P. Integer Feasibility and Refutations in UTVPI Constraints Using Bit-Scaling. Algorithmica 85, 610–637 (2023). https://doi.org/10.1007/s00453-022-01048-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-022-01048-1

Keywords

Navigation