15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

n-ary Gates as Subgraphs<br />

Idea: Identify (and abbreviate) frequently occurring subgraphs<br />

Definition 402 AND(x1, . . . , xn) := 1 n<br />

i=1 xi and OR(x1, . . . , xn) := 1 n<br />

i=1 xi<br />

Note: These can be realized as balanced binary trees Gn<br />

Corollary 403 C(Gn) = n − 1 and dp(Gn) = ⌊log 2(n)⌋.<br />

Notation 404<br />

AND OR<br />

c○: Michael Kohlhase 233<br />

Using these building blocks, we can establish a worst-case result for the depth of a combinatory<br />

circuit computing a given Boolean function.<br />

Worst Case Depth Theorem for Combinational Circuits<br />

Theorem 405 The worst case depth dp(G) of a combinational circuit G which realizes an<br />

k × n-dimensional boolean function is bounded by dp(G) ≤ n + ⌈log 2(n)⌉ + 1.<br />

Proof: The main trick behind this bound is that AND and OR are associative and that the<br />

according gates can be arranged in a balanced binary tree.<br />

P.1 Function f corresponding to the output oj of the circuit G can be transformed in DNF<br />

P.2 each monomial consists of at most n literals<br />

P.3 the possible negation of inputs for some literals can be done in depth 1<br />

P.4 for each monomial the ANDs in the related circuit can be arranged in a balanced binary<br />

tree of depth ⌈log 2(n)⌉<br />

P.5 there are at most 2 n monomials which can be ORed together in a balanced binary tree<br />

of depth ⌈log 2(2 n )⌉ = n.<br />

c○: Michael Kohlhase 234<br />

Of course, the depth result is related to the first worst-case complexity result for Boolean expressions<br />

(Theorem 270); it uses the same idea: to use the disjunctive normal form of the Boolean<br />

function. However, instead of using a Boolean expression, we become more concrete here and use<br />

a combinational circuit.<br />

An example of a DNF circuit<br />

127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!