You are on page 1of 7

101

Exercises
6.1 (Commutativity between Cofactor and Boolean Operations) Given
two Boolean functions f and g and a Boolean variable v, prove or disprove
the following equalities:
(a) (f)
v
= (f
v
)
(b) (f op) g)
v
= (f
v
) op) (g
v
) for op) = , .
6.2 (Boolean Dierence) Let f(x, y, z) = h(g(x, y, z), y, z). Prove or disprove
the following equalities:
(a)

2
f(x, y, z)
xy
=

2
f(x, y, z)
yx
.
(b)
f(x, y, z)
x
=
h(u, y, z)
u
g(x, y, z)
x
.
(c)
f(x, y, z)
y
=
h(u, y, z)
u
g(x, y, z)
y


2
h(u, y, z)
uy
g(x, y, z)
y
y
y
.
6.3 (Quantied Boolean Formula) For Boolean functions f and g, show that
(a)
(x.f(x, y)) = x.f(x, y)
(b)
(x.f(x, y)) = x.f(x, y)
(c)
x.(f(x, y) g(x, y)) ,= (x.f(x, y)) (x.g(x, y))
(d)
x, z.(f(x, y) g(x, z)) = x.(f(x, y) z.g(x, z))
6.4 (Boolean Function Bi-decomposition) For a given Boolean function
f(X
A
, X
B
) with non-empty variable sets X
A
and X
B
, with X
A
X
B
= ,
what is the condition on f(X
A
, X
B
) such that the rewriting f(X
A
, X
B
) =
f
A
(X
A
)f
B
(X
B
) is possible for some f
A
(X
A
) and f
B
(X
B
) to exist? (Express
the condition with a quantied Boolean formula.)
6.5 (Characteristic Functions) Let f : B
3
B
2
be the vector (f
1
, f
2
) of
Boolean functions with f
1
= x
1
x
1
x
2
and f
2
= x
3
(x
1
x
1
x
2
); let

S
= x
1
x
2
be a characteristic function representing a set S B
3
.
102
(a) Write down the characteristic function Img
f
(S) (in terms of a quantied
Boolean formula) of the image of S under the mapping of f, that is, the
set q B
2
[ q = f(p), p S.
(b) Perform quantier elimination to obtain a quantier-free formula equiv-
alent to Img
f
(S) in (a).
(c) Justify that the formula in (b) indeed represents the image of S un-
der f by enumerating all the truth assignments of (x
1
, x
2
, x
3
) and the
corresponding valuations of
S
and f.
6.6 (BDD APPLY) Let F and G be the ROBDDs of Boolean functions f = abc
and g = bd

+ b

d, respectively, under the variable ordering index(a) <


index(b) < index(c) < index(d).
(a) Draw F and G.
(b) Derive the ROBDD of F G using the BddApply procedure.
(c) Derive the ROBDD of F + G using the BddApply procedure.
(d) Derive the ROBDD of F G using the BddApply procedure.
6.7 (ROBDD Variable Ordering) Let F be the ROBDD of an arbitrary
Boolean function f(a, b, c, d, e) under variable ordering
index(a) < index(b) < index(c) < index(d) < index(e).
Show that the new ROBDD F

under variable ordering


index(a) < index(b) < index(d) < index(c) < index(e),
must have the same BDD structure as F except for the nodes controlled by
variables c and d.
6.8 (ROBDD Variable Ordering) Consider the Boolean function
f = a
1
b
1
+ a
2
b
2
+ + a
n
b
n
.
(a) Show that the ROBDD under variable ordering
index(a
1
) < index(b
1
) < < index(a
n
) < index(b
n
)
has 2n + 2 nodes.
(b) Show that the ROBDD under variable ordering
index(a
1
) < < index(a
n
) < index(b
1
) < < index(b
n
)
has 2
n+1
nodes.
6.9 (ROBDDs of Symmetric Functions) Totally symmetric functions are
characterized by the fact that the value of each such function is determined
by the number of variables which are 1 under a truth assignment; it does not
matter which particular variables are. For example, functions f
1
= x
1

x
n
, f
2
= x
1
x
n
, and f
3
= x
1
x
n
are totally symmetric. A totally
symmetric function on n variables can be described by a set S 0, 1, . . . , n
such that for a minterm a B
n
, f(a) = 1 i the number of 1s in a is
a member of S. Prove that the ROBDD of any n-ary totally symmetric
function has at most O(n
2
) nodes under any variable ordering.
103
6.10 (Circuit-to-CNF Conversion) Convert each of the following circuits to
a CNF formula representing the consistency condition. In each case, list the
truth assignments to the input/output variables that make the CNF true.
(a) An inverter with input a and output b.
(b) An or2 gate with inputs a, b and output c.
(c) An xor gate with inputs a, b and output c.
6.11 (Global Function Derivation) Consider the AIG of Figure 16. Derive
the global function of x
7
(in terms of primary inputs x
1
, x
2
, x
3
) using the
following two methods.
(a) Existentially quantify out the intermediate variables x
4
, x
5
, x
6
from its
corresponding consistency CNF formula and then perform a positive
cofactor with respect to the variable x
7
.
(b) Derive the global function of x
7
by recursively substituting intermediate
variables with their local functions.
Verify that the above two methods yield the same result. Explain why these
two approaches are equivalent.
6.12 (SOP and Tautology) Show that the tautology checking of any SOP for-
mula with at most 2 literals in each product term can be done with time
complexity polynomial in the formula size.
(Remark: The dual problem is the 2SAT problem in computer science, which
is checkable in polynomial time.)
6.13 (Prime and Irredundant Cubes) Let
C = a

, abd

, a

, a

bc

, ab

, a

c, abc, a

bd
be a cover of a completely specied function f.
(a) For each cube in C, determine whether it is prime and/or irredundant.
(b) Can we delete all the redundant cubes at once without aecting the func-
tion of f? Which redundant cubes can we delete from C if we successively
delete removable cubes from left to right? How about from right to left?
(Assume the cubes listed in C is ordered.)
6.14 (Quine-McCluskey Two-Level Logic Minimization) Given function
f = w

+ wx

+ wxz + w

z
with dont care set
d = w

xyz

+ wx

yz + w

xyz,
minimize f using the Quine-McCluskey procedure.
6.15 (Column Covering) Column covering is an essential computation step in
Quine-McCluskey procedure. It can be solved in dierent ways.
(a) Show that the column covering problem can be formulated as a CNF
satisability problem. Give an algorithm that performs such conversion.
(The so-derived covering need not be minimum.)
(b) Show that the minimum column covering problem can be formulated in
term of ROBDD. Give a polynomial-time algorithm solving the problem.
104
6.16 (Number of Prime Implicants) Show that
C
n

n2
3

2
n
n2
3

n
n2
3
|
is a lower bound on the number of prime implicants for any n-ary Boolean
function.
(x
4
+x
5
)x
6
x
1
x
5
+x
5
x
2
+x
3
x
5
x
6
x
7
x
2
x
3
x
4
x
1
Fig. 47. Boolean network
6.17 (Node Value and Elimination) Recall that the value of a node represents
the saved literal count due to the existence of the node rather than collapsing
it into its fanouts. Given the Boolean network of Figure 47, what are the
values of nodes 5 and 6? What is the new value of node 6 after collapsing
node 5 into its fanouts? (Here we treat Boolean formulas as polynomials in an
algebraic sense, and assume that Boolean simplications, such as xx = 0,
x x = 1, x x = x, and x x = x, are not involved.)
6.18 (Algebraic Division) Prove that algebraic division produces a unique quo-
tient and remainder. (Note that by denition the remainder is made as few
cubes as possible.)
6.19 (Kernels and Cokernels) Let expression
F = aefh + aegh + aei + befh + begh + bei + cdefh + cdegh + cdei.
Apply KERNEL1(0, F) to compute the kernels and corresponding cokernels of
F. Identify which kernels are of level 0.
105
6.20 (Factoring) Continuing Exercise 6.19, apply GFACTOR to factor the function
F. Use dierent level-0 kernels as divisors. What is the best factoring for F?
For an arbitrary expression, can GFACTOR always produce a minimum-literal
factoring with some proper level-0 kernels as divisors?
6.21 (Common Divisor Extraction) Let expressions
F = ac + ad + bc + bd + adf + aef + ag + bcdf + bcef + bcg, and
G = ag + bcg + bcf + bcg + bdf + bdg + bef + beg.
(a) Iteratively reexpress F and G in terms of a common expression that
yields the most reduction in literal count until no more common expres-
sions exist. (A common expression can be a cube-free expression or a
cube.)
(b) Extract an optimal common divisor of F and G by nding rectangles in
the cokernel-cube matrix.
6.22 (Kernel Intersection) For two expressions F and G, suppose any kernel
k
f
of F and any k
g
of G have at most one term in common. Show that F
and G have no common algebraic divisor with more than one term.
y
1
y
2
y
3
y
1
y
2
y
3
x
2
x
3
y
1
z
1
x
2
x
3
x
4
x
1
x
1
x
2
x
3
x
4
y
3
y
4
y
1
y
4
y
2
y
3
y
4
z
2
Fig. 48. Boolean network
6.23 (SDC and ODC) Consider the Boolean network of Figure 48.
(a) Write down a Boolean formula representing the SDC of the entire circuit.
That is, it represents the inconsistency condition of the circuit.
106
(b) Write down a Boolean formula for the satisability dont cares SDC
4
of
node 4 (with output y
4
). Since SDC
4
is induced by the transitive fanins
of node 4, the formula should depend on variables x
1
, . . . , x
4
, y
1
, . . . , y
3
.
How can you make SDC
4
refer only to y
1
, y
2
, y
3
such that we can minimize
node 4 directly?
(c) Compute the observability dont cares ODC
4
of node 4.
6.24 (Dont Cares in Local Variables) Continuing Exercise 6.23, suppose the
XDC for z
1
is x
1
x
2
x
3
x
4
and that for z
2
is x
1
x
2
x
3
x
4
.
(a) Compute the dont cares D
4
of node 4 in terms of its local input variables
y
1
, y
2
, and y
3
. (Note that in general the computation of ODC may be
aected by XDC especially when there exist dierent XDCs for dierent
primary outputs.)
(b) Based on the computed dont cares, what is the best implementable
function for node 4 (in terms of the literal count and cube count)?
6.25 (Complete Flexibility) Continuing Exercise 6.24, let Y = y
1
, y
2
, y
3
and
Z = z
1
, z
2
.
(a) Suppose the XDC for z
1
is x
1
x
2
x
3
x
4
and that for z
2
is x
1
x
2
x
3
x
4
.
Write down the specication relation S(X, Z).
(b) What is the inuence relation I
4
(X, y
4
, Z) of node 4?
(c) What is the environment relation E
4
(X, Y ) of node 4?
(d) What is the complete exibility CF
4
(Y, y
4
) of node 4?
(e) Is the previously computed dont care set D
4
of node 4 subsumed by
CF
4
?
a
g
3
b
c
d
e
2
2
2
2
2
f
h
i
j
Fig. 49. Circuit for timing analysis
6.26 (Static Timing Analysis) Given the circuit of Figure 49 with gate delays
shown, assume the arrival times for the primary inputs are 0 except for input
b with arrival time 1ns, and the required times for the primary output are
8ns. Compute the arrival time, required time, and slack of every net. Identify
the critical path(s).
6.27 (Time Slack and Critical Path) Prove or disprove the following state-
ment: The most critical path (with the smallest slack) must be a thorough
path all the way from some primary input to some primary output.
107
6.28 (Arrival/Required Time Computation) Given a black box that com-
putes arrival times for a Boolean network with specied gate delays and
input arrival times, devise a way of reusing this black box to compute re-
quired times for a Boolean network.
Fig. 50. Subject graph
6.29 (Tree Mapping) Decompose the subject DAG of Figure 50 into trees and
perform dynamic programming to nd optimum tree mappings with respect
to the pattern graphs of Figure 26. What is the optimum solution that you
can get among dierent decomposition approaches?
6.30 (DAG Mapping as SAT Solving) Formulate the DAG mapping feasibil-
ity problem as a satisability problem. For the subject graph of Figure 50
and the pattern graphs of Figure 26, what is the CNF formula representing
feasible DAG mappings?

You might also like