22.08.2013 Views

Satisfiability Checking - Fourier–Motzkin Variable Elimination

Satisfiability Checking - Fourier–Motzkin Variable Elimination

Satisfiability Checking - Fourier–Motzkin Variable Elimination

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Satisfiability</strong> <strong>Checking</strong><br />

<strong>Fourier–Motzkin</strong> <strong>Variable</strong> <strong>Elimination</strong><br />

Prof. Dr. Erika Ábrahám<br />

Theory of Hybrid Systems<br />

Informatik 2<br />

WS 09/10


Fourier-Motzkin <strong>Variable</strong> <strong>Elimination</strong><br />

Outline<br />

1 History<br />

2 Linear Arithmetic over the Reals<br />

3 Partitioning and Bounds<br />

4 Complexity<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 2 / 10


Fourier-Motzkin <strong>Variable</strong> <strong>Elimination</strong><br />

Goal: decide satisfiability of conjunction of linear constraints over reals<br />

<br />

1≤i≤m 1≤j≤n<br />

aijxj ≤ bi<br />

Earliest method for solving linear inequalities<br />

Discovered in 1826 by Fourier, re-discovered by Motzkin in 1936<br />

Basic idea of variable elimination:<br />

Pick one variable and eliminate it<br />

Continue until all variables but one are eliminated<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 3 / 10


Linear Arithmetic over the Reals<br />

m constraints<br />

Input: A system of conjoined linear inequalities Ax ≤ b<br />

⎛<br />

a11 a12 · · · · · · a1n<br />

⎜<br />

.<br />

a21 a22<br />

..<br />

⎜<br />

.<br />

⎜<br />

.<br />

⎝ .<br />

.. .<br />

am1 a22 · · · · · · amn<br />

n variables<br />

⎞⎛<br />

⎟⎜<br />

⎟⎜<br />

⎟⎜<br />

⎟⎜<br />

⎠⎝<br />

x1<br />

.<br />

.<br />

xn<br />

⎞<br />

⎛<br />

⎟<br />

⎠ ≤<br />

⎜<br />

⎝<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 4 / 10<br />

b1<br />

.<br />

.<br />

bn<br />

⎞<br />

⎟<br />


Removing unbounded variables<br />

Iteratively remove variables that are not bounded in both ways<br />

(and all the constraints that use them)<br />

The new problem has a solution iff the old problem has one!<br />

8x ≥ 7y<br />

x ≥ 3<br />

y ≥ z<br />

z ≥ 10<br />

20 ≥ z<br />

−→<br />

y ≥ z<br />

z ≥ 10<br />

20 ≥ z<br />

−→<br />

z ≥ 10<br />

20 ≥ z<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 5 / 10


Partitioning the Constraints<br />

1. When eliminating xn, partition the constraints according to the<br />

coefficient ain:<br />

ain > 0: upper bound βi<br />

ain < 0: lower bound βi<br />

n<br />

aij · xj ≤ bi<br />

j=1<br />

n−1<br />

⇒ ain · xn ≤ bi −<br />

⇒ xn ≤ bi<br />

ain<br />

−<br />

aij · xj<br />

j=1<br />

n−1<br />

aij<br />

ain<br />

j=1<br />

· xj =: βi<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 6 / 10


Example for Upper and Lower Bounds<br />

Category?<br />

(1) x1 − x2 ≤ 0 Upper bound<br />

(2) x1 − x3 ≤ 0 Upper bound<br />

(3) −x1 + x2 + 2x3 ≤ 0 Lower bound<br />

(4) −x3 ≤ −1<br />

Assume we eliminate x1.<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 7 / 10


Adding the constraints<br />

2. For each pair of a lower bound aln < 0 and<br />

upper bound aun > 0, we have<br />

βl ≤ xn ≤ βu<br />

3. For each such pair, add the constraint<br />

βl ≤ βu<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 8 / 10


Fourier-Motzkin: Example<br />

Category?<br />

(1) x1 − x2 ≤ 0 Upper bound<br />

(2) x1 − x3 ≤ 0 Upper bound<br />

(3) −x1 + x2 + 2x3 ≤ 0 Lower bound<br />

(4) −x3 ≤ −1 Lower bound<br />

we eliminate x1<br />

(5) 2x3 ≤ 0 (from 1,3) Upper bound<br />

(6) x2 + x3 ≤ 0 (from 2,3) Upper bound<br />

we eliminate x3<br />

(7) 0 ≤ −1 (from 4,5)<br />

→ Contradiction (the system is UNSAT)<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 9 / 10


Complexity<br />

Worst-case complexity:<br />

Heavy!<br />

The bottleneck: case-splitting<br />

m → m 2 → (m 2 ) 2 → . . . → m 2n<br />

Prof. Dr. Erika Ábrahám - <strong>Satisfiability</strong> <strong>Checking</strong> 10 / 10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!