3. Classroom tasks and solutions / Аудиторні задачі та розв’язання
Source of tasks. The problems below are taken exactly from the
practical-class assignment for this topic (Boolean functions and normal forms);
only the wording has been translated to English. Task 1 is the truth-table
construction worked through in the source material; Tasks 2–3 are the
DNF/CNF reductions. Each task is followed by a complete worked solution. The
theory and the laws of Boolean algebra used here are in 2method.md;
recall the precedence ¬>∧>∨>→, the overline shorthand
A=¬A, and juxtaposition AB=A∧B.
Task 1 — Build the truth table of a Boolean function
Construct the truth table of the function
f(x,y,z,t)=x∨y(z∨xy)→t.
Solution. The function has four variables, so the table has 24=16
interpretations. By precedence the formula is
(x∨y(z∨xy))→t: everything
left of → forms the antecedent A, and f=A→t=A∨t.
Evaluate A inside-out on each interpretation; for example,
(0,0,0,0):(0,0,0,1):(0,1,0,0):(1,0,1,0): 0∨1(0∨1⋅1)→0=0∨1→0=1→0=0, 0∨1(0∨1⋅1)→1=1→1=1, 0∨0(⋯)→0=0→0=1, 1∨⋯→0=1→0=0.
Filling in all sixteen rows (in binary order, where the row number is the
interpretation number):
| # |
x |
y |
z |
t |
f |
| 0 |
0 |
0 |
0 |
0 |
0 |
| 1 |
0 |
0 |
0 |
1 |
1 |
| 2 |
0 |
0 |
1 |
0 |
0 |
| 3 |
0 |
0 |
1 |
1 |
1 |
| 4 |
0 |
1 |
0 |
0 |
1 |
| 5 |
0 |
1 |
0 |
1 |
1 |
| 6 |
0 |
1 |
1 |
0 |
1 |
| 7 |
0 |
1 |
1 |
1 |
1 |
| 8 |
1 |
0 |
0 |
0 |
0 |
| 9 |
1 |
0 |
0 |
1 |
1 |
| 10 |
1 |
0 |
1 |
0 |
0 |
| 11 |
1 |
0 |
1 |
1 |
1 |
| 12 |
1 |
1 |
0 |
0 |
0 |
| 13 |
1 |
1 |
0 |
1 |
1 |
| 14 |
1 |
1 |
1 |
0 |
0 |
| 15 |
1 |
1 |
1 |
1 |
1 |
So f=0 on exactly the six interpretations 0,2,8,10,12,14 and f=1 on the
other ten.
Cross-check (simplify the formula). The antecedent simplifies:
A=x∨y(z∨xy)=x∨yz∨xy=x∨y∨yz=x∨y.(distribute; yy=y)(x∨xy=x∨y)(absorption: y∨yz=y)
Hence f=(x∨y)→t=(x∨y)∨t=xy∨t (De Morgan). The compact function f=xy∨t is 1 exactly when x=0,y=1 or t=1 — which agrees with the table row for
row.
Task 2 — Reduce to DNF
Reduce the formula to disjunctive normal form:
φ=(x→y)∨(y→z).
Solution. Push the outer negation inward, then eliminate the implications and
distribute.
φ=(x→y)∨(y→z)=(x→y)∧(y→z)=(x→y)∧(y→z)=(x∨y)∧(y∨z)=(xy)∨(xz)∨(yy)∨(yz)=(xy)∨(xz)∨(yz).(De Morgan)(double negation)(A→B=A∨B)(distribute ∧ over ∨)(yy=0, drop it)
The DNF is
φ=xy ∨ xz ∨ yz
— an OR of three AND-terms. (Note φ is exactly (x→y)∧(y→z), the
transitivity of implication.)
Task 3 — Reduce to CNF
Reduce the formula to conjunctive normal form:
φ=(x→y)∧(y→z)→x.
Solution. Simplify the two conjuncts by eliminating each implication and
applying De Morgan.
(x→y)(y→z)→x=x∨y=x∧y,=(yz)→x=(yz)∨x=(yz)∧x.(y→z=yz)(P→x=P∨x, then De Morgan)
Therefore
φ=(x∧y)∧(y∧z∧x)=x∧x∧y∧y∧z.
This is already a conjunction of one-literal clauses — a CNF — but it contains
the complementary pair x and x (and y, y), and
x∧x=0. Hence
φ=xxyyz≡0
— the formula is a contradiction (unsatisfiable): it is false under every
interpretation, so its truth table is all $0$s.
Practical/Practical3/3classroom.md · 5.3 KB · updated 2026-07-31 21:14