← 2020 Paper 2
UPSC 2020 Maths Optional Paper 2 Q5c — Step-by-Step Solution
10 marks · Section B
Boolean algebra · Numerical Analysis · asked 15× in 13 yrs · Read the full method →
Question
Let g(w,x,y,z)=(w+x+y)(x+yˉ+z)(w+yˉ) be a Boolean function. Obtain the conjunctive normal form (CNF) for g(w,x,y,z). Also express g(w,x,y,z) as a product of maxterms.
Technique
Expand each incomplete sum to full maxterms via A=(A+t)(A+tˉ); collect distinct maxterms; identify zero-rows for indices.
Solution
The function is already a product of sums (POS), but the sum terms are not full — each must contain all four variables w,x,y,z to be a maxterm. The CNF (canonical POS) is obtained by inflating each factor to full maxterms.
Step 1 — Inflate each factor using A=A+0=A+(ttˉ) and A+BC=(A+B)(A+C)
Factor 1: (w+x+y) is missing z:
w+x+y=(w+x+y+z)(w+x+y+zˉ).
Factor 2: (x+yˉ+z) is missing w:
x+yˉ+z=(w+x+yˉ+z)(wˉ+x+yˉ+z).
Factor 3: (w+yˉ) is missing x and z. First add x:
w+yˉ=(w+x+yˉ)(w+xˉ+yˉ),
then add z to each:
=(w+x+yˉ+z)(w+x+yˉ+zˉ)(w+xˉ+yˉ+z)(w+xˉ+yˉ+zˉ).
Step 2 — Collect the distinct maxterms
Listing every distinct full sum term produced (using w+x+yˉ+z only once even though it appears in factors 2 and 3):
(w+x+y+z),(w+x+y+zˉ),(w+x+yˉ+z),(w+x+yˉ+zˉ),(wˉ+x+yˉ+z),(w+xˉ+yˉ+z),(w+xˉ+yˉ+zˉ).
Step 3 — CNF (canonical product of sums)
g=(w+x+y+z)(w+x+y+zˉ)(w+x+yˉ+z)(w+x+yˉ+zˉ)×(w+xˉ+yˉ+z)(w+xˉ+yˉ+zˉ)(wˉ+x+yˉ+z).
Step 4 — As a product of maxterms
A maxterm Mi corresponds to the row i (binary wxyz) where it evaluates to 0; a variable appears uncomplemented if its bit is 0 and complemented if its bit is 1. The seven maxterms have indices:
| Maxterm | wxyz | index i |
|---|
| w+x+y+z | 0000 | 0 |
| w+x+y+zˉ | 0001 | 1 |
| w+x+yˉ+z | 0010 | 2 |
| w+x+yˉ+zˉ | 0011 | 3 |
| w+xˉ+yˉ+z | 0110 | 6 |
| w+xˉ+yˉ+zˉ | 0111 | 7 |
| wˉ+x+yˉ+z | 1010 | 10 |
Answer
g(w,x,y,z)=∏M(0,1,2,3,6,7,10)