Docsity

Boolean Algebra: Deriving Expressions from Truth Tables and Algebraic Notation, Study notes of Discrete Mathematics

Toggle sidebar
bg1
Notes and Exercises on Boolean Algebra
Dr. Holmes
June 12, 2006
1 Boolean Expressions from Truth Tables
From the truth table for any operation on truth values we can read out an
expression for that operation using ∧,∨,¬.
For example,
x y z
T T T F
T T F T
T F T F
T F F F
F T T T
F T F T
F F T F
F F F T
can be expressed as
(x∧y∧ ¬z)∨(¬x∧y∧z)∨(¬x∧y∧ ¬z)∨(¬x∧ ¬y∧ ¬z)
This expression is a disjunction (or-sentence) of conjunctions (and-sentences)
each of which is a conjunction of letters and negations of letters representing
a row of the truth table.
If there are no rows in the truth table which are true, the expression
x∧ ¬xwill represent it.
It should be clear that this will work for truth tables for expressions with
any number of letters.
1
pf3
pf4

Partial preview of the text

Download Boolean Algebra: Deriving Expressions from Truth Tables and Algebraic Notation and more Study notes Discrete Mathematics in PDF only on Docsity!

Notes and Exercises on Boolean Algebra

Dr. Holmes

June 12, 2006

1 Boolean Expressions from Truth Tables

From the truth table for any operation on truth values we can read out an expression for that operation using ∧, ∨, ¬. For example,

x y z T T T F T T F T T F T F T F F F F T T T F T F T F F T F F F F T can be expressed as

(x ∧ y ∧ ¬z) ∨ (¬x ∧ y ∧ z) ∨ (¬x ∧ y ∧ ¬z) ∨ (¬x ∧ ¬y ∧ ¬z)

This expression is a disjunction (or-sentence) of conjunctions (and-sentences) each of which is a conjunction of letters and negations of letters representing a row of the truth table. If there are no rows in the truth table which are true, the expression x ∧ ¬x will represent it. It should be clear that this will work for truth tables for expressions with any number of letters.

Exercise: Write out an expression in ∨, ∧, ¬ for the operation on three propositions represented by this truth table:

x y z T T T T T T F F T F T T T F F T F T T F F T F T F F T T F F F F Exercise: Construct a truth table for the operation represented by (x → y) ∧ (y → z) then derive an equivalent expression in ∨, ∧, ¬ from the truth table.

2 Algebraic Notation

An expression in ∨, ∧, ¬ can be written in an algebraic style. Write x ∧ y as xy, x ∨ y as x + y, and ¬x as x. Negations of complicated expressions like ¬(x + y) will not be written using overlines. Write T as 1 and F as 0 in algebraic notation. A selection of the algebra rules we saw in section 6 can be used to reduce any expression to a form like the ones we derived from truth tables. An expression is said to be in disjunctive normal form just in case it is a disjunction of conjunctions of single letters and negations of single letters. The expressions derived from truth tables have the additional character- istic that every conjunction contains each letter or its negation just once. The following rules will help us to reduce expressions to disjunctive nor- mal form:

Distributive laws: x(y + z) = xy + xz and (x + y)z = xz + yz. Use these to eliminate conjunctions involving disjunctions.

deMorgan’s laws: ¬(xy) = (x) + y; ¬(x + y) = xy

Proof: x + y = (xy + xy) + (xy + xy) = xy + xy) + xy (eliminate repeated xy) = x + xy Exercise: Justify each step in this proof (using algebraic rules from the book or from this document).