← 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ˉ)g(w,x,y,z)=(w+x+y)(x+\bar y+z)(w+\bar y) be a Boolean function. Obtain the conjunctive normal form (CNF) for g(w,x,y,z)g(w,x,y,z). Also express g(w,x,y,z)g(w,x,y,z) as a product of maxterms.

Technique

Expand each incomplete sum to full maxterms via A=(A+t)(A+tˉ)A=(A+t)(A+\bar 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,zw,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ˉ)A=A+0=A+(t\,\bar t) and A+BC=(A+B)(A+C)A+BC=(A+B)(A+C)

Factor 1: (w+x+y)(w+x+y) is missing zz:

w+x+y=(w+x+y+z)(w+x+y+zˉ).w+x+y=(w+x+y+z)(w+x+y+\bar z).

Factor 2: (x+yˉ+z)(x+\bar y+z) is missing ww:

x+yˉ+z=(w+x+yˉ+z)(wˉ+x+yˉ+z).x+\bar y+z=(w+x+\bar y+z)(\bar w+x+\bar y+z).

Factor 3: (w+yˉ)(w+\bar y) is missing xx and zz. First add xx:

w+yˉ=(w+x+yˉ)(w+xˉ+yˉ),w+\bar y=(w+x+\bar y)(w+\bar x+\bar y),

then add zz to each:

=(w+x+yˉ+z)(w+x+yˉ+zˉ)(w+xˉ+yˉ+z)(w+xˉ+yˉ+zˉ).=(w+x+\bar y+z)(w+x+\bar y+\bar z)(w+\bar x+\bar y+z)(w+\bar x+\bar y+\bar z).

Step 2 — Collect the distinct maxterms

Listing every distinct full sum term produced (using w+x+yˉ+zw+x+\bar 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ˉ).\begin{aligned} &(w+x+y+z),\;(w+x+y+\bar z),\\ &(w+x+\bar y+z),\;(w+x+\bar y+\bar z),\\ &(\bar w+x+\bar y+z),\\ &(w+\bar x+\bar y+z),\;(w+\bar x+\bar y+\bar z). \end{aligned}

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).  \boxed{\;\begin{aligned} g=&(w+x+y+z)(w+x+y+\bar z)(w+x+\bar y+z)(w+x+\bar y+\bar z)\\ &\times(w+\bar x+\bar y+z)(w+\bar x+\bar y+\bar z)(\bar w+x+\bar y+z). \end{aligned}\;}

Step 4 — As a product of maxterms

A maxterm MiM_i corresponds to the row ii (binary wxyzwxyz) where it evaluates to 00; a variable appears uncomplemented if its bit is 00 and complemented if its bit is 11. The seven maxterms have indices:

Maxtermwxyzwxyzindex ii
w+x+y+zw+x+y+z0000000000
w+x+y+zˉw+x+y+\bar z0001000111
w+x+yˉ+zw+x+\bar y+z0010001022
w+x+yˉ+zˉw+x+\bar y+\bar z0011001133
w+xˉ+yˉ+zw+\bar x+\bar y+z0110011066
w+xˉ+yˉ+zˉw+\bar x+\bar y+\bar z0111011177
wˉ+x+yˉ+z\bar w+x+\bar y+z101010101010

Answer

  g(w,x,y,z)=M(0,1,2,3,6,7,10)  \boxed{\;g(w,x,y,z)=\prod M(0,1,2,3,6,7,10)\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.