Chapter 14

Ordered Binary Decision Diagrams

[9/100%]
Show
LaTeX
Problem 226

Prove Lemma 92 on p. 277 by backward induction on ii.

Lemma 92: After executing the step for ii in the algorithm СокрУБДР (OBDD reduction), in the resulting diagram, for every j=i−1,…,nj = i-1, \ldots , n and for every subfunction fσ1,…,σj(xj+1,…,xn)=f(σ1,…,σj,xj+1,…,xn)f_{\sigma_{1}, \ldots , \sigma_{j}}\left(x_{j+1}, \ldots , x_{n}\right) = f\left(\sigma_{1}, \ldots , \sigma_{j}, x_{j+1}, \ldots , x_{n}\right), where σk∈{0,1}\sigma_{k} \in \left\{ 0,1\right\} for k=1,2,…,jk = 1, 2, \ldots , j, there is exactly one vertex — a source of a subdiagram realizing that subfunction.

?
Problem 227

Using Lemma 92 on p. 277, prove statement 2) of Theorem 91 on p. 276. □\square

Theorem 91: if the algorithm СокрУБДР applied to an OBDD DD returns an OBDD D′D', then (statement 2) D′D' is, for the given variable ordering, the unique reduced (up to isomorphism) OBDD of minimal size.

Lemma 92: After executing the step for ii in the algorithm СокрУБДР, in the resulting diagram, for every j=i−1,…,nj = i-1, \ldots , n and for every subfunction fσ1,…,σj(xj+1,…,xn)=f(σ1,…,σj,xj+1,…,xn)f_{\sigma_{1}, \ldots , \sigma_{j}}\left(x_{j+1}, \ldots , x_{n}\right) = f\left(\sigma_{1}, \ldots , \sigma_{j}, x_{j+1}, \ldots , x_{n}\right), where σk∈{0,1}\sigma_{k} \in \left\{ 0,1\right\} for k=1,2,…,jk = 1, 2, \ldots , j, there is exactly one vertex — a source of a subdiagram realizing that subfunction.

?
Problem 228

Prove that applying the algorithm from Section 14.3 yields a reduced OBDD.

The algorithm referred to (Section 14.3) builds an OBDD for f(x1,…,xn)f(x_{1}, \ldots , x_{n}) top-down, by recursion on nn. If n=0n = 0, ff is a constant and the OBDD consists of the two sinks 00 and 11. Otherwise, form the two residual functions f0(x2,…,xn)=f(0,x2,…,xn)f_{0}(x_{2}, \ldots , x_{n}) = f(0, x_{2}, \ldots , x_{n}) and f1(x2,…,xn)=f(1,x2,…,xn)f_{1}(x_{2}, \ldots , x_{n}) = f(1, x_{2}, \ldots , x_{n}), recursively build (a shared) OBDD realizing the distinct functions among {f0,f1}\left\{ f_{0}, f_{1}\right\} (duplicates among them are identified, so at most one vertex is built per distinct residual function), and then: if f0=f1f_{0} = f_{1}, let the vertex for ff be the same vertex that already realizes f0=f1f_{0} = f_{1}; otherwise add one new vertex labeled x1x_{1} whose 0-child and 1-child are the (already-built, possibly shared) vertices realizing f0f_{0} and f1f_{1} respectively. □\square

?
Problem 229

Prove that every Boolean function of nn variables can be realized as an OBDD with no more than 2n/2+2−12^{n / 2+2}-1 internal vertices. Hint. Show how to transform the complete BDD.

?
Problem 230

Circuits made of functional elements are naturally realized as linear programs. Conversely, for decision trees and OBDDs, the natural program representation is branching programs, which include only conditional statements of the form If vv then Π1\Pi_{1} Else Π2\Pi_{2} and assignments y←0y \leftarrow 0 and y←1y \leftarrow 1 (see Chapter 18). These correspond to internal vertices of the diagrams and to sinks, respectively. Here Π1\Pi_{1} and Π2\Pi_{2} are again branching programs, and the variable yy contains the result.

Show how to construct, from an OBDD, a branching program computing the same function.

Write branching programs computing the functions represented by the OBDDs D1\mathfrak {D}_{1} in Fig. 69 on p. 272 and D3\mathfrak {D}_{3} in Fig. 74 on the previous page.

?
Problem 231

Construct minimal OBDDs for the two-argument functions: x∧y,x∨yx \wedge y, x \vee y, x⊕y,x→y,x↑yx \oplus y, x \rightarrow y, x \uparrow y.

?
Problem 232

Construct minimal OBDDs for the function

f(x1,x2,x3,x4,x5,x6)=(x1∧x2)⊕(x3∧x4)⊕(x5∧x6) f\left(x_{1}, x_{2}, x_{3}, x_{4}, x_{5}, x_{6}\right)=\left(x_{1} \wedge x_{2}\right) \oplus \left(x_{3} \wedge x_{4}\right) \oplus \left(x_{5} \wedge x_{6}\right)

with respect to two orderings of the variables:

?
(a)

x1<x2<x3<x4<x5<x6x_{1}<x_{2}<x_{3}<x_{4}<x_{5}<x_{6} and

(b)

x1<x3<x5<x2<x4<x6x_{1}<x_{3}<x_{5}<x_{2}<x_{4}<x_{6}.

Problem 233

The value of the threshold function TknT_{k}^{n} of nn variables with threshold kk equals 1 if and only if the input tuple contains at least kk ones:

Tkn(x1,x2,…,xn)=1⟺[x1+x2+…+xn⩾k]. T_{k}^{n}\left(x_{1}, x_{2}, \ldots , x_{n}\right)=1 \Longleftrightarrow \left[x_{1}+x_{2}+\ldots +x_{n} \geqslant k\right].
?
(a)

Construct an OBDD for the threshold function TknT_{k}^{n} in general form.

(b)

Construct a minimal OBDD for the threshold function T46T_{4}^{6}.

(c)

Does the complexity of the minimal OBDD for threshold functions depend on the order of the variables?

(d)

Estimate the complexity of the minimal OBDD for the threshold function TknT_{k}^{n}.

Problem 234

Construct minimal OBDDs realizing the functions from Problems 221 and 224 on p. 266.

?