Professional Documents
Culture Documents
06 Engl
06 Engl
Normal Forms.
Lecture 6
N.V. Belous
Факультет компьютерных наук
Кафедра ПО ЭВМ, ХНУРЭ
ХНУРЭ,кафедра ПО ЭВМ,
Тел. 7021-446, e-mail: belous@kture.Kharkov.ua
Complete normal form
2
Theorem about disjunctive decomposition of
function
f(x1,…,xk,xk+1,…,xn)=
x1 1 x2 2 ... xk kf(1,2,…,k,xk+1,…,xn)
(1,2,…,k)
3
Theorem about disjunctive decomposition of
function
Note 1 2
x 1
x 2
... x k
k means frequent
(1,2,…,k)
disjunction which is taken in all possible sets of
value (1, 2,…, k) by any k (1<k<n).
4
Theorem about disjunctive decomposition of
function
Example.
Consider disjunctive decomposition of function
by variables x, z.
f ( x, y , z , t ) ( x y z ) t
5
Theorem about disjunctive decomposition of
function
Solution.
Use the theorem about decomposition:
f ( x, y , z , t ) x z
1 2
f ( 1 , y, 2 , t )
x z f (0, y,0, t ) x z f (0, y,1, t )
x z f (1, y,0, t ) x z f (1, y,1, t )
6
Theorem about disjunctive decomposition of
function
Continuation of example.
Calculate:
f (0, y ,0, t ) (0 y 0) t 0,
f (0, y ,1, t ) (0 y 1) t t ,
f (1, y,0, t ) (1 y 0) t 0,
f (1, y,1, t ) (1 y 1) t y t.
7
Theorem about disjunctive decomposition of
function
Continuation of example.
Substitute f(0,y,0,t), f(0,y,1,t), f(1,y,0,t),
f(1,y,1,t) in formula of disjunctive decomposition:
f ( x, y , z , t ) x z 0 x z t x z 0 x z ( y t )
x z t x z y t
8
Theorem about disjunctive decomposition of
function
9
Theorem about disjunctive decomposition of
function
f(x1,x2,…,xn) = 1 2
x x ... x
1 2
n
n
(1,2,…,n)
f(1,2,…,n) = 1
10
Theorem about disjunctive decomposition of
function
Example.
Obtain disjunctive decomposition of the function
f ( x, y, z ) xy z by all variables..
11
Theorem about disjunctive decomposition of
function
Solution.
Define the meaning of function in each
interpretation:
f (0,0,0) 0 0 0 0 1 1 f (1,0,0) 1 0 0 0 1 1
f (0,0,1) 0 0 1 0 0 0 f (1,0,1) 1 0 1 0 0 0
f (0,1,0) 0 1 0 0 1 1 f (1,1,0) 1 1 0 1 1 1
f (0,1,1) 0 1 1 0 0 0 f (1,1,1) 1 1 1 1 0 1
12
Theorem about disjunctive decomposition of
function
Continuation of example.
f ( x, y , z ) x y z x y z x y z x y z x y z
0 0 0 0 1 0 1 0 0 1 1 0 1 1 1
x y z x y z x y z xy z xyz
13
The basic terms.
14
Examples of elementary conjunctions
two variables x y, x z ,
15
Disjunctive normal form.
16
Minterm.
1 2 n
Elementary conjunction x x2 ... xn
1
17
The properties of minterm.
19
Product-of-sums.
20
Consequences from the defining sum-of-products
and product-of-sums of Boolean functions.
Number of Interpretation
interpret. Minterm Maxterm
x y z
22
Transition algorithm from truth table of Boolean
function to sum-of-products.
23
Transition algorithm from truth table of Boolean
function to sum-of-products.
Example.
Obtain sum-of-products for functions f13(x,y) and f8(x,y).
Function f13(x,y)
x y f13(x,y)
0 0 1
0 1 1
1 0 0
1 1 1
f13 ( x, y ) x y x y x y x y x y xy
0 0 0 1 1 1
24
Transition algorithm from truth table of Boolean
function to sum-of-products.
Continuation of example.
Function f8(x,y)
x y f8(x,y)
0 0 1
0 1 0
1 0 0
1 1 0
f 8 ( x, y ) x y x y
0 0
25
Transition algorithm from truth table of Boolean
function to product-of-sums.
26
Transition algorithm from truth table of Boolean
function to product-of-sums.
Example.
Obtain product-of-sums for functions f13(x,y) and
f8(x,y). Function f (x,y)
13
x y f13(x,y)
0 0 1
0 1 1
1 0 0
1 1 1
_ _
f13(x,y) = (x1 y0) = (x0 y1) = ( x y)
27
Transition algorithm from truth table of Boolean
function to product-of-sums.
Continuation of example.
Function f8(x,y)
x y f8(x,y)
0 0 1
0 1 0
1 0 0
1 1 0
_ _ _ _ _ _
f8(x,y) = (x0 y1) (x1 y0) (x1 y1) = ( x y )( x y )( x y )
28
Building algorithm the truth table of
function given by sum-of-products.
30
Transition algorithm from arbitrary formula of logic
algebra to sum-of-products.
31
Transition algorithm from arbitrary formula of logic
algebra to sum-of-products.
32
Transition algorithm from arbitrary formula of logic
algebra to product-of-sums.
1.Except constants using the laws of acting with
constants.
2.Put down the negation directly on the variables
using the De Morgan’s laws.
3.Using the distributive law reduce the function to
the form of conjunction of elementary disjunctions.
Apply the idempotent and the excluded middle laws to
the receiving elementary disjunctions, simplify them
and reduce similar. The result of the fulfilling given
acts is getting CNF of Boolean function.
33
Transition algorithm from arbitrary formula of logic
algebra to product-of-sums.
4. Build the maxterms adding in each elementary
disjunction variables that are absent by the
contradiction law.
5. With the help of distributive law reduce function to
the form of the conjunction the maxterms and simplify
formula using the idempotentce law.
6. The receiving formula is product-of-sums of
function.
34
Examples.
35