600 likes | 757 Vues
Communicating Ideas. Small RAM. e.g., chimpanzee. Large ( but not infinite ) ROM. e.g., stack of instruction cards. Computing With Limited Memory. Each instruction:. Examine a specific input bit. Based on current state , lookup next state. Computing With Limited Memory. m states.
E N D
Small RAM e.g., chimpanzee Large (but not infinite) ROM e.g., stack of instruction cards Computing With Limited Memory
Each instruction: Examine a specific input bit . Based on current state, lookup next state. Computing With Limited Memory mstates (log2 m bits memory) nBoolean inputs Assume n much greater than m
x2=0, current = S2 current next 0 0 1 1 Computing With Limited Memory
? Compute Computing With Limited Memory
Representation of Boolean Functions Example: 0 0 0 0 Disjunctive Normal Form (canonical): 0 0 1 0 0 1 0 0 0 1 1 1 Sum of Products (not unique): 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1
0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 Representation of Boolean Functions Example: XOR of AND terms: unique?
0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 1 Ordered Binary Decision Diagrams Example: Directed Acyclic Graph; variables are inspected in order.
0 0 0 1 0 1 0 1 Reducing OBDDs Terminal Rule
0 1 Reducing OBDDs Terminal Rule
0 1 Reducing OBDDs Elimination Rule
0 1 Reducing OBDDs Elimination Rule
0 1 Reducing OBDDs Merging Rule
Reducing OBDDs Merging Rule 0 1
0 1 Reducing OBDDs Elimination Rule
0 1 Reducing OBDDs Elimination Rule
Binary Decision Diagrams 0 1 0 1 0 1
Binary Decision Diagrams 0 0 1 0 1 1 0 1 0 0 * * 1 0 1 1
Binary Decision Diagrams 0 1 0 1 0 1
Binary Decision Diagrams 0 1 0 1 0 1
Each instruction: Examine a specific input bit . Based on current state, lookup next state. Computing With Limited Memory mstates (log2 m bits memory) nBoolean inputs Assume n much greater than m
S 0 1 Fixed-Width BDD
Fixed-Width BDD S Irrelevant! 0 1
Fixed-Width BDD 1 2 3 4 S 0 1
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 4 3 2 1 Fixed-Width BDD View each row as a pair ofpermutations.
Fixed-Width BDD 1 2 3 4 1 2 3 4 1 2 3 4 Restrict ourselves to cyclicpermutations. 1 2 3 4 4 3 2 1
Fixed-Width BDD 1 2 3 4 1 2 3 4 1 2 3 4 Restrict ourselves to cyclicpermutations. 1 2 3 4 4 3 1 2
Fixed-Width BDD 1 2 3 4 1 2 3 4 1 2 3 4 Restrict ourselves to cyclicpermutations. 1 2 3 4 4 3 1 2 1 4 2 3
Fixed-Width BDD 1 2 3 4 1 2 3 4 1 2 3 4 Restrict ourselves to cyclicpermutations. 1 2 3 4 4 3 1 2 (1 4 2 3)
1 2 3 4 S then (1 2 3 4) then then (1 3 2 4) then then (1 4 2 3) then is identity permutation 0 1 Fixed-Width BDD
1 2 3 4 S 0 1 Fixed-Width BDD
1 2 3 4 5 S if (1 3 2 5 4) if 0 1 Fixed-Width BDD Say BDD “yields” (1 3 2 5 4).
Identity: a = a = a Inverse: a = (1 2 3 4), a-1=(4 3 2 1), a a-1 = Cyclic Permutations Composition: a b = (1 2 3 4 5)(1 4 2 3 5) = (1 3 2 5 4)
Cyclic Permutations Transformation: For cyclic permutations a and b, there exists a permutation such that: (Why?)
Cyclic Permutations Commutation: aba-1b-1 Consider a = (1 2 3 4 5), b = (1 3 5 4 2) Let S be the set of permutations obtained by taking commutations of pairs, starting with a and b.
Cyclic Permutations Example: a = (1 2 3 4 5), b = (1 3 5 4 2) aba-1b-1 = (1 2 3 4 5)(1 3 5 4 2)(5 4 3 2 1)(2 4 5 3 1) = (1 3 2 5 4) = c
Cyclic Permutations Example: a = (1 2 3 4 5), c = (1 3 2 5 4) aca-1c-1 = (1 2 3 4 5)(1 3 2 5 4)(5 4 3 2 1)(4 5 2 3 1) = (1 5 3 2 4) = d
Cyclic Permutations Commutation: aba-1b-1 Consider a = (1 2 3 4 5), b = (1 3 5 4 2) Let S be the set of permutations obtained by taking commutations of all pairs, starting with a and b. Sis a closed set under commutation (always inlcudes ). Such a set does not exist for cyclic permutations of length < 5. (How many elements does S contain?)
IfFisawidth-5 BDD that yields , then there exists a width-5 BDD G of the same length that yields . Computing with Width-5 BDDs Lemma 1 (negation): (Why?)
G is identical to F except in last instruction. If the last instruction of F is , then the last instruction of Gis . Computing with Width-5 BDDs Lemma 1 (negation):
For and in S, a width-5 BDD F that yields , can be transformed into a width-5 BDD Gof the same length that yields . Computing with Width-5 BDDs Lemma 2 (transformation): (How?)
Find such that . Changeeach instructionin F from to . Computing with Width-5 BDDs Lemma 2 (transformation):
Just write it down … F(x) = x {x: (1 3 4 2 5), *} F(x, y) = x y {x: (1 3 4 2 5), *} {y: (1 4 5 2 3), *} {x: (1 5 2 4 3), *} {y: (1 3 2 5 4), *} {x y : (1 4 3 5 2), *}
Just write it down … F(x) = x {x: (1 3 4 2 5), *} F(x, y) = (x y)’ {x: (1 3 4 2 5), *} {y: (1 4 5 2 3), *} {x: (1 5 2 4 3), *} {y: (1 3 2 5 4), *} {*: (1 2 5 3 4), (1 2 5 3 4)} {(x y)’: (1 4 3 5 2), *}
Just write it down … F(x) = x {x: (1 3 4 2 5), *} F(x, y) = (x y)’ {x: (1 3 4 2 5), *} {y: (1 4 5 2 3), *} {x: (1 5 2 4 3), *} {y: (1 4 2 3 5), (1 2 5 3 4)}
Just write it down … A = (1 4 3 5 2) B = (1 4 5 2 3) C = (1 3 4 2 5) D = (1 2 4 5 3) E = (1 4 2 3 5) A = C B C' B' B = D C D' C' C = E D E' D' D = A E A' E' E = B A B' A' A' = B C B' C' B' = C D C' D' C' = D E D' E' D' = E A E' A' E' = A B A' B' A’ = (1 2 5 3 4) B’ = (1 3 2 5 4) C’ = (1 5 2 4 3) D’ = (1 3 5 4 2) E’ = (1 5 3 2 4)
F(x, y, z) = (x z)’ (x’y’)’ {(x z)’ (x’y’)’: A, *}
F(x, y, z) = (x z)’ (x’y’)’ {(x z)’: C, *} {(x’y’)’: B, *} {(x z)’: C’, *} {(x’y’)’: B’, *}
F(x, y, z) = (x z)’ (x’y’)’ {x: D, *} {z: E, *} {x: D’, *} {z: E’C, C} {(x’y’)’: B, *} {(x z)’: C’, *} {(x’y’)’: B’, *}