Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

Similar documents
Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

Unit 4: Formal Verification

Synthesis of 2-level Logic Heuristic Method. Two Approaches

LOGIC SYNTHESIS AND VERIFICATION ALGORITHMS. Gary D. Hachtel University of Colorado. Fabio Somenzi University of Colorado.

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

CS February 17

Permutation Matrices. Permutation Matrices. Permutation Matrices. Permutation Matrices. Isomorphisms of Graphs. 19 Nov 2015

Chapter 2. Boolean Expressions:

ICS 252 Introduction to Computer Design

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

Standard Forms of Expression. Minterms and Maxterms

Boolean Reasoning. The Logic of Boolean Equations. Frank Markham Brown Air Force Institute of Technology

IT 201 Digital System Design Module II Notes

Introduction. The Quine-McCluskey Method Handout 5 January 24, CSEE E6861y Prof. Steven Nowick

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

Combinational Logic & Circuits

VLSI System Design Part II : Logic Synthesis (1) Oct Feb.2007

Outcomes. Unit 9. Logic Function Synthesis KARNAUGH MAPS. Implementing Combinational Functions with Karnaugh Maps

A B AB CD Objectives:

Module -7. Karnaugh Maps

CS8803: Advanced Digital Design for Embedded Hardware

Chapter 3 Simplification of Boolean functions

ESE535: Electronic Design Automation. Today. EDA Use. Problem PLA. Programmable Logic Arrays (PLAs) Two-Level Logic Optimization

Simplification of Boolean Functions

Review: Standard forms of expressions

ECE260B CSE241A Winter Logic Synthesis

Chapter 3. Gate-Level Minimization. Outlines

CMPE223/CMSE222 Digital Logic

Experiment 4 Boolean Functions Implementation

Contents. Chapter 3 Combinational Circuits Page 1 of 34

ELCT201: DIGITAL LOGIC DESIGN

Chapter 6. Logic Design Optimization Chapter 6

CprE 281: Digital Logic


Unit-IV Boolean Algebra

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Karnaugh Map (K-Map) Karnaugh Map. Karnaugh Map Examples. Ch. 2.4 Ch. 2.5 Simplification using K-map

Combinational Logic Circuits

ECE380 Digital Logic

NP-Completeness. Algorithms

Two-Level Logic Optimization ( Introduction to Computer-Aided Design) School of EECS Seoul National University

Experiment 3: Logic Simplification

2.6 BOOLEAN FUNCTIONS

Simplification of Boolean Functions

Introduction to Boolean logic and Logical Gates

QUESTION BANK FOR TEST

Read-Once Functions (Revisited) and the Readability Number of a Boolean Function. Martin Charles Golumbic

Digital Logic Lecture 7 Gate Level Minimization

Logic Synthesis and Verification

Combinational Circuits Digital Logic (Materials taken primarily from:

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Combinational Logic Circuits Part III -Theoretical Foundations

UNIT II. Circuit minimization

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

Logic Synthesis & Optimization Lectures 4, 5 Boolean Algebra - Basics

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Spring 2010 CPE231 Digital Logic Section 1 Quiz 1-A. Convert the following numbers from the given base to the other three bases listed in the table:

Gate Level Minimization Map Method

User s Manual. Ronwaldo A. Collado Diosdado Y. Tejoso Jr. CMSC 130 Logistic Design and Digital Computer Circuits Second Semester, A. Y.

Boolean Algebra and Logic Gates

ECE260B CSE241A Winter Logic Synthesis

CSE241 VLSI Digital Circuits UC San Diego

1. Fill in the entries in the truth table below to specify the logic function described by the expression, AB AC A B C Z

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

1. Mark the correct statement(s)

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

3.4 QUINE MCCLUSKEY METHOD 73. f(a, B, C, D, E)¼AC ĒþB CD þ BCDþĀBD.

Boolean algebra. June 17, Howard Huang 1

Chapter 2 Combinational

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Chapter 3. Boolean Algebra and Digital Logic

Variable, Complement, and Literal are terms used in Boolean Algebra.

ELCT201: DIGITAL LOGIC DESIGN

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Chapter 2: Combinational Systems

X Y Z F=X+Y+Z

Literal Cost F = BD + A B C + A C D F = BD + A B C + A BD + AB C F = (A + B)(A + D)(B + C + D )( B + C + D) L = 10

Homework 3 Handout 19 February 18, 2016

2008 The McGraw-Hill Companies, Inc. All rights reserved.

2.1 Binary Logic and Gates

Advanced Digital Logic Design EECS 303

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

ECE 5745 Complex Digital ASIC Design Topic 12: Synthesis Algorithms

Gate Level Minimization

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Basic circuit analysis and design. Circuit analysis. Write algebraic expressions or make a truth table

Optimized Implementation of Logic Functions

Chapter 2 Boolean algebra and Logic Gates

NP-complete Reductions

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

ECE 5775 (Fall 17) High-Level Digital Design Automation. Binary Decision Diagrams Static Timing Analysis

A graphical method of simplifying logic

Boolean Representations and Combinatorial Equivalence

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2

P and NP (Millenium problem)

Transcription:

Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique

Example As an Example, let s consider the formula: F(x,y,z) = x y z + x yz + x yz + xyz + xy z The complete sum of formula: F(x,y,z) = x y + x z + y z + yz Let P 1 = x y P 2 = x z P 3 = y z P 4 = yz F(x,y,z) = P 1 + P 2 + P 3 + P 4 These are the subset of primes that satisfy the given requirement and are called SOP COVER or COVER. To Solve the equation for the minimum cost that covers all rows, we express the above equations in matrix form and that matrix is called CONSTRAINT MATRIX.

Constraint Matrix OR Covering Matrix The CONSTRAINT MATRIX is: A CONSTRAINT MATRIX is a matrix that describes the conditions or the constraint that a cover must satisfy, and is also sometimes called Covering Matrix.

Constraint Equation Constraint Matrix can be written as Switching function : (P 1 + P 2 )( P 2 + P 3 ) (P 1 + P 4 ) P 3 P 4 The equation is called Constraint Equation of the Covering Problem. From the above Matrix or Equation we find the subset of columns of minimum cost that covers all the rows.

Defining Set Covering Problem Definition: The Set Covering problem <X,Y,Cost> consists of finding a minimal cost subset of Y that covers X. Where X is a Set, Y 2 X and Cost is the Cost of function defined on Y. The covering matrix associated with the set covering problem < X,Y,Cost > has rows labeled with elements of X and columns labeled with elements of Y, such that the element [x,y] of the matrix is equal to 1 iff y covers x, where x, y are the elements of set X and Y respectively. X Y

Unate Covering and Binate Covering In the constraint equation for example: (P 1 + P 2 )( P 2 + P 3 ) (P 1 + P 4 ) P 3 P 4 = 1 All the variables appear in positive form (Nocomplement)--- We have a Unate function and the kind of problem is called Unate covering(ucp). In the constraint equation for example: f(x1,x2,x3,x4) = (x1+x3+x4)*(x1+x2+x4)*(x2+x3+x4)*(x2+x3+x4) All the variables appear in positive form and negative form ----- We have a Binate function and the kind of problem is called Binate covering(bcp).

Methods that simplify the solution of CP For any problems in logic synthesis(2-level or Multilevel minimization) the general steps required are: (i)finding a table of all prime implicants. (ii) Form a covering matrix (PI vs Minterm) and solve the covering problem. For solving covering problem various techniques and algorithms are used. The Quine s theorem helps us in finding a minimum cover that is prime!.

Methods that simplify the solution of CP Petrick s method can also be applied to find minimum solution In the constraint equation for example: (P1 + P2)*( P2 + P3 ) *(P1 + P4) * P3 * P4 = 1 If solved using Petrick s method gives us the minimum solution,which is simplified to (P1 + P2) P3 P4 = 1 Each product term is a solution! But this method is not practical for large problems as opening the parenthesis involves an exponential number of operations.

Methods that simplify the solution of CP Branch and Bound algorithm can also be used to choose the best combination of PI S in case we have a cyclic core. Reduction of covering matrix using branch and bound algorithm: Step (i) From the constraint matrix find the essential PI S and Eliminate the rows covered by Essential columns. Step (ii) Elimination of the rows through Row dominance. Step (iii) Elimination of the rows through Column dominance.

Applications of Covering Problem (Unate or Binate) The Covering problems(cp) (Unate or Binate) has several important applications in logic synthesis such as: (i) 2-level minimization(logic or Boolean relation). (ii) Three level NAND implementation. (iii)three level CDEC minimization(conditional decoder). (iv) Minimum test set generation. (v) Boolean and multiple -valued Decomposition. (vi) Physical and technology mapping. (vii) State minimization. (viii) Exact encoding (ix) DAG covering

Example of Set covering Problem in Testing Problem: Finding the minimum test set to detect all possible stuck-at faults in a circuit that has 3 lines, each line can be stuck-at-0 or stuck -at-1. Assumption : The gate is an EX_OR gate. Logic Diagram of Gate: A B a b c C Circuit Under Test

Problem Explanation of the circuit: The circuit has two input lines (A,B) and the output(c ). Truth Table: A B a 0 a 1 b 0 b 1 c 0 c 1 C 0 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 0 0 1 0

Problem Here a 0,a 1,b 0,b 1,c 0,c 1 are the possible Inputs and Outputs to the circuit. If at all there is a fault in the Input or the Output then the fault is represented by x in the below table. A B a0 a 1 b 0 b 1 c 0 c1 C T 0 T 1 T 2 T 3 0 0 x x x 0 0 1 x x x 1 1 0 x x x 1 1 1 x x x 0

Problem Here we can say a 0 is detected by T 2,T 3 a 1 is detected by T 0,T 1 b 0 is detected by T 1,T 3 b 1 is detected by T 0,T 2 c 0 is detected by T 2,T 1 c 1 is detected by T 1,T 3 (T 2 +T 3 )(T 0 +T 1 )(T 1 +T 3 )(T 0 +T 2 )(T 1 +T 2 )(T 0 +T 3 )=1 This is the unate covering problem as the formula contains no letters that appears in both phases.

Problem The Best Covering! Many solution are present which has the same cost. Here we take the solution to be T 0 T 1 T 2 which would detect all the stuck at faults in the circuit.

Binate Covering Problem Definition: The Binate Covering Problem(BCP) consists of finding a minimal cost n -tuple that values f to 1. The covering matrix M of the binate covering problem is a matrix made of m rows labeled with the sum s i, and of n columns labeled with the variables x j. An element M[i,j] of the matrix is equal to 1 if (x i s i ), to 0 if (x j s i ) and to -- otherwise. Initially the BCP was known as COVERING WITH CLOSURE in which there was a restrictive assumption that one literal at most appeared complemented in the clause of the function.

Binate Covering Problem The binate covering matrix is represented as for function (x 1 +x 3 +x 4 )(x 1 +x 2 +x 4 )(x 2 +x 3 +x 4 )(x 2 +x 3 +x 4 ) x 1 x 2 x 3 x 4 x 1 +x 3 +x 4 1-1 1 x 1 +x 2 +x 4 0 1-0 x 2 +x 3 +x 4-1 0 1 x 2 +x 3 +x 4-0 1 0

Binate Covering Problem Consider the problem (x 3 +x 4 )*(x 4 +x 5 )*(x 3 +x 4 +x 5 ) (x 2 +x 4 +x 6 )*(x 2 +x 5 )*(x 6 ) The Covering Matrix is shown with horizontal rows corresponding to each term of the expression. From the shown matrix we find x 1 =0 and x 6 = 1 removing the said row and columns we get 4 by 4 matrix which is shown in next slide.

Binate Covering Problem In figure shown By the column dominance x 4 =0 and other rows are removed as all the elements are zeros and we are left with x 2,x 3 and x 5. By column dominance we can say that x 2 =x 3 =0 finally which yields x 5 =1. The complete solution x 1 =x 2 =x 3 =x 4 =0 and x 5 =x 6 =1

Binate Covering Problem Unate Covering always has a solution whereas Binate covering may or may not have a solution. For Example: (x1+x2)(x1+x2 )(x1 +x2)(x1 +x2 ) if simplified represents a function that is identically zero. Hence the problem has no solution.

Graph Coloring A Graph G(V,E) consists of a set of nodes V and a set of edges E. Graph Coloring: Is an assignment of colors to the vertices of G, one color to each vertex, so that adjacent vertices are assigned different colors. Chromatic number : Minimum number of colors needed for coloring. Given a graph G = (V,E) a subgraph H=(U,F) can be constructed by setting U subset of V and F subset of E. A Clique is complete subgraph of G.

Graph Coloring A Clique is maximal size clique or maximal clique if is is not a subgraph of another clique. Maximum Clique is a clique whose size is the largest possible. There are two graph coloring problems: Exact Program (EXOC) and approximate program DOM.

Graph Coloring Applications for Graph Coloring: Two level minimization Three level minimization Minimum test Set Boolean and Multiple valued decomposition. As an Example lets considering graph coloring problem.

Graph Coloring Concept of dominations to color an non incompatibility graph. Definition 1: Node A in the incompatibility graph covers node B if (i) A and B have no common edges. (ii) A has edges with all the nodes that B has edges with. (iii) A has at least one more edge than B. If any node A in the incompatibility graph covers any other node B in the graph, then node B can be removed from the graph.

Graph Coloring Definition 2: if the above conditions (i) and (ii) are true and A and B have the same number of nodes, then it is called Pseudo- covering. If there is a pseudo covering any one of the nodes A and B can be removed.

Example of Graph Coloring Graph: 2 3 1 4 6 5

Example of Graph Coloring In the given graph 1 dominates 3 and 3 can be removed. We are left with the graph whose nodes are 1,2,4,5,6. 2 and 5 are pseudo covering nodes 2 and 5 of same color. and 4 and 6 are pseudo covering nodes 4 and 6 of same color. the final graph contains nodes 1,2,4. It is a complete graph and can be colored with 3 colors. and since 2 and 5 are pseudo nodes they are given same color 4 and 6 are pseudo nodes 4,6 are of same color. 2 6 1 3 5 4

Example of Graph Coloring Final Graph: 2 3 1 4 6 5

Maximum Clique Coloring of the incompatability graph Finding cover with maximum clique Clique partitioning of compatibility graph. Advantage of using maximum clique is that it helps in finding neighbouring information.

Conclusions All the four combinatorial algorithms can be used in logic synthesis for minimization of a function, These four methods can also be used to finding the column multiplicity in functional decomposition. Graph coloring can be used for FSM minimization.

What to learn? How to see the possibility of using any of these problem formulations as parts of new problems from real life that may be given to you Descartes formulated the method: Every problem can be converted to a set of equations. Next the set can be converted to one equation and solved. Boole proposed to use this method to logic problems. The Petrick function, tautology, satisfiability are special problems within the area of Boolean Equations. These methods, based on tree branchings or solving algebraically formulas, can be extended to multiple-valued and other types of logic, they are very general. It is more important to understand how to convert any problems to these combinational problems than to remember efficient algorithms. Efficient algorithms can be found in hundreds of books and software collections, many in public domain. The covering, coloring, maximum clique and Boolean equations are used in hundreds of industrial and academic programs not only in logic synthesis but also in test, communication, computer networking, robotics, industrial applications, image processing and pattern recognition. They are also solved using mathematical programming, Genetic Algorithm and Artificial Intelligence techniques

Seyda Mohsida Sources