Complexity of Bradley-Manna-Sipma Lexicographic Ranking Functions
In this paper we turn the spotlight on a class of lexicographic ranking functions introduced by Bradley, Manna and Sipma in a seminal CAV 2005 paper, and establish for the first time the complexity of some problems involving the inference of such functions for linear-constraint loops (without precondition). We show that finding such a function, if one exists, can be done in polynomial time in a way which is sound and complete when the variables range over the rationals (or reals). We show that when variables range over the integers, the problem is harder – deciding the existence of a ranking function is coNP-complete. Next, we study the problem of minimizing the number of components in the ranking function (a.k.a. the dimension). This number is interesting in contexts like computing iteration bounds and loop parallelization. Surprisingly, and unlike the situation for some other classes of lexicographic ranking functions, we find that even deciding whether a two-component ranking function exists is harder than the unrestricted problem: NP-complete over the rationals and $\Sigma^P_2$-complete over the integers.
💡 Research Summary
This paper conducts a foundational complexity-theoretic analysis of the inference problems associated with Bradley-Manna-Sipma (BMS) lexicographic linear ranking functions (LLRFs) for multipath linear-constraint loops without preconditions.
The authors begin by formalizing the definition of a BMS-LLRF. For a loop with k paths (convex polyhedra), a BMS-LLRF is a tuple of affine-linear functions <ρ1, …, ρd> such that for each path, there exists a specific component ρ_i that acts as a standard linear ranking function (non-negative and decreasing by at least 1) for all transitions in that path, while all lower-indexed components are only required to be non-increasing on those transitions. This “path-wise assignment” structure differs from other LLRF definitions, such as BG-LLRFs, which allow different transitions within the same path to be ranked by different components.
The core contributions are complexity classifications for three central problems:
-
Decision Problem (Existence): Determining whether a given loop admits a BMS-LLRF. Over the rationals (or reals), this problem is solvable in polynomial time (PTIME). The proof relies on a greedy algorithm (Algorithm 1) that iteratively finds a “BMS quasi-ranking function” (BMS-QLRF)—a function that is non-increasing on all paths and is a full LRF for at least one path. The completeness of this greedy strategy is proven (Proposition 1). In contrast, for integer-valued variables, the same decision problem is shown to be coNP-complete, reflecting the inherent difficulty of integer arithmetic.
-
Synthesis Algorithm: The greedy algorithm provides a sound and complete synthesis procedure. Over the rationals, it runs in polynomial time. Over the integers, it remains complete but requires solving coNP-hard subproblems, leading to an exponential-time algorithm in the worst case.
-
Dimension Minimization Problem: Minimizing the number of components (dimension) in a BMS-LLRF is important for applications like computing precise iteration bounds. Surprisingly, the authors prove that this problem is significantly harder than the mere existence problem. For any fixed dimension d > 1, deciding whether a BMS-LLRF with at most d components exists is NP-complete over the rationals and Σ^P_2-complete over the integers. This starkly contrasts with other LLRF classes (e.g., ADFG, BG), where the minimal dimension can be found with the same complexity as the existence problem. The jump in complexity arises because the greedy synthesis algorithm is not guaranteed to yield a minimal-dimension function, and finding one involves a combinatorial choice of which paths to assign to each component.
The paper also establishes that the maximum dimension needed for a BMS-LLRF is bounded by the number of paths (k), and provides a comprehensive table (Table 1) comparing the complexity landscapes for BMS-, ADFG-, and BG-LLRFs. These results provide the first clear computational boundaries for working with BMS-LLRFs and highlight the unique, often harder, optimization challenges they present compared to other lexicographic ranking function paradigms.
Comments & Academic Discussion
Loading comments...
Leave a Comment