In this section we turn to the problem BMS-LexLinRF
\((d,\mathbb Z)\), and show that it is harder than BMS-LexLinRF
\((d,\mathbb Q)\), specifically, it is \(\varSigma ^P_2\)-complete. The class \(\varSigma ^P_2\) is the class of decision problems that can be solved by a standard, non-deterministic computational model in polynomial time assuming access to an oracle for an NP-complete problem. I.e., \(\varSigma ^P_2 = {NP}^{{NP}}\). This class contains both NP and coNP, and is likely to differ from them both (this is an open problem).
Theorem 4
For \(d\ge 2\), BMS-LexLinRF
\((d,\mathbb Z)\) is a \(\varSigma ^P_2\)-complete problem.
The rest of this section proves Theorem 4. For inclusion in \(\varSigma ^P_2\) we use a non-deterministic procedure as in the proof of Theorem 3. Note that the procedure needs to find (or check for existence of) BMS-QLRFs over the integers, so it needs a coNP oracle. For \(\varSigma ^P_2\)-hardness we reduce from the canonical \(\varSigma ^P_2\)-complete problem (follows from [27, Theorem 4.1]): evaluation of sentences of the form
$$\begin{aligned} \exists X_1 \dots X_n \ \forall X_{n+1} \dots X_{2n} \ \lnot \phi (X_1,\dots ,X_{2n}) \end{aligned}$$
(*)
where the variables \(X_i\) are Boolean and the formula \(\phi \) is in 3CNF form. Thus, \(\phi \) is given as a collection of m clauses, \(C_1,\dots ,C_{m}\), each clause \(C_i\) consisting of three literals \(L_i^j \in \{ X_1,\dots ,X_{2n},\ \lnot X_1,\dots , \lnot X_{2n} \}\), \(1 \le j \le 3\). The reduction is first done for \(d=2\), and later extended to \(d>2\) as well.
Let us first explain a well-known approach for reducing satisfiability of a Boolean formula \(\phi \) to satisfiability of integer linear constraints. We first associate each literal \(L_i^j\) with an integer variables \(x_{i,j}\). Note that the same Boolean variable (or its complement) might be associated with several constraint variables. Let C be the set of (1) all conflicting pairs, that is, pairs ((i, j), (r, s)) such that \(L_i^j\) is the complement of \(L_r^s\); and (2) pairs \(((i,j),(i,j'))\) with \(1 \le j < j' \le 3\), i.e., pairs of literals that appear in the same clause. We let \(\mathcal F\) be a conjunction of the constraints: \(x_{i,j}+x_{r,s}\le 1\) for each \(((i,j),(r,s)) \in C\); and \(0\le x_{i,j} \le 1\) for each \(1\le i \le m\) and \(1\le j\le 3\). An assignment for \(x_{i,j}\) that satisfies \(\mathcal F\) is called a non-conflicting assignment, since if two variables correspond to conflicting literals (or to literals of the same clause) they cannot be assigned 1 at the same time. The next Lemma relates integer assignments with assignments to the Boolean variables of (\(\star \)). Given a literal L, i.e., \(X_v\) or \(\lnot X_v\), we let \(\mathtt {lsum}(L)\) be the sum of all \(x_{i,j}\) where \(L_i^j\equiv L\) (we use 0 and 1 for false and true).
Lemma 6
(A) If \(\sigma \) is a satisfying assignment for \(\phi \), then there is a non-conflicting assignment for \(\mathcal F\) such that (1) \(x_{i,1} + x_{i,2} + x_{i,3}=1\) for all \(1 \le i \le m\); (2) \(\sigma (X_v)=1 \Rightarrow \mathtt {lsum}(\lnot X_v)=0\); and (3) \(\sigma (X_v)=0 \Rightarrow \mathtt {lsum}(X_v)=0\). (B) If \(\phi \) is unsatisfiable, then for any non-conflicting assignment for \(\mathcal F\) there is at least one \(1 \le i \le m\) such that \(x_{i,1} + x_{i,2} + x_{i,3}=0\).
Proof
(A) If \(\sigma \) satisfies \(\phi \), we construct a satisfying assignment for \(\mathcal F\): first every \(x_{i,j}\) is assigned the value of \(L_i^j\), and then we turn some \(x_{i,j}\) from 1 to 0 so that at most one variable of each clause is set to 1. Since we only turn 1s to 0s, when \(\sigma (X_v)=1\) (resp. \(\sigma (X_v)=0\)) all constraint variables that correspond to \(\lnot X_v\) (resp. \(X_v\)) have value 0, and thus \(\mathtt {lsum}(\lnot X_v)=0\) (resp. \(\mathtt {lsum}(X_v)=0\)). (B) If \(\mathcal F\) has a non-conflicting assignment in which \(x_{i,1} + x_{i,2} + x_{i,3}=1\) for all \(1 \le i \le m\), then we can construct a satisfying assignment \(\sigma \) for \(\phi \) in which \(\sigma (X_v)\) is \(\max \left( \{ x_{i,j} | L^i_j\equiv X_v \} \cup \{ 1-x_{i,j} | L^i_j\equiv \lnot X_v \} \right) \), so \(\phi \) is satisfiable.\(\quad \square \)
Next we proceed with the reduction, but first we give an outline. We build an integer loop, call it \(\mathcal{T} \), with \(2n+2\) abstract transitions: 2n transitions named \(\varPsi _{{v}{,}{a}}\), for \(1 \le v \le n\) and \(a\in \{0,1\}\); plus two named \(\varPhi \) and \({\varOmega }\). These are defined so that existence of a BMS-LLRF \(\langle f_1,f_2 \rangle \) for \(\mathcal{T} \) implies: (1) \(\varPsi _{{v}{,}{0}}\) and \(\varPsi _{{v}{,}{1}}\), for each \(1 \le v \le n\), cannot be ranked by the same \(f_i\), and the order in which they are ranked will represent a value for the existentially-quantified variable \(X_v\); (2) \(\varPhi \) cannot be ranked by \(f_1\), and it is ranked by \(f_2\) iff \(\forall X_{n+1} \dots X_{2n} \ \lnot \phi (X_1,\dots ,X_{2n})\) is true assuming the values induced for \(X_1,\ldots ,X_n\) in the previous step; and (3) \({\varOmega }\) is necessarily ranked by \(f_1\), its only role is to force \(\varPhi \) to be ranked by \(f_2\). All these points will imply that (\(\star \)) is true. For the other direction, if (\(\star \)) is true we show how to construct a BMS-LLRF \(\langle f_1,f_2 \rangle \) for \(\mathcal{T} \). Next we formally define the variables and abstract transitions of \(\mathcal{T} \), and prove the above claims.
Variables: Loop \(\mathcal{T} \) includes \(4m+2n+1\) variables: (1) every literal \(L_i^j\) contributes a variable \(x_{i,j}\); (2) for each \(1 \le i\le m\), we add a control variable \(x_{i,0}\) which is used to check if clause \(C_i\) is satisfied; (3) for each \(1 \le v \le n\), we add variables \(z_{v,0}\) and \(z_{v,1}\) which help in implementing the existential quantification; and (4) variable w, which helps in ranking the auxiliary transition \({\varOmega }\).
Transitions: First we define \(\varPhi \), the transition that intuitively checks for satisfiability of \(\phi (X_1,\dots ,X_{2n})\). It is a conjunction of the following constraints
$$\begin{aligned}&0 \le x_{i,j} \le 1\ \wedge \ x_{i,j}' = x_{i,j}&\text { for all } 1\le i \le m ,\ 1\le j\le 3 \end{aligned}$$
(12)
$$\begin{aligned}&x_{i,j}+x_{r,s}\le 1&\text { for all } ((i,j),(r,s)) \in C \end{aligned}$$
(13)
$$\begin{aligned}&x_{i,0} \ge 0\ \wedge \ x'_{i,0} = x_{i,0} + x_{i,1} + x_{i,2} + x_{i,3} - 1&\text { for all } 1\le i \le m \end{aligned}$$
(14)
$$\begin{aligned}&z_{v,0} \ge 0\ \wedge \ z'_{v,0} = z_{v,0} - \mathtt {lsum}(X_v)&\text { for all } 1\le v \le n \end{aligned}$$
(15)
$$\begin{aligned}&z_{v,1} \ge 0\ \wedge \ z'_{v,1} = z_{v,1} - \mathtt {lsum}(\lnot X_v)&\text { for all } 1\le v \le n \end{aligned}$$
(16)
$$\begin{aligned}&w' = w \end{aligned}$$
(17)
Secondly, we define 2n transitions which, intuitively, force a choice of a Boolean value for each of \(X_1,\dots ,X_n\). For \(1 \le v \le n\) and \(a\in \{0,1\}\), transition \(\varPsi _{{v}{,}{a}}\) is defined as a conjunction of the following constraints
$$\begin{aligned}&z_{v,a} \ge 0\ \wedge \ z'_{v,a} = z_{v,a} - 1 \end{aligned}$$
(18)
$$\begin{aligned}&z_{u,b} \ge 0&\text { for all } 1\le u \le n, b\in \{0,1\},\ u\ne v \end{aligned}$$
(19)
$$\begin{aligned}&z'_{u,b} = z_{u,b}&\text { for all } 1\le u \le n,\ b\in \{0,1\},\ (u,b)\ne (v,a) \end{aligned}$$
(20)
$$\begin{aligned}&x'_{i,0} \ge 0\ \wedge \ x'_{i,0} = x_{i,0}&\text { for all } 1\le i \le m \end{aligned}$$
(21)
$$\begin{aligned}&w \ge 0\ \wedge \ w' = w \end{aligned}$$
(22)
Finally we define the abstract transition \({\varOmega }\), which aids in forcing a desired form of the BMS-LLRF, and it is defined as a conjunction of the following constraints
$$\begin{aligned}&w \ge 0\ \wedge \ w' = w - 1 \end{aligned}$$
(23)
$$\begin{aligned}&z_{u,b} \ge 0\ \wedge \ z'_{u,b} = z_{u,b}&\text { for all } 1\le u \le n,\ b\in \{0,1\} \end{aligned}$$
(24)
Now, we argue that in order to have a two-component BMS-LLRF for \(\mathcal{T} \), the transitions have to be associated to the two components in a particular way.
Lemma 7
Suppose that \(\langle f_1,f_2 \rangle \) is a BMS-LLRF for \(\mathcal{T}\). Then, necessarily, the correspondence between the BMS-LLRF components and transitions is as follows: (i) \({\varOmega }\) is ranked by \(f_1\); (ii) \(\varPhi \) is ranked by \(f_2\); (iii) for \(1\le v \le n\), one of \(\varPsi _{{v}{,}{0}}\) and \(\varPsi _{{v}{,}{1}}\) is ranked by \(f_1\), and the other by \(f_2\).
Proof
An LRF for \({\varOmega }\) must involve w, since it is the only decreasing variable, and cannot involve any \(x_{i,j}\) since they change randomly. Similarly, an LRF for \(\varPhi \) cannot involve w as it has no lower bound, and it must involve at least one \(x_{i,j}\) since no function that involves only \(z_{v,a}\) variable(s) decreases for an initial state in which all \(x_{i,j}\) are assigned 0. Note that such LRF cannot be non-increasing for \({\varOmega }\) since \(x_{i,j}\) change randomly in \({\varOmega }\). Thus, we conclude that \({\varOmega }\) must be associated with \(f_1\) and \(\varPhi \) with \(f_2\). For the last point, for each \(1 \le v \le n\), transitions \(\varPsi _{{v}{,}{0}}\) and \(\varPsi _{{v}{,}{1}}\) must correspond to different positions because variables that descend in one (namely \(z_{v,a}\) of \(\varPsi _{{v}{,}{a}}\)) are not bounded in the other (since (19) requires \(u{\ne }v\)).\(\quad \square \)
Lemma 8
A BMS-LLRF of dimension two exists for \(\mathcal{T}\) iff (\(\star \)) is true.
Proof
Assume that a BMS-LLRF \(\langle f_1,f_2 \rangle \) exists for \(\mathcal{T}\), we show that (\(\star \)) is true. By Lemma 7 we know how the transitions are associated with the positions, up to the choice of placing \(\varPsi _{v,0}\) and \(\varPsi _{v,1}\), for each \(1 \le v \le n\). Suppose that, for each \(1 \le v \le n\), the one which is associated with \(f_2\) is \(\varPsi _{v,{a_v}}\), i.e., \(a_v\in \{0,1\}\), and let \(\bar{a}_v\) be the complement of \(a_v\). By construction we know that: (i) in \(\varPsi _{{v}{,}{a_v}}\) the variables \(z_{v,{\bar{a}_v}}\) and \(x_{i,j}\) with \(j\ge 1\) change randomly, which means that \(f_2\) cannot involve them; and (ii) in \(\varPhi \) the variable w is not lower bounded, which means that \(f_2\) cannot involve w. Since these transitions must be ranked by \(f_2\), we can assume that \(f_2\) has the form \( f_2(\mathbf {x}, \mathbf {z}, w) = \sum _i c_{i}\cdot x_{i,0} \, + \, \sum _v c_{v} \cdot z_{v,{a_v}} \) where \(c_{i}\) and \(c_{v}\) are non-negative rational coefficients. We claim that (\(\star \)) is necessarily true; for that purpose we select the value \(a_v\) for each \(X_v\), and next we show that this makes it is impossible to satisfy \(\phi (X_1,\dots ,X_{2n})\). Assume, to the contrary, that there is a satisfying assignment \(\sigma \) for \(\phi \), such that \(\sigma (X_v)=a_v\) for all \(1\le v \le n\). By Lemma 6 we know that we can construct an assignment to the variables \(x_{i,j}\) such that (i) \(x_{i,1} + x_{i,2} + x_{i,3} = 1\), for each \(1 \le i \le m\), which means that \(x_{i,0}'=x_{i,0}\) at (14); and (ii) for each \(1 \le v \le m\), if \(a_v=0\) (resp. \(a_v=1\)), then \(\mathtt {lsum}(X_v)=0\) (resp. \(\mathtt {lsum}(\lnot X_v)=0\)), which means that \(z_{v,{a_v}}'=z_{v,{a_v}}\) at (15) (resp. (16)). Hence \(f_2\) as described above does not rank \(\varPhi \) since none of its variables change, contradicting our assumption. We conclude that (\(\star \)) is true.
Now assume that (\(\star \)) is true, we construct a BMS-LLRF of dimension two. The assumption means that there are values \(a_1,\dots ,a_n\) for the existentially-quantified variables to satisfy the sentence. Let \(f_1(\mathbf {x}, \mathbf {z}, w) = w + \varSigma _{v=1}^n z_{v,{\bar{a}_v}}\) and \(f_2(\mathbf {x}, \mathbf {z}, w) = \varSigma _{i=1}^m x_{i,0}+\sum _v z_{v,{a_v}}\). We claim that \(\langle f_1,f_2 \rangle \) is a BMS-LLRF such that: (i) \(f_1\) is an LRF for \({\varOmega }\) and \(\varPsi _{{v}{,}{\bar{a}_v}}\), and non-increasing for \(\varPsi _{{v}{,}{a_v}}\) and \(\varPhi \); and (ii) \(f_2\) is an LRF for \(\varPsi _{{v}{,}{a_v}}\) and \(\varPhi \). All this is easy to verify, except possibly that \(f_2\) is an LRF for \(\varPhi \), for which we argue in more detail. By assumption, \(\phi (a_1,\dots ,a_n, X_{n+1},\dots , X_{2n})\) is unsatisfiable. Consider a state in which \(\varPhi \) is enabled; by (12, 13), this state may be interpreted as a selection of non-conflicting literals. If one of the selected literals does not agree with the assignment chosen for \(X_1,\dots ,X_n\), then by (15, 16) the corresponding variable \(z_{v,{a_v}}\) is decreasing. Otherwise, there must be an unsatisfied clause, and the corresponding variable \(x_{i,0}\) is decreasing. All other variables involved in \(f_2\) are non-increasing, all are lower bounded, so \(f_2\) is an LRF for \(\varPhi \).\(\quad \square \)
\(\varSigma ^P_2\)-hardness of BMS-LexLinRF
\((d,\mathbb Z)\) for \(d=2\) follows from Lemma 8. For \(d>2\), we add to \(\mathcal{T}\) additional \(d-2\) paths as those of Example 3; and to each original path in \(\mathcal{T}\) we add \(x'{=}x\) and \(y'{=}y\) (x, y are used in Example 3). Then, the new loop has a BMS-LLRF of dimension d iff (\(\star \)) is true. This concludes the proof of Theorem 4.