Tutorial 06 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Tutorial Six COMP 107 - Tutorial Six October 2021

Exercise 1 – Boolean Algebra


1. Prove, using truth tables, that the following rules of Boolean Algebra are valid
a) A ∨ (B ∧ C ) ≡ (A ∨ B ) ∧ (A ∨ C )
b) ¬(A ∧ B ) ≡ ¬A ∨ ¬B
2. Simplify the following boolean expressions
a) ¬p ∨ (((¬q ∨ r) ∧ q) ∨ (p ∧ r))
( )
( )
b) ¬r ∨ (¬q ∨ r) ∧ q ∧(p ∧ r)

c) (p ∧ ¬q) ∨ (¬p ∧ (¬q ∨ ¬r) )


d) ( (¬p ∧ q) ∧ (p ∨ ¬r) ) ∧ (¬p ∨ ¬q)
3. Use the rules of the boolean algebra to establish which of the following are tautologies and which are
contradictions
a) (p ∧ q) ∨ (¬p ∨ (p ∧ ¬q))
b) (p ∧ ¬q) ∧ (¬p ∨ q)

Exercise 2 – Boolean Algebra and Other Operators


1. Rewrite the following expression using only and, or, and not.

(p → q) ↔ (p → r)
2. Write the converse, contrapositive and negation of the statement:
If Chiefs wins the league then they win R1 million rands.
3. If p and q are statements such that p → q is false, what is the truth value of ¬p → q ?
4. State the equivalent of the identity rule, complement rule, and idempotent rule for the operator ⊗.
5. Use the Rules of Boolean algebra to show that p ∨ q → r is logically equivalent to (p → r) ∧ (q → r)

Commutative rules
A ∨B ≡ B ∨A
A ∧B ≡ B ∧A
Associative rules
(A ∨ B ) ∨ C ≡ A ∨ (B ∨ C )
(A ∧ B ) ∧ C ≡ A ∧ (B ∧ C )

Distributive rules
A ∧ (B ∨ C ) ≡ (A ∧ B ) ∨ (A ∧ C )
A ∨ (B ∧ C ) ≡ (A ∨ B ) ∧ (A ∨ C )
De Morgan’s laws
¬(A ∨ B ) ≡ ¬A ∧ ¬B
¬(A ∧ B ) ≡ ¬A ∨ ¬B

Identities
1∨A ≡ 1 0∨A ≡ A
1∧A ≡ A 0∧A ≡ 0

Complement rules
A ∨ ¬A ≡ 1 A ∧ ¬A ≡ 0
Idempotent rules
A ∨A ≡ A A ∧A ≡ A
Involution rule
¬(¬A ) ≡ A

COMP 107 1 2021

You might also like