Boolean Algebra
Boolean Algebra
ILLUSTRATIVE EXAMPLES
Example 1. If V = {1, 2, 3}, A = {1, 2}, then A′ = {3}. Show that the set
T = {V, A, A′, φ} along with operations ∪ and ∩ forms Boolean algebra.
Solution. We have to show that this system satisfies basic axioms of Boolean Algebra.
The composition tables for ∪ and ∩ are as follows :
∪ V A A′ φ ∩ V A A′ φ
V V V V V V V A A′ φ
A V A V A A A A φ φ
A′ V V A′ A′ A′ A′ φ A′ φ
φ V A A′ φ φ φ φ φ φ
Example 2. Let Dn denote the set of divisors of n, where n is a natural number, define
operations +, • and ′ on Dn as
a + b = lcm {a, b} i.e. least common multiple of a and b,
n
a • b = gcd {a, b} i.e. greatest common divisor of a and b, and a′ = .
a
Prove that D4 is not a boolean algebra, while D6 is a boolean algebra.
Solution. (i) For D4 = {1, 2, 4}, the tables for given operations are
+ 1 2 4 • 1 2 4 ′ 1 2 4
1 1 2 4 1 1 1 1 4 2 1
2 2 2 4 2 1 2 2
4 4 4 4 4 1 2 4
From these we observe that operations + and • are closed, commutative and associative.
For distribution of + over •, we see that
1 + (2 • 4) = 1 + 2 = 2 ;
(1 + 2) • (1 + 4) = 2 • 4 = 2 etc.
Similarly, we can verify for other elements, and also the distribution of • over +.
Now zero element (additive identity) is such that
a + zero element = a ∀ a ∈ D4.
From table of ‘+’, we see that a + 1 = a ∀a, so that 1 acts as zero element (additive
identity), while from table of ‘•’ we see that a • 4 = a ∀a, so that 4 acts as unit element
(multiplicative identity).
Thus, we should have a + a′ = unit element, a • a′ = zero element ∀ a.
From table of ′, we see that 2′ = 2.
However from table of +, we see that 2 + 2 = 2 ≠ 4 (unit element).
Also from table of •, we see that 2 • 2 = 2 ≠ 1 (zero element).
Hence, D4 is not a boolean algebra.
(ii) For D6 = {1, 2, 3, 6}, we construct tables for operations as
+ 1 2 3 6 • 1 2 3 6 ′ 1 2 3 6
1 1 2 3 6 1 1 1 1 1 6 3 2 1
2 2 2 6 6 2 1 2 1 2
3 3 6 3 6 3 1 1 3 3
6 6 6 6 6 6 1 2 3 6
As above, we can verify closure, commutative, associative and distributive properties.
From + table, we see that a + 1 = a ∀ a, so that 1 acts as zero element (additive identity),
while from • table, we see that a • 6 = a ∀ a, so that 6 acts as unit element (multiplicative
identity).
Now we verify a + a′ = unit element, a • a′ = zero element ∀ a :
1 + 6 = 6, 1 • 6 = 1
2 + 3 = 6, 2 • 3 = 1
3 + 2 = 6, 3 • 2 = 1
6 + 1 = 6, 6 • 1 = 1
Thus, all properties of boolean algebra are satisfied.
Note. In general, if n is a product of distinct prime numbers, then Dn = {set of positive
divisors of n} is a boolean algebra, with least common multiple acting as +, greatest
n
common divisor acting as •, acting as complement of a, integer 1 acting as zero
a
element (additive identity) and integer n acting as unit element (multiplicative
identity). However, if in the prime factorisation of n, any number is repeated, then
Dn is not a boolean algebra.
A-132 UNDERSTANDING ISC MATHEMATICS - XII
EXERCISE 3.1
1. If B = {φ, ξ, S, S′} where S is any non-empty subset of ξ, then show that B along with
the operations ∪ and ∩ forms a boolean algebra.
2. Let B = {{1}, {2}, {1, 2}, φ}. Show that (B, ∩, ∪, ′, φ, {1, 2}) is a boolean algebra.
3. Let B = {φ, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}. Show that (B, ∪, ∩, ′, φ, {1, 2, 3})
is a boolean algebra.
4. Let Dn = set of divisors of n, where n is a natural number.
Define operations +, • and ′ as
a + b = lcm {a, b}, a • b = gcd {a, b}, a′ = n .
a
Prove that D8 is not a boolean algebra while D15 is a boolean algebra.
Remark. To prove that a′ = b or b′ = a i.e. to prove that a and b are inverse of each other,
we should prove a + b = 1 and a • b = 0.
To prove that a • (a + b) = a
a • (a + b) = (a + 0) • (a + b) (why?)
= a+0•b (by Distributive Law)
= a+0 (why?)
= a (why?)
Aliter, the property a • (a + b) = a follows by duality from a + a • b = a.
(vii) Uniqueness of complement (inverse) : (I.S.C. 2003)
Let us assume that a1′ and a2′ are two complements of a. Then by definition,
a + a1′ = 1, a • a1′ = 0, a + a2′ = 1, a • a2′ = 0.
a1′ = a1′ • 1 = a1′ • (a + a2′ )
= ( a1′ • a) + ( a1′ • a2′ ) = 0 + ( a1′ • a2′ )
= (a • a2′ ) + ( a1′ • a2′ ) = (a + a1′ ) • a2′
= 1 • a2′ = a2′ .
Now try to prove it by starting from a1′ = a1′ + 0.
ILLUSTRATIVE EXAMPLES
Example 1. Write the dual of each of the following statements :
(i) x + (y • x) = x
(ii) x • y′ + y = x + y
(iii) (x + y) • (x + 1) = x + x • y + y
(iv) (x′ + y) • (x + y′) = x′ • y′ + x • y
(v) [(x′ + y) • (y′ + z)] • (x′ + z)′ = 0.
Solution. Since the dual statement is derived by interchanging + and • and also
interchanging the identities 1 and 0 in the original statement, therefore, the dual statements
of the given statements are :
(i) x • (y + x) = x
(ii) (x + y′) • y = x • y
(iii) (x • y) + (x • 0) = x • (x + y) • y
(iv) (x′ • y) + (x • y′) = (x′ + y′) • (x + y)
(v) [(x′ • y) + (y′ • z)] + (x′ • z)′ = 1.
Example 2. Prove that a + (a′ • b) = a + b and a • (a′ + b) = a • b.
Solution. a + (a′ • b) = (a + a′) • (a + b) (by Distributive Law)
= 1 • (a + b) (by Complement)
= a+b (by Identity)
Similarly, a • (a′ + b) = (a • a′) + (a • b) (by Distributive Law)
= 0 + (a • b) (by Complement)
=a•b (by Identity)
Example 3. Prove that a + (a′ • c + b) = a + b + c.
Solution. a + (a′ • c + b) = (a + a′ • c) + b (by Associative Law)
= ((a + a′) • (a + c)) + b (by Distributive Law)
= (1 • (a + c)) + b (by Complement)
= (a + c) + b (by Identity)
= a + (c + b) (by Associativity)
= a + (b + c) (by Commutative Law)
= a + b + c.
BOOLEAN ALGEBRA A-135
ILLUSTRATIVE EXAMPLES
Example 1. Find the value of the boolean expression (x1 • x2)′ + x3 if
(i) x1 = 1, x2 = 0, x3 = 1
(ii) x1 = 1, x2 = 1, x3 = 0 .
Solution. (i) (x1 • x2)′ + x3 = (1 • 0)′ + 1 = 0′ + 1
= 1 + 1 = 1.
(ii) (x1 • x2)′ + x3 = (1 • 1)′ + 0 = 1′ + 0
= 0 + 0 = 0.
Example 2. Construct input/output table for the boolean function f on boolean algebra {0, 1}
defined by :
(i) f (x1, x2) = x1 • x′2
(ii) f (x1, x2, x3) = (x1 • x2)′ + x3 .
Solution. (i) As the given boolean function has two variables and is defined on the
boolean algebra {0, 1}, its input/output table is :
Input Output
x1 x2 x2′ x1 • x2′
1 1 0 0
1 0 1 1
0 1 0 0
0 0 1 0
(ii) As the given boolean function has three variables and is defined on the boolean
algebra {0, 1}, its input/output table is :
Input Output
x1 x2 x3 x1 • x2 (x1 • x2)′ (x1 • x2)′ + x3
1 1 1 1 0 1
1 1 0 1 0 0
1 0 1 0 1 1
1 0 0 0 1 1
0 1 1 0 1 1
0 1 0 0 1 1
0 0 1 0 1 1
0 0 0 0 1 1
x y y′ f (x, y) = x + y′
0 0 1 1
0 1 0 0
1 0 1 1
1 1 0 1
Example 4. (i) If f (x, y, z) = xy + yz′ + x′yz in boolean algebra B = {0, 1}, evaluate f (0, 0, 0)
and f (0, 1, 1). How many rows would the truth table have?
(ii) Write a boolean expression in terms of x, y or their complements which has value 1 when
x = 0, y = 1 and assumes value 0 otherwise.
Solution. (i) f (x, y, z) = xy + yz′ + x′yz
∴ f (0, 0, 0) = 0 • 0 + 0 • 0′ + 0′ • 0 • 0 = 0 + 0 • 1 + 1 • 0 • 0
= 0+0+0=0
f (0, 1, 1) = 0 • 1 + 1 • 1′ + 0′ • 1 • 1 = 0 + 1 • 0 + 1 • 1 • 1 = 0 + 0 + 1 = 1.
As there are 3 variables, each of which can have two values, the truth table will have
2 × 2 × 2 = 8 rows.
(ii) Here we use the fact that x • y has value 1 only when x = 1, y = 1; otherwise x • y has
value 0. Hence, the expression which has value 1 when x = 0, y = 1 is x′y.
Note. This idea can be better understood by constructing the following truth table :
1 1 0 0 1 0 0 0
1 0 0 1 0 1 0 0
0 1 1 0 0 0 1 0
0 0 1 1 0 0 0 1
It is very clear from this table that expression x′y has value 1 when x = 0, y = 1 and
assumes value 0 otherwise.
EXERCISE 3.2
1. Write the dual statement of each of the following :
(i) (1 + x) • ( 0 + y) = y (ii) (x • y)′ = x′ + y′
(iii) a + 1 = 1 (iv) x + x′y = x + y
(v) x + [x • (y + 1)] = x (vi) x + [(y′ + x) • y]′ = 1
(vii) (x + y)′ = x′ • y′ (viii) (x′ + y′)′ = x • y
(ix) (1 • x) + 0 = x (x) (1 • x)′ = 0 + x′
(xi) If x + y = 0 then x = 0 = y (xii) x • y′ = 0 if and only if x • y=x
(xiii) x = 0 if and only if y = x • y′ + x′ • y for all y.
2. Using elementary properties of boolean algebra, prove that :
(i) x + x • (y + 1) = x (ii) (a + b) a′ b′ = 0
(iii) (x + y) + (x′ • y′) = 1.
3. Prove the following statements :
(i) If x • y = 1, then x = 1 = y (ii) x + y′ = 1 if and only if x + y = x.