Complexity of solving systems of linear inequalities with two variables per inequality with additional constraints

86 Views Asked by At

Consider a system $X$ of linear inequalities containing at most two variables. In the general case, finding a solution over $\mathbb{R}\cap[0,1]$ can be done deterministically in polynomial time due to the result by Aspvall and Shiloach.

Now, assume that $X$ contains (among others) inequalities $x_1<x'_1$, …, $x_n<x'_n$. Can $X$ still be solved in polynomial time if we add the following constraint on the solutions?

$$\neg\exists i,j\leq n:x_i<x_j<x'_i\text{ or }x_i<x'_j<x'_i$$

I.e., we require that blocks of $x_i,x'_i$ are not mixed together.


It seems that the problem is in $\mathsf{NP}$: given a solution to $X$, it is easy to verify whether the constraint above is met. However, I don't understand whether we can do the same deterministically and in polynomial time.

1

There are 1 best solutions below

0
On BEST ANSWER

The problem seems to be NP-hard: here is a reduction to Vertex Cover.

We have a graph $G = (V,E)$ and an integer $k$, we want to know if there exists a set $S$ of $k$ vertices in $V$ such that for any edge $\{u,v\} \in E$, $u$ or $v$ is among these $k$ vertices.

In the following $\varepsilon$ designates a "sufficiently small" value. For instance, taking $\varepsilon = \frac{1}{2n^2+1}$ works.

There are two variables $x_v$ and $x'_v$ for each vertex $v$ in V. For each $v$ we pose the inequalities $x'_v-x_v = \frac{1}{2n}-\varepsilon$ and $0 \leq x_v$ and $x_v' \leq 1$. We have two additional variables $x_0, x_0'$ such that $x_0 = \frac{n-k}{2n}$ and $x'_0 = \frac{2n-k}{2n}$.

The constraint that the intervals $[x_i, x_i']$ must be disjoint means that a solution must have $k$ elements $x_v$ between $\frac{2n-k}{2n}$ and $1$, and the other $n-k$ ones between $0$ and $\frac{n-k}{2n}$ (we have taken $\varepsilon$ to be sufficiently small so that we only have space for $n-k$ small $x_v$ and $k$ large ones).

In addition, for each $\{u,v\} \in E$, we add the constraint $x_u + x_v > \frac{n-k}{n}$. This constraint is satisfied if and only if $x_u$ or $x_v$ is one of the elements between $\frac{2n-k}{2n}$ and $1$.

In sum, these inequalities have a solution if and only if there exist $k$ vertices such that for all $\{u,v\} \in E$, $u$ or $v$ is among these $k$ vertices, i.e. if $G$ satisfies Vertex Cover.

The problem is therefore NP-hard.