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.

c○: Michael Kohlhase 140<br />

The definition above shows us that in theory every Boolean Expression induces a Boolean function.<br />

The simplest way to compute this is to compute the truth table for the expression and then read<br />

off the function from the table.<br />

Boolean Functions and Truth Tables<br />

The truth table of a Boolean function is defined in the obvious way:<br />

x1 x2 x3 f x1∗(x2+x3)<br />

T T T T<br />

T T F F<br />

T F T T<br />

T F F T<br />

F T T F<br />

F T F F<br />

F F T F<br />

F F F F<br />

compute this by assigning values and evaluating<br />

Question: can we also go the other way? (from function to expression?)<br />

Idea: read expression of a special form from truth tables (Boolean Polynomials)<br />

c○: Michael Kohlhase 141<br />

Computing a Boolean expression from a given Boolean function is more interesting — there are<br />

many possible candidates to choose from; after all any two equivalent expressions induce the same<br />

function. To simplify the problem, we will restrict the space of Boolean expressions that realize a<br />

given Boolean function by looking only for expressions of a given form.<br />

Boolean Polynomials<br />

special form Boolean Expressions<br />

a literal is a variable or the negation of a variable<br />

a monomial or product term is a literal or the product of literals<br />

a clause or sum term is a literal or the sum of literals<br />

a Boolean polynomial or sum of products is a product term or the sum of product terms<br />

a clause set or product of sums is a sum term or the product of sum terms<br />

For literals xi, write x1 i , for xi write x0 i . ( not exponentials, but intended truth values)<br />

Notation 251 Write xixj instead of xi ∗ xj. (like in math)<br />

c○: Michael Kohlhase 142<br />

Armed with this normal form, we can now define an way of realizing 8 Boolean functions. EdNote:8<br />

Normal Forms of Boolean Functions<br />

Definition 252 Let f : Bn → B be a Boolean function and c ∈ Bn , then Mc := n j=1 xcj j<br />

and Sc := n j=1 x1−cj j<br />

8 EdNote: define that formally above<br />

76

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

Saved successfully!

Ooh no, something went wrong!