Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sequential System Synthesis -- Incompletely Specified Machines.

Similar presentations


Presentation on theme: "Sequential System Synthesis -- Incompletely Specified Machines."— Presentation transcript:

1 Sequential System Synthesis -- Incompletely Specified Machines

2 ENEE 6442 Outline > Incompletely Specified Machine (ISM) > State Minimization for ISM =Brute Force Method =Compatible, Maximal, Prime, Class Set =Algorithm for ISM State Minimization Find all pairs of compatible statesFind all pairs of compatible states Find the maximal compatiblesFind the maximal compatibles Find the prime compatiblesFind the prime compatibles Set up the covering problemSet up the covering problem Solve the binate covering problemSolve the binate covering problem > The Binate Covering Problem

3 ENEE 6443 FSM with Incomplete Specification An FSM is incompletely specified if  and/or are incompletely specified functions. (I.e., they are not defined on some combinations of inputs and present states.) Otherwise, it is completely specified. =In STG, this means there exist nodes with less than |I| outgoing edges or edges carrying don’t care as output; =In flow table, this means there exist incompletely defined entries; =In cube table, this means there exist incompletely defined rows.

4 ENEE 6444 =I = {x,y} =S = {A,B,C,D} =S 0 = {A} =  (A,x) = A,  (A,y) = B,  (B,x) = A,  (B,y) = C,  (C,y) = D =O = {0,1} = (A,x) = 0, (A,y) = 1, (B,x) = 0, (B,x) = 0, (C,y) = 1 (C,y) = 1 Examples: ISM A C B x/0 y/1 x/0 y/- y/1 D -,- D,1-,-C C,-A,0B B,1A,0Ayx-,- D

5 ENEE 6445 State Minimization for ISM Goal: For a given incompletely specified machine M, find a machine M’ such that: =on any input sequence, M’ produces the same outputs as M, whenever M is specified. =there does not exist a machine M’’ with fewer states than M’ which has the same property.

6 ENEE 6446 > Idea: =Build a CSM (completely specified machines) for every possible combination of the don’t cares; =Minimize the resulting CSMs; =Choose the one with the smallest number of states. > Example: In this example, it means state minimization for two CSMs obtained from M, by setting the don’t care to 0 and 1 (i.e. all possible alphabets). Brute Force Method B,0C,1 C,0B,- B,0C,0 C B Ayx B,0C,1 C,0 B,0 B,0C,0 C B AyxB,0C,1 C,0 B,1 B,0C,0 C B Ayx

7 ENEE 6447 > A and C, B and C are not equivalent; > A and B are not equivalent; > So this CSM cannot be reduced, I.e., it is already minimized. Brute Force Method B,0C,1 C,0 B,0 B,0C,0 C B Ayx B,0C,1 C,0 B,1 B,0C,0 C B Ayx > A and B, A and C are not equivalent; > B and C are equivalent; > So this CSM can be reduced to a machine with only two states. > Conclusion: The ISM can be reduced to a 2-state machine. > Question: Can this always be done?

8 ENEE 6448 > A and C, B and C are not equivalent; > A and B are not equivalent; > So this CSM cannot be reduced. Brute Force Method B,0A,1 A,0 B,0 B,0C,0 C B Ayx B,0A,1 A,0 B,1 B,0C,0 C B Ayx > A and B, A and C are not equivalent; > B and C are not equivalent; > So this CSM cannot be reduced. > Conclusion: The ISM cannot be reduced. > Question: Is this correct? B,0A,1 A,0 B,- B,0C,0 C B Ayx Apply the brute force method to this ISM:

9 ENEE 6449 Brute Force Method Fails =One can verify that on any input sequence, the CSM produces the same outputs as the ISM, whenever it is specified. =One way to see this is that the ISM is defined to be 1 iff the machine receives ‘xx’ at the starting state A, which is also true for the CSM. =Notice that on certain input sequences, e.g. ‘yx’, the ISM is not specified, but this does not prevent us from reducing the ISM to this CSM. B,0A,1 A,0 B,- B,0C,0 C B Ayx Apply the brute force method to this ISM: Consider this CSM: S,0S,1 S,0T,0 T Syx

10 ENEE 64410 Compatible States > Two states are compatible if they have the same output values wherever they are both specified, and all pairs of successors are compatible whenever they are specified. > Example: =A and C are not compatible. =A and B, B and C are compatible. For A and B to be compatible, we need B and C to be compatible, we call {(B,C)} the class set of (A,B). > We can merge two states if they are compatible. B,0A,1 A,0 B,- B,0C,0 C B Ayx S,0S,1 S,0T,0 T Syx

11 ENEE 64411 Any Shortcuts: ISM State Minimization > Can we simply modify the partition-refinement procedure for CSM by replacing equivalent states with compatible states? =No. Compatibility is not transitive, therefore it is not an equivalent relation, and thus it does not give partitions. > Can we first find all the compatibles, and then look for a minimum number of compatibles, such that every original state is in at least one compatible? (unate covering problem) =No. One compatible may require other compatibles, therefore choosing a given compatible may imply that some other compatibles must be chosen too.

12 ENEE 64412 Maximal and Prime Compatibles > A set of states is compatible iff all pairs in the set are compatible. > A set of compatible states is maximal if it cannot be strictly contained in any compatible sets. > A set of compatible states is prime if it cannot be contained in another compatible whose class set is contained in this compatible’s class set. (C is prime means that there does not exist C’  C and  ’  ). > Theorem. There exists an optimal solution that consists of prime compatibles.

13 ENEE 64413 ISM State Minimization Algorithm > Find all pairs of compatible states; > Find the maximal compatibles; > Find the prime compatibles; > Set up the covering problem; > Solve the binate covering problem.

14 ENEE 64414 Find All Compatible Pairs 1. For i=1,…,|S|-1 2. { for j = i+1, …, |S| 3. { if states i and j have conflict outputs or incompatible successors 4. { mark ‘x’ in entry (i,j); /* i and j are incompatible*/ 5. update the compatibility table; } 6. else if some successor pairs are different but not yet known as incompatibles 7. enter such pairs in entry (i,j); /*questionable pairs*/ 8. else /*no conflicts on outputs and successors*/ 9. mark ‘~’ in entry (i,j); }}

15 ENEE 64415 Example: Find All Compatible Pairs A,1E,-B,-B,0D,1E,0A,1H F,0G,0-,-E,1-,-C,1-,-G -,-G,0F,1H,1-,1C,-B,0F A,1E,-B,--,-A,-E,-B,-E A,--,-B,0B,--,-E,--,-D G,0-,--,--,-A,1D,1B,0C -,-A,1A,--,-A,-D,1B,0B -,-A,-B,0E,1D,0-,-A,0A7654321GFEDCBA H G F E D C B

16 ENEE 64416 Example: Find All Compatible Pairs A,1E,-B,-B,0D,1E,0A,1H F,0G,0-,-E,1-,-C,1-,-G -,-G,0F,1H,1-,1C,-B,0F A,1E,-B,--,-A,-E,-B,-E A,--,-B,0B,--,-E,--,-D G,0-,--,--,-A,1D,1B,0C -,-A,1A,--,-A,-D,1B,0B -,-A,-B,0E,1D,0-,-A,0A7654321 GFEDCBA XX(A,B)(A,D)~XXXH (E,H)XX(C,D)(F,G)X~G XX(C,D)XXF ~ X (A,B)(A,E) (D,E) (A,B) (A,D) E (A,G)(D,E)(A,B)(D,E)(B,E)D ~XC(A,D)B

17 ENEE 64417 Find the Maximal Compatibles A set of states is compatible iff all pairs in the set are compatible; it is maximal if it cannot be strictly contained in any compatible sets. 1. Define Boolean formula F = 1; 2. For each incompatible pair (i,j) 3. F = F (x i ’+x j ’); /* i and j cannot be in the same set*/ 4. Rewrite F to SOP form; /*a complete sum*/ 5. Every term of the this SOP is a maximal compatible set (consists of states that do not appear in the term);

18 ENEE 64418 GFEDCBA XX(A,B)(A,D)~XXXH (E,H)XX(C,D)(F,G)X~G XX(C,D)XXF ~ X (A,B)(A,E) (D,E) (A,B) (A,D) E (A,G)(D,E)(A,B)(D,E)(B,E)D ~XC(A,D)B Example: Find the Maximal Compatibles B,0A,1 C,0 B,- B,0C,0 C B Ayx B (B,C) C X(A,B) A B A B A’+C’  (B,C), (A,B) (a’+c’)(a’+f’)(a’+h’)(b’+f’)(b’+g’)(b’+h’)(c’+e’) (c’+h’)(d’+f’)(d’+g’)(e’+f’)(e’+g’)(f’+h’)(g’+h’) = c’f’g’h’+a’e’f’g’h’+b’c’d’e’f’h’ +a’b’c’f’g’+a’b’d’e’h’  (A,B,D,E),(B,C,D),(A,G), (D,E,H),(C,F,G)

19 ENEE 64419 Find the Prime Compatibles > Maximal compatibles are prime. (C is prime means that there does not exist C’  C and  ’  ). > If a prime compatible has empty class set, all its subsets cannot be prime. > If a prime compatible has non-empty class set, we should check its subsets (by definition). > Process according to the size of the prime. > Stop when all the single state sets have been checked.

20 ENEE 64420 Find the Prime Compatibles GFEDCBA XX(A,B)(A,D)~XXXH (E,H)XX(C,D)(F,G)X~G XX(C,D)XXF ~ X (A,B)(A,E) (D,E) (A,B) (A,D) E (A,G)(D,E)(A,B)(D,E)(B,E)D ~XC(A,D)B Maximal Compatibles and their class sets: (A,B,D,E): empty (A,B,D,E): empty (B,C,D):{(A,B),(D,E),(A,G)} (B,C,D):{(A,B),(D,E),(A,G)} (A,G):empty (A,G):empty (D,E,H):{(A,B),(A,D)} (D,E,H):{(A,B),(A,D)} (C,F,G):{(C,D),(E,H)} (C,F,G):{(C,D),(E,H)} 1. Maximal compatible: (A,B,D,E) 2. Maximal compatible: (B,C,D), (D,E,H), (C,F,G) 3. Subsets of (B,C,D): (B,C), (C,D) 4. Subsets of (D,E,H): (D,H) 5. Subsets of (C,F,G): (C,F),(C,G),(F,G) 6. Maximal compatible: (A,G) 7. Subsets of compatibles with 2 states: (F) (A,B,D,E),(A,G),(B,C), (D,H) all have empty class sets.

21 ENEE 64421 ISM State Minimization Algorithm > Find all pairs of compatible states; > Find the maximal compatibles; > Find the prime compatibles; > Set up the covering problem; > Solve the binate covering problem.

22 ENEE 64422 The Covering Problem > Now we have found all the prime compatibles, our goal is to collect some prime compatibles such that =Every state is contained in at least one compatible (covering constraint); Is this always possible? =All the class sets of the selected compatibles are contained in some compatibles (closure constraint). A set of compatibles satisfying these two constraints is called a cover, we want to find a cover with the minimal number of compatibles.

23 ENEE 64423 Covering Problem as SAT > The Boolean satisfiability (SAT) problem seeks to determine whether there exists a 0/1 assignment to the Boolean variables such that a given Boolean formula is true. =Example: (x+y)(y’+z)z’ is satisfiable (x=1,y=0,z=0)(x+y)(y’+z)z’ is satisfiable (x=1,y=0,z=0) x’(x+y’)(y+z’)(x+z) is unsatisfiable.x’(x+y’)(y+z’)(x+z) is unsatisfiable. > Covering problem as SAT =Prime compatible  a Boolean variable x x=1  the compatible is selected in the coverx=1  the compatible is selected in the cover x=0  the compatible is not selected in the coverx=0  the compatible is not selected in the cover =Covering/closure constraints  clauses

24 ENEE 64424 Covering Constraints > Covering constraint: every state has to be covered. =If a state S is contained in the following prime compatibles: x 1,x 2,…,x k, then at least one of these has to be selected. (Otherwise, S will be left uncovered.) =If x i is selected in the cover, we have x i =1. =Therefore, all we need to do is to satisfy the clause x 1 +x 2 +…+x k. > For each state, construct a clause as above.

25 ENEE 64425 Closure Constraints > Closure constraint: if one compatible is select (x=1), then all its class set must be covered. =For a compatible pair (S 1,S 2 ), if state S 1 is contained in the following prime compatibles: x 11,x 12,…,x 1m, and state S 2 in x 21,x 22,…,x 2n, let {x 1,x 2,…,x k }={x 11,x 12,…,x 1m }  {x 21,x 22,…,x 2n }, then the pair (S 1,S 2 ) can be covered by any of the followings x 1,x 2,…,x k. =If x is selected in the cover (x=1), for each pair (S 1,S 2 ) in x’s class set, one of the follows must be selected: x 1,x 2,…,x k. I.e., x 1 +x 2 +…+x k must be true. =If x is not selected, we don’t care its class set =Therefore, all we need to do is to satisfy the clause x’+x 1 +x 2 +…+x k for each of the pairs in x’s class set. (why?) > For each compatible, construct a clause as above for each compatible pair in its class set.

26 ENEE 64426 Example: Setting Up the Covering Problem Prime Compatibles and their class sets: x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty Covering constraints: A:x 1 + x 10 E: x 1 + x 3 A:x 1 + x 10 E: x 1 + x 3 B:x 1 + x 2 + x 5 F: x 4 + x 8 + x 11 + x 12 B:x 1 + x 2 + x 5 F: x 4 + x 8 + x 11 + x 12 C:x 2 + x 4 + x 5 + x 6 + x 8 + x 9 G: x 4 + x 9 + x 10 + x 11 C:x 2 + x 4 + x 5 + x 6 + x 8 + x 9 G: x 4 + x 9 + x 10 + x 11 D:x 1 + x 2 + x 3 + x 6 + x 7 H: x 3 + x 7 D:x 1 + x 2 + x 3 + x 6 + x 7 H: x 3 + x 7

27 ENEE 64427 Prime Compatibles and their class sets: x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty Example: Setting Up the Covering Problem Closure constraints: x 2 : (x 2 ’ + x 1 )(x 2 ’ + x 10 )(x 2 ’ + x 1 + x 3 ) x 2 : (x 2 ’ + x 1 )(x 2 ’ + x 10 )(x 2 ’ + x 1 + x 3 ) x 3 : (x 3 ’ + x 1 )(x 3 ’ + x 1 ) x 8 : (x 8 ’ + x 2 + x 6 ) x 3 : (x 3 ’ + x 1 )(x 3 ’ + x 1 ) x 8 : (x 8 ’ + x 2 + x 6 ) x 4 : (x 4 ’ + x 2 + x 6 )(x 4 ’ + x 3 )x 9 : (x 9 ’ + x 2 + x 6 )(x 9 ’ + x 4 ) x 4 : (x 4 ’ + x 2 + x 6 )(x 4 ’ + x 3 )x 9 : (x 9 ’ + x 2 + x 6 )(x 9 ’ + x 4 ) x 6 : (x 6 ’ + x 10 )(x 6 ’ + x 1 + x 3 ) x 11 : (x 11 ’ + x 3 ) x 6 : (x 6 ’ + x 10 )(x 6 ’ + x 1 + x 3 ) x 11 : (x 11 ’ + x 3 )

28 ENEE 64428 Example: Setting Up the Covering Problem SAT instance: (x 1 +x 10 )(x 1 +x 2 +x 5 )(x 2 +x 4 +x 5 +x 6 +x 8 +x 9 )(x 1 +x 2 +x 3 +x 6 +x 7 )(x 1 +x 3 )(x 4 +x 8 +x 11 + x 12 )(x 4 +x 9 +x 10 +x 11 )(x 3 +x 7 ) (x 2 ’+x 1 )(x 2 ’+x 10 )(x 2 ’+x 1 +x 3 ) (x 3 ’+x 1 ) (x 4 ’+x 2 +x 6 )(x 4 ’+x 3 ) (x 6 ’+x 10 )(x 6 ’+x 1 +x 3 ) (x 8 ’+x 2 +x 6 ) (x 9 ’+x 2 +x 6 )(x 9 ’+x 4 ) (x 11 ’+x 3 ) Covering constraints: A:x 1 + x 10 E: x 1 + x 3 A:x 1 + x 10 E: x 1 + x 3 B:x 1 + x 2 + x 5 F: x 4 + x 8 + x 11 + x 12 B:x 1 + x 2 + x 5 F: x 4 + x 8 + x 11 + x 12 C:x 2 + x 4 + x 5 + x 6 + x 8 + x 9 G: x 4 + x 9 + x 10 + x 11 C:x 2 + x 4 + x 5 + x 6 + x 8 + x 9 G: x 4 + x 9 + x 10 + x 11 D:x 1 + x 2 + x 3 + x 6 + x 7 H: x 3 + x 7 D:x 1 + x 2 + x 3 + x 6 + x 7 H: x 3 + x 7 Closure constraints: x 2 : (x 2 ’ + x 1 )(x 2 ’ + x 10 )(x 2 ’ + x 1 + x 3 ) x 2 : (x 2 ’ + x 1 )(x 2 ’ + x 10 )(x 2 ’ + x 1 + x 3 ) x 3 : (x 3 ’ + x 1 )(x 3 ’ + x 1 ) x 8 : (x 8 ’ + x 2 + x 6 ) x 3 : (x 3 ’ + x 1 )(x 3 ’ + x 1 ) x 8 : (x 8 ’ + x 2 + x 6 ) x 4 : (x 4 ’ + x 2 + x 6 )(x 4 ’ + x 3 )x 9 : (x 9 ’ + x 2 + x 6 )(x 9 ’ + x 4 ) x 4 : (x 4 ’ + x 2 + x 6 )(x 4 ’ + x 3 )x 9 : (x 9 ’ + x 2 + x 6 )(x 9 ’ + x 4 ) x 6 : (x 6 ’ + x 10 )(x 6 ’ + x 1 + x 3 ) x 11 : (x 11 ’ + x 3 ) x 6 : (x 6 ’ + x 10 )(x 6 ’ + x 1 + x 3 ) x 11 : (x 11 ’ + x 3 )

29 ENEE 64429 SAT instance: (x 1 +x 10 )(x 1 +x 2 +x 5 )(x 2 +x 4 +x 5 +x 6 +x 8 +x 9 )(x 1 +x 2 +x 3 +x 6 +x 7 )(x 1 +x 3 )(x 4 +x 8 +x 11 + x 12 )(x 4 +x 9 +x 10 +x 11 )(x 3 +x 7 ) (x 2 ’+x 1 )(x 2 ’+x 10 )(x 2 ’+x 1 +x 3 ) (x 3 ’+x 1 ) (x 4 ’+x 2 +x 6 )(x 4 ’+x 3 ) (x 6 ’+x 10 )(x 6 ’+x 1 +x 3 ) (x 8 ’+x 2 +x 6 ) (x 9 ’+x 2 +x 6 )(x 9 ’+x 4 ) (x 11 ’+x 3 ) Example: Setting Up the Covering Problem Selection: {(A,B,D,E), (D,E,H), (B,C), (F,G)} Prime Compatibles and their class sets: x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 1 : (A,B,D,E): empty x 7 : (D,H):empty x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 2 : (B,C,D):{(A,B),(A,G),(D,E)} x 8 : (C,F):{(C,D)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 3 : (D,E,H):{(A,B),(A,D)} x 9 : (C,G):{(C,D),(F,G)} x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 4 : (C,F,G):{(C,D),(E,H)} x 10 :(A,G):empty x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 5 : (B,C):empty x 11 : (F,G):{(E,H)} x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty x 6 : (C,D):{(A,G),(D,E)} x 12 : (F):empty SAT instance: (x 1 +x 10 )(x 1 +x 2 +x 5 )(x 2 +x 4 +x 5 +x 6 +x 8 +x 9 )(x 1 +x 2 +x 3 +x 6 +x 7 )(x 1 +x 3 )(x 4 +x 8 +x 11 + x 12 )(x 4 +x 9 +x 10 +x 11 )(x 3 +x 7 ) (x 2 ’+x 1 )(x 2 ’+x 10 )(x 2 ’+x 1 +x 3 ) (x 3 ’+x 1 ) (x 4 ’+x 2 +x 6 )(x 4 ’+x 3 ) (x 6 ’+x 10 )(x 6 ’+x 1 +x 3 ) (x 8 ’+x 2 +x 6 ) (x 9 ’+x 2 +x 6 )(x 9 ’+x 4 ) (x 11 ’+x 3 ) Solution: x 1 =x 3 =x 5 = x 11 = 1, all others set to 0.

30 ENEE 64430 Representing the Reduced ISM In the reduced ISM: =There is a state for each compatible; =Next state will be a compatible that contains all the original next states (if there are more than one, randomly pick one); =Output remains the same. A,1E,-B,-B,0D,1E,0A,1H F,0G,0-,-E,1-,-C,1-,-G -,-G,0F,1H,1-,1C,-B,0F A,1E,-B,--,-A,-E,-B,-E A,--,-B,0B,--,-E,--,-D G,0-,--,--,-A,1D,1B,0C -,-A,1A,--,-A,-D,1B,0B -,-A,-B,0E,1D,0-,-A,0A7654321 (F,G) Z Z,0W,1W,--,-W,1W,1Y,0 (B,C) Y (D,E,H) X ?,1W,0 (A,B,D,E) W 7654321

31 ENEE 64431 Unate and Binate > A function f(x 1,x i x n ) is positive unate in x i if its cofactor Negative unate is defined in a similar way. If a function is neither positive unate nor negative unate in a variable, it is called binate in this variable. A function is positive/negative unate if it is so for all variables, otherwise it is called binate. > Example: f(x,y,z) = xy + xz’ + yz’ =f is positive unate in x: f x =y+z’+yz’, f x’ =yz’ =f is positive unate in y: f y =x+xz’+z’, f y’ =xz’ =f is negative unate in z: f z =xy, f z’ =xy+x+y =f is a binate function Recall:

32 ENEE 64432 Binate Covering Problem in Matrix Form F = (x 1 +x 3 )(x 2 +x 4 +x 6 )(x 3 ’+x 4 +x 5 )(x 6 ’)(x 1 ’+x 6 ’)(x 3 +x 4 ’+x 5 ) For each clause (row f i ) and each variable (column F j ): f ij = 1: normal form f ij = 0: complement form f ij = -: does not appear The Binate Cover Problem: Find a minimum cost subset S of columns, such that for each row f i : > Either  j s.t. f ij = 1 and F j  S; > Or  j s.t. f ij = 0 and F j  S

33 ENEE 64433 Unate Covering Problem (UCP) > Let M mxn be a Boolean matrix, the UCP is to find a minimum number of columns to cover M in the sense that any row with a 1-entry has at least one of its 1-entries covered by these columns. 11 wx’y’z 11 wxy’z 1 w’x’yz’ 11 wx’yz’ 11 wxyz’ 11 wxyz 11 w’x’y’z’ 1 w’x’y’z 11 wx’y’z’x’z’x’y’wy’zwyz’wxzwxy Solutions to UCP: {x’y’, x’z’,wxy, wxz}, {x’y’, x’z’,wxy, wy’z}, {x’y’, x’z’,wxz, wyz’}.Recall:

34 ENEE 64434 Reduction Techniques 1. Check for essential columns, remove them (they must be in the selection) and all the rows that have a 1 in such columns; 2. Check for row dominance and remove all dominating rows; 3. Check for column dominance and remove all dominated columns; 4. Repeat 1, 2, 3 if there is any removal occurs. What is left? =If no rows/columns left, we find an optimal solution; =Otherwise, this UCP instance is called cyclic. Recall:

35 ENEE 64435 Essential Row in BCP F = (x 1 +x 3 )(x 2 +x 4 +x 6 )(x 3 ’+x 4 +x 5 )(x 6 ’)(x 1 ’+x 6 ’)(x 3 +x 4 ’+x 5 ) > For F to be true, the term x 6 ’ must be true, or equivalently, x 6 =0. > In the matrix form, this is a row of -----0, to cover this row, from definition, we cannot select the column corresponding to x 6. > An essential row of F is a row where only one entry f ij is not -. It corresponds to a single literal clause in the SAT instance.

36 ENEE 64436 Essential Row in BCP > Action on essential row: =If f ij =1, select F j ; remove all rows f k if f kj =1; =If f ij =0, unselect F j ; remove all rows f k if f kj =0; =Remove column F j; > F = (x 1 +x 3 )(x 2 +x 4 +x 6 )(x 3 ’+x 4 +x 5 )(x 6 ’)(x 1 ’+x 6 ’)(x 3 +x 4 ’+x 5 ) =x 6 =0; =x 2 +x 4 +x 6 : x 2 +x 4 =x 1 ’+x 6 ’: deleted

37 ENEE 64437 Row Dominance in BCP F = (x 1 ’+x 2 +x 3 ’) (x 2 +x 3 ’)(x 1 +x 4 )(x 1 +x 2 ’+x 3 +x 4 ’) > For F to be true, all clauses must be true. Whenever x 2 +x 3 ’ is true, x 1 ’+x 2 +x 3 ’ is also true. We say the latter dominates the former. > A row f i dominates another row f j if f i is satisfied whenever f j is satisfied, I.e. f j  f i. > In matrix form, this means that f ik =f jk for all k that f jk  -. > Remove dominating rows.

38 ENEE 64438 Column Dominance in BCP > Column F j dominates column F k if for each row f i, one of the following occurs: =f ij =1; =f ij = - and f ik  1; =f ij = f ik = 0. > If F k is selected, we can always replace it by F j. This does not increase the number of columns. > Action: remove dominated columns; remove rows that have 0 at dominated columns.

39 ENEE 64439 Example: > Last row is essential =x 6 =1; =Remove row 4 and 6; > Column 1 can be dominated by column 2 =Remove column 1, x 1 =0; > Column 4 is dominated by 5 =Remove column 4, x 4 =0; =Remove rows 1 and 2; > Column 5 dominates 2 and 3 =Remove columns 2 and 3, x 2 =x 3 =0; > Select column 5, x 5 =1.


Download ppt "Sequential System Synthesis -- Incompletely Specified Machines."

Similar presentations


Ads by Google