Exact State Minimization of Non-Deterministic FSMs 290N: The Unknown Component Problem Lecture 17.

Slides:



Advertisements
Similar presentations
Three Special Functions
Advertisements

NP-Hard Nattee Niparnan.
Optimization of Sequential Networks Step in Synthesis: Problem Flow Table Reduce States Minimum-State Table State Assignment Circuit Transition Table Flip-Flop.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
The Theory of NP-Completeness
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Graphs 4/16/2017 8:41 PM NP-Completeness.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
FSM Decomposition using Partitions on States 290N: The Unknown Component Problem Lecture 24.
Sequential System Synthesis -- Incompletely Specified Machines.
NP-Complete Problems Problems in Computer Science are classified into
A New Approach to Structural Analysis and Transformation of Networks Alan Mishchenko November 29, 1999.
Computation Engines: BDDs and SAT (part 2) 290N: The Unknown Component Problem Lecture 8.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
ECE 667 Synthesis and Verification of Digital Systems
CS 140 Lecture 5 Professor CK Cheng CSE Dept. UC San Diego 1.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Cardinality & Sorting Networks. Cardinality constraint Appears in many practical problems: scheduling, timetabling etc’. Also takes place in the Max-Sat.
State Minimization and Determinization EECS 290A Sequential Logic Synthesis and Verification.
Two Level Logic Optimization. Two-Level Logic Minimization PLA Implementation Ex: F 0 = A + B’C’ F 1 = AC’ + AB F 2 = B’C’ + AB product term AB, AC’,
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
BOOLEAN FUNCTION PROPERTIES
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
2-Level Minimization Classic Problem in Switching Theory
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Weikang Qian. Outline Intersection Pattern and the Problem Motivation Solution 2.
Kuo-Hua Wang, Chung-Ming Chan, Jung-Chang Liu Dept. of CSIE Fu Jen Catholic University Slide: Chih-Fan Lai Simulation and SAT-Based Boolean Matching for.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
1 State Assignment The problem: Assign a unique code to each state to produce a minimal binary logic level implementation. Given: 1.|S| states, 2.at least.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 17: March 11, 2002 Sequential Optimization (FSM Encoding)
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
CS137: Electronic Design Automation
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Instructor: Rajeev Alur
Dr. Clincy Professor of CS
A Boolean Paradigm in Multi-Valued Logic Synthesis
COE 561 Digital System Design & Synthesis Sequential Logic Synthesis
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
ECE 331 – Digital System Design
Richard Anderson Lecture 25 NP-Completeness
Fast Computation of Symmetries in Boolean Functions Alan Mishchenko
Synthesis and Verification of Finite State Machines
Richard Anderson Lecture 28 NP-Completeness
Basic notions contd... Definition:
Synthesis and Verification of Finite State Machines
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
ECE 331 – Digital System Design
Presentation transcript:

Exact State Minimization of Non-Deterministic FSMs 290N: The Unknown Component Problem Lecture 17

Outline  Introduction  The algorithm for exact state minimization  Binate covering problem (weighted SAT)  The implicit implementation of the algorithm  Conclusions

Exact State Minimization  Given a non-deterministic FSM, find a contained FSM, which has the minimum number of states  An implicit implementation of the algorithm is presented in: T. Kam, T. Villa, R. Brayton, A. Sangiovanni- Vincentelli. A Fully Implicit Algorithm for Exact State Minimization. Proc. DAC 1994, pp T. Kam, T. Villa, R. Brayton, A. Sangiovanni- Vincentelli. A Fully Implicit Algorithm for Exact State Minimization. Proc. DAC 1994, pp

The Algorithm  Generate the compatibles  Compute the constraints Covering conditions Covering conditions Closure conditions Closure conditions  Determine prime compatibles  Solve the resulting binate covering problem  Derive the minimized FSM from the solution

Compatibles  Definition: A compatible is a subset of states that can be combined together Compatibles can overlap Compatibles can overlap Unlike classes of equivalent state of the CS-FSMUnlike classes of equivalent state of the CS-FSM The number of compatibles can be exponential The number of compatibles can be exponential  Computation of the complete set of compatibles Find all the pairs of incompatible states Find all the pairs of incompatible states Start with one-step incompatible pairsStart with one-step incompatible pairs Traverse backwards to find all pairs of incompatible statesTraverse backwards to find all pairs of incompatible states Find all the subsets of states, which contain at least one incompatible state pair Find all the subsets of states, which contain at least one incompatible state pair Find all the non-empty subsets of states, which do not belong to the above set (these are compatibles) Find all the non-empty subsets of states, which do not belong to the above set (these are compatibles) Correction: Pair-wise compatibility does not guarantee group- wise compatibility. Additional checking is needed to show that the pair-wise compatible states belonging to a compatible, as computed above, are group-wise compatible. Correction: Pair-wise compatibility does not guarantee group- wise compatibility. Additional checking is needed to show that the pair-wise compatible states belonging to a compatible, as computed above, are group-wise compatible.

Variables and Constraints  Introduce a Boolean variable for each compatible This variable is 1 iff the compatible is selected to become a state after of the FSM after state minimization This variable is 1 iff the compatible is selected to become a state after of the FSM after state minimization  Constraints are of two types: Covering constraints Covering constraints Express the property that each state of the original machine is contained in at least one selected compatibleExpress the property that each state of the original machine is contained in at least one selected compatible Example: c1 + c3 + c6Example: c1 + c3 + c6 Closure constraints Closure constraints Express the property that, if a compatible is selected, then for every input there is a transition into another selected compatibleExpress the property that, if a compatible is selected, then for every input there is a transition into another selected compatible Example: c1 => c5 + c7 + c8Example: c1 => c5 + c7 + c8

Class Sets  Definition. For compatible C and input i, an implied set is a subset of states reachable from states in C under input i.  Definition. A class set of compatible C is its implied set D satisfying the conditions: D has more than one state D has more than one state D is not contained in C D is not contained in C D is not contained in any other implied set D’ of C D is not contained in any other implied set D’ of C

Prime Compatibles  To solve exactly the state minimization problem, it is sufficient to consider a subset of compatibles called prime compatibles.  It was shown that at least one minimum cover of the FSM consists entirely of prime compatibles A. Grasselli and F. Luccio. A method for minimizing the number of internal states in incompletely specified sequential networks. IRE Trans. Electr. Computers, EC-14(3): , June A. Grasselli and F. Luccio. A method for minimizing the number of internal states in incompletely specified sequential networks. IRE Trans. Electr. Computers, EC-14(3): , June  Definition. A compatible C’ dominates a compatible C if C’ contains C C’ contains C The class set of C’ is contained in the class set of C The class set of C’ is contained in the class set of C  Definition. A compatible C is a prime compatible if it is not dominated by any other compatible

Binate Covering Problem  BCP is a problem of finding an assignment of Boolean variables such that This assignment satisfies the covering and closure constraints expressed in the CNF form This assignment satisfies the covering and closure constraints expressed in the CNF form The number of positive polarity variables in the satisfying assignment is minimum The number of positive polarity variables in the satisfying assignment is minimum  BCP is a special case of weighted SAT problem The weights are 1 if the variable is positive and 0 if the variable is negative The weights are 1 if the variable is positive and 0 if the variable is negative

Setting Up the BCP Problem  Given is a set of prime compatibles with class sets computed  Covering constraints For each state S, which belongs to the compatible C, create the sum of prime compatible Ci, which contains this state For each state S, which belongs to the compatible C, create the sum of prime compatible Ci, which contains this state Example: C1 + C2 + C5.Example: C1 + C2 + C5. Correction: This constraint is needed only for the initial state. Correction: This constraint is needed only for the initial state.  Closure constraints For each compatible C and for each class set D of C, create the sum of compatibles Ci containing D For each compatible C and for each class set D of C, create the sum of compatibles Ci containing D Example: C => C2 + C7 + C12.Example: C => C2 + C7 + C12.  The number of constraints There are as many covering constraints as there are states There are as many covering constraints as there are states There are as many closure constrains as there are class sets in all compatibles There are as many closure constrains as there are class sets in all compatibles

Implicit Implementation  Given are the transition relation T(i,cn,ns) and the output relation O(i,cs,o) of the FSM  Use positional notation to represent sets of states Introduce as many Boolean variables as there are states in the FSM Introduce as many Boolean variables as there are states in the FSM A subset of states can be represented as one minterm A subset of states can be represented as one minterm For example, n = 6, subset is {s1,s2}, minterm is For example, n = 6, subset is {s1,s2}, minterm is A set of subsets of states (a set of compatibles) can be represented by a characteristic function A set of subsets of states (a set of compatibles) can be represented by a characteristic function Each on-set minterm of the characteristic function corresponds to one compatible belonging to the set of compatiblesEach on-set minterm of the characteristic function corresponds to one compatible belonging to the set of compatibles

Operations on Positional Sets  Equality: (X=Y) =  i (xi  yi)  Containment: (X  Y) =  i (xi  yi)  Strict containment: (X  Y) = (X  Y) & !(X=Y)  Complementation, union, intersection and sharp are Boolean operations: NOT, OR, AND, and AND-NOT

Set Containment and Set Union  Set-containment is true iff positional-set A contains positional-set B SetContain x (A,B) =  x[  A (x)   B (x)] SetContain x (A,B) =  x[  A (x)   B (x)]  Set-union of a number of positional sets is a positional set containing all the elements from the original positional sets SetUnion x (A,Y) =  i [yi  [  x(  A (x) & xi)]] SetUnion x (A,Y) =  i [yi  [  x(  A (x) & xi)]]

Maximal and Tuple n,k (x)  Maximal x (  A ) =  A (x) & !  y[  A (y) & (y  x)]  Tuple n,k (x) contains all positional sets of size n, containing exactly k ones Tuple(i,k){ if (k < 0 or i < k ) return 0; if ( i = 0 and i = k ) return 1; return ITE( xi, Tuple(i-1,k-1), Tuple(i-1,k) ); }

Output Incompatible Pairs  Definition. A pair is output incompatible there exists an input, for which the outputs are not compatible: OICP(y,z) = Tuple 1 (y) & Tuple 1 (z) &  i !  o[ O(i,y,o) & O(i,z,o) ]

Incompatible Pairs  ICP(y,z) = OICP(y,z)  ICP k+1 (y,z) = ICP k (y,z) +  i,u,v[T(i,y,u) & T(i,z,v)&ICP k (u,v)]  ICP k+1 (y,z) = ICP k (y,z) = ICP(y,z)

Incompatibles and Compatibles  IC(c) =  y,z [ ICP(y,z) &  i (yi+zi  ci) ]  C(c) = !Tuple 0 (c) & !IC(c)

Implied Set and Class Set  F(c,i,n) =  p [ C(c) & (c  p) & T(i,p,n) ]  CI(c,d) =  i [  n F(c,i,n) & SetUnion n (F(c,i,n),d)]  CCS(c,d) = !Tuple 0 (c) & !(c  d) & Maximal d CI(c,d)

Prime Compatibles  Dominance(c’,c) = (c  p) & SetContain d [CCS(c,d), CCS(c’,d)]  PC(c) = C(c) & !  c’[C(c’) & Dominance(c’,c)]