# Fourier–Motzkin elimination

Template:Inline Template:Expand language Fourier–Motzkin elimination, also known as the FME method, is a mathematical algorithm for eliminating variables from a system of linear inequalities. It can output real solutions.

The algorithm is named after Joseph Fourier and Theodore Motzkin.

## Elimination

The elimination of a set of variables, say V, from a system of relations (here linear inequalities) refers to the creation of another system of the same sort, but without the variables in V, such that both systems have the same solutions over the remaining variables.

If all variables are eliminated from a system of linear inequalities, then one obtains a system of constant inequalities. It is then trivial to decide whether the resulting system is true or false. It is true if and only if the original system has solutions. As a consequence, elimination of all variables can be used to detect whether a system of inequalities has solutions or not.

Consider a system ${\displaystyle S}$ of ${\displaystyle n}$ inequalities with ${\displaystyle r}$ variables ${\displaystyle x_{1}}$ to ${\displaystyle x_{r}}$, with ${\displaystyle x_{r}}$ the variable to be eliminated. The linear inequalities in the system can be grouped into three classes depending on the sign (positive, negative or null) of the coefficient for ${\displaystyle x_{r}}$.

The original system is thus equivalent to

${\displaystyle \max(A_{1}(x_{1},\dots ,x_{r-1}),\dots ,A_{n_{A}}(x_{1},\dots ,x_{r-1}))\leq x_{r}\leq \min(B_{1}(x_{1},\dots ,x_{r-1}),\dots ,B_{n_{B}}(x_{1},\dots ,x_{r-1}))\wedge \phi }$.

Elimination consists in producing a system equivalent to ${\displaystyle \exists x_{r}~S}$. Obviously, this formula is equivalent to

${\displaystyle \max(A_{1}(x_{1},\dots ,x_{r-1}),\dots ,A_{n_{A}}(x_{1},\dots ,x_{r-1}))\leq \min(B_{1}(x_{1},\dots ,x_{r-1}),\dots ,B_{n_{B}}(x_{1},\dots ,x_{r-1}))\wedge \phi }$.

The inequality

${\displaystyle \max(A_{1}(x_{1},\dots ,x_{r-1}),\dots ,A_{n_{A}}(x_{1},\dots ,x_{r-1}))\leq \min(B_{1}(x_{1},\dots ,x_{r-1}),\dots ,B_{n_{B}}(x_{1},\dots ,x_{r-1}))}$

We have therefore transformed the original system into another system where ${\displaystyle x_{r}}$ is eliminated. Note that the output system has ${\displaystyle (n-n_{A}-n_{B})+n_{A}n_{B}}$ inequalities. In particular, if ${\displaystyle n_{A}=n_{B}=n/2}$, then the number of output inequalities is ${\displaystyle n^{2}/4}$.

## Complexity

Running an elimination step over ${\displaystyle n}$ inequalities can result in at most ${\displaystyle n^{2}/4}$ inequalities in the output, thus running ${\displaystyle d}$ successive steps can result in at most ${\displaystyle 4(n/4)^{2^{d}}}$, a double exponential complexity. This is due to the algorithm producing many unnecessary constraints (constraints that are implied by other constraints). The number of necessary constraints grows as a single exponential.[1] Unnecessary constraints may be detected using linear programming.

• Real closed field: the cylindrical algebraic decomposition algorithm performs quantifier elimination over polynomial inequalities, not just linear.

## References

1. David Monniaux, Quantifier elimination by lazy model enumeration, Computer aided verification (CAV) 2010.
• {{#invoke:citation/CS1|citation

|CitationClass=book }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}

|CitationClass=journal }}