15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Proof: by contradiction: let p /∈ pmin<br />

P.1 We know that f = fpmin and pmin = n j=1 pj for some n ∈ N and prime implicants pj.<br />

P.2 so for all c ∈ Bn with f(c) = T there is a j ≤ n with fpj (c) = T.<br />

P.3 so p cannot be essential<br />

c○: Michael Kohlhase 164<br />

Let us now apply the optimized algorithm to a slightly bigger example.<br />

A complex Example for QMC (Function and DNF)<br />

x1 x2 x3 x4 f monomials<br />

F F F F T x1 0 x2 0 x3 0 x4 0<br />

F F F T T x1 0 x2 0 x3 0 x4 1<br />

F F T F T x1 0 x2 0 x3 1 x4 0<br />

F F T T F<br />

F T F F F<br />

F T F T T x1 0 x2 1 x3 0 x4 1<br />

F T T F F<br />

F T T T F<br />

T F F F F<br />

T F F T F<br />

T F T F T x1 1 x2 0 x3 1 x4 0<br />

T F T T T x1 1 x2 0 x3 1 x4 1<br />

T T F F F<br />

T T F T F<br />

T T T F T x1 1 x2 1 x3 1 x4 0<br />

T T T T T x1 1 x2 1 x3 1 x4 1<br />

c○: Michael Kohlhase 165<br />

A complex Example for QMC (QMC1)<br />

M0 = {x1 0 x2 0 x3 0 x4 0 , x1 0 x2 0 x3 0 x4 1 , x1 0 x2 0 x3 1 x4 0 ,<br />

x1 0 x2 1 x3 0 x4 1 , x1 1 x2 0 x3 1 x4 0 , x1 1 x2 0 x3 1 x4 1 ,<br />

x1 1 x2 1 x3 1 x4 0 , x1 1 x2 1 x3 1 x4 1 }<br />

M1 = {x1 0 x2 0 x3 0 , x1 0 x2 0 x4 0 , x1 0 x3 0 x4 1 , x1 1 x2 0 x3 1 ,<br />

x1 1 x2 1 x3 1 , x1 1 x3 1 x4 1 , x2 0 x3 1 x4 0 , x1 1 x3 1 x4 0 }<br />

P1 = ∅<br />

M2 = {x1 1 x3 1 }<br />

P2 = {x1 0 x2 0 x3 0 , x1 0 x2 0 x4 0 , x1 0 x3 0 x4 1 , x2 0 x3 1 x4 0 }<br />

M3 = ∅<br />

P3 = {x1 1 x3 1 }<br />

Pprime = {x1 x2 x3, x1 x2 x4, x1 x3 x4, x2 x3 x4, x1 x3}<br />

c○: Michael Kohlhase 166<br />

A better Mouse-trap for QMC1: optimizing the data structure<br />

Idea: Do the calculations directly on the DNF table<br />

86

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

Saved successfully!

Ooh no, something went wrong!