Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February / 29

Similar documents
Consistency Cubes A Fast, Efficient Method for exact Boolean Minimization.

Exact and heuristic minimization of Boolean functions

Chapter 4 Optimized Implementation of Logic Functions

Logic Minimization. Two-Level. University of California. Prof. Srinivas Devadas. Prof. Richard Newton Prof. Sanjit Seshia. Prof.

Week-I. Combinational Logic & Circuits

L6: Two-level minimization. Reading material

CS/EE 181a 2010/11 Lecture 4

CS/EE 181a 2008/09 Lecture 4

UNIT 5 KARNAUGH MAPS Spring 2011

PLA Minimization for Low Power VLSI Designs

Digital Circuit And Logic Design I. Lecture 4

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

ECE 3060 VLSI and Advanced Digital Design

Unit 6. Quine-McClusky Method. Unit 6 1

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

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Two-level logic minimization: an overview

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

Logic Synthesis and Verification

ELC224C. Karnaugh Maps

CS137: Electronic Design Automation. Today. Input Encoding. Output Encoding. State Encoding. Finite-State Machine. Encoding

Minimization of Boolean Expressions Using Matrix Algebra

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Logical Design of Digital Systems

Fundamental Algorithms for System Modeling, Analysis, and Optimization

Optimizations and Tradeoffs. Combinational Logic Optimization

DIGITAL TECHNICS I. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: LOGIC SYNTHESIS

Olivier Coudert Jean Christophe Madre Henri Fraisse. Bull Corporate Research Center. Rue Jean Jaures Les Clayes-sous-bois, FRANCE

Sequential Logic Optimization. Optimization in Context. Algorithmic Approach to State Minimization. Finite State Machine Optimization

A New Viewpoint on Two-Level Logic Minimization

DIGITAL ELECTRONICS & it0203 Semester 3

Quine-McCluskey (Tabular) Minimization

14:332:231 DIGITAL LOGIC DESIGN

Barbara Befani. Barbara Befani -

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

ENG2410 Digital Design Combinational Logic Circuits

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Contents. Chapter 3 Combinational Circuits Page 1 of 36

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Chapter 2 Combinational Logic Circuits

211: Computer Architecture Summer 2016

Sum-of-Generalized Products Expressions Applications and Minimization

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

This form sometimes used in logic circuit, example:

APPLICATION FOR LOGICAL EXPRESSION PROCESSING

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Working with Combinational Logic. Design example: 2x2-bit multiplier

Digital Logic Circuits - Switching Algebra - Combinational Circuits -

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Logic Synthesis and Verification. Two-Level Logic Minimization (1/2) Quine-McCluskey Procedure. Complexity

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

Spiral 1 / Unit 5. Karnaugh Maps

Simplifying Logic Circuits with Karnaugh Maps

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Logic Synthesis. Basic Definitions. k-cubes

1.1 Statements and Compound Statements

SAT-Solving: From Davis- Putnam to Zchaff and Beyond Day 3: Recent Developments. Lintao Zhang

CHAPTER III BOOLEAN ALGEBRA

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

(Boolean Algebra, combinational circuits) (Binary Codes and -arithmetics)

CE Optimized State Machines

Heuristic Minimization of Two Level Circuits

CSE 140: Components and Design Techniques for Digital Systems

PI = { a.b.c, ac d, b cd, ab d, bd} cd

20. Dynamic Programming II

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0.

The Samson-Mills-Quine theorem

LINEARIZATION OF FUNCTIONS REPRESENTED AS A SET OF DISJOINT CUBES AT THE AUTOCORRELATION DOMAIN

Digital Logic Design ENEE x. Lecture 12

WEEK 3.1 MORE ON KARNAUGH MAPS

CS 220: Discrete Structures and their Applications. Propositional Logic Sections in zybooks

A Boolean Approach to Qualitative Comparison. A summary by Richard Warnes. Charles Ragin (1987) THE COMPARATIVE METHOD. Chapter 6

The Samson-Mills-Quine theorem

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Karnaugh Maps Objectives

Unit 2 Session - 6 Combinational Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

Fundamentals of Computer Systems

On the Minimization of SOPs for Bi-Decomposable Functions

Determine the size of an instance of the minimum spanning tree problem.

HW 1 Solutions ECE 465, Fall 13. Shantanu Dutt UIC

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

Fundamentals of Computer Systems

Multilevel Logic Synthesis Algebraic Methods

Propositional Logic: Models and Proofs

CHAPTER 5 KARNAUGH MAPS

PAC Learning. prof. dr Arno Siebes. Algorithmic Data Analysis Group Department of Information and Computing Sciences Universiteit Utrecht

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

Charles Ragin s Fuzzy Set Qualitative Comparative Analysis (fsqca) Applied to Linguistic Summarization

1 Column Generation and the Cutting Stock Problem

Synthesis of 2-level Logic Exact and Heuristic Methods. Two Approaches

Combinatorial Logic Design Principles

Binary Decision Diagrams and Symbolic Model Checking

Transcription:

Configurational Analysis beyond the Quine-McCluskey algorithm Adrian Dușa University of Bucharest Milan, 8 February 2018 Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 1 / 29

Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 2 / 29

QCA and the Boolean minimization process If two or more instances of the phenomenon under investigation have only one circumstance in common, the circumstance in which alone all the instances agree, is the cause (or effect) of the given phenomenon. John Stuart Mill, A System of Logic, Vol. 1. 1843. p. 454. A B Y 1 1 1 1 0 1 1 1 Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 3 / 29

Boolean minimization algorithms classical Quine-McCluskey (QMC) improved QMC enhanced QMC (eqmc) Espresso CCubes All of these algorithms have a truth table as an input. Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 4 / 29

The truth table A B C D 1 0 0 0 0 2 0 0 0 1 3 0 0 1 0 4 0 0 1 1 5 0 1 0 0 6 0 1 0 1 7 0 1 1 0 8 0 1 1 1 9 1 0 0 0 10 1 0 0 1 11 1 0 1 0 12 1 0 1 1 13 1 1 0 0 14 1 1 0 1 15 1 1 1 0 16 1 1 1 1 These are all possible (16) configurations of 4 causal conditions, where the total number of rows is usually equal to 2 k, where k is the number of causal conditions. In fact, the real number of rows for a truth table is: k TT = l c (1) c=1 Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 5 / 29

The truth table A B C D OUT 1 0 0 0 0 2 0 0 0 1 3 0 0 1 0 4 0 0 1 1 5 0 1 0 0 0 6 0 1 0 1 1 7 0 1 1 0 8 0 1 1 1 9 1 0 0 0 1 10 1 0 0 1 11 1 0 1 0 1 12 1 0 1 1 13 1 1 0 0 14 1 1 0 1 0 15 1 1 1 0 16 1 1 1 1 0 These are all possible (16) configurations of 4 causal conditions, where the total number of rows is usually equal to 2 k, where k is the number of causal conditions. In fact, the real number of rows for a truth table is: k TT = l c c=1 Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 6 / 29

The truth table A B C D OUT 1 0 0 0 0? 2 0 0 0 1? 3 0 0 1 0? 4 0 0 1 1? 5 0 1 0 0 0 6 0 1 0 1 1 7 0 1 1 0? 8 0 1 1 1? 9 1 0 0 0 1 10 1 0 0 1? 11 1 0 1 0 1 12 1 0 1 1? 13 1 1 0 0? 14 1 1 0 1 0 15 1 1 1 0? 16 1 1 1 1 0 Main solution types: Conservative (complex) solution: minimization based on the observed positive output configurations only Parsimonious solution: the observed positive output configurations plus the remainders (aka don t cares in electrical engineering) Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 7 / 29

Classical QMC It is a two-level logic minimization, with: Step 1. Find all prime implicants (PIs) of a given set of initial configurations (with or without including the remainders) Step 2. Solve the PI chart that translates the PIs to the positive output configurations Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 8 / 29

Classical QMC step 1: finding the prime implicants verify all possible pairs of rows for each pair of rows, check all pairs of columns for differences if there is a single difference, minimize the pair of rows otherwise return This procedure is NP complete (nondeterministic polynomial time), with exponential increase in complexity and memory consumption. Configurational Analysis beyond the Quine-McCluskeyMilan, algorithm 8 February 2018 9 / 29

Classical QMC step 2: solving the PI chart 6 9 11 B x x AD x A D x x C D x Find all possible combinations of (a minimal number of) prime implicants that cover all initial positive output configurations. Two models in the parsimonious solution: 1 AD + B 2 AD + A D Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 10 / 29

Improved (step 1 of) QMC: the 2x y rule A B C D 9 1 0 0 0 11 1 0 1 0 1 0 0 Translated in the 3 k matrix: A B C D 68 2 1 1 1 71 2 1 2 1 65 2 1 0 1 2 68 71 = 65 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 11 / 29

Improved QMC Dușa (2010) A mathematical approach to the Boolean minimization problem, Quality & Quantity 44(1), 99-113 All possible prime implicants are found in the implicant matrix: for binary causal conditions, it has 3 k rows. A more general formula that is valid for multi-value causal conditions is: k IM = (l c + 1) (2) c=1 where l c is the number of levels for condition c = 1... k Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 12 / 29

Improved QMC Further mathematical tricks are applied to determine which pairs of rows can be minimized, to make sure the 2x y rule is applied only where possible, requiring either computation time or memory to store the matrix of minimizable pairs of rows (that has 2 k rows and k columns). Compared to classical QCA that has an upper complexity ceiling of about 10-11 causal conditions, it managed to: increase the complexity to about 14-15 causal conditions (the difference between 3 12 and 3 15 ) find solutions in many orders of magnitude less time than QMC Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 13 / 29

eqmc It only concentrates on the observed (positive and the negative) instances. A B C D OUT 6 0 1 0 1 1 9 1 0 0 0 1 11 1 0 1 0 1 5 0 1 0 0 0 14 1 1 0 1 0 16 1 1 1 1 0 A B C D 51 1 2 1 2 68 2 1 1 1 71 2 1 2 1 50 1 2 1 1 78 2 2 1 2 81 2 2 2 2 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 14 / 29

eqmc Supersets of the positive output configurations: 2 3 4 5 6 7 8 10 11 13 14 16 17 19 21 22 24 28 30 31 33 46 48 49 51 55 56 58 59 61 62 64 65 67 68 70 71 Supersets of the negative output configurations: 2 3 4 5 6 7 9 19 20 21 22 23 24 25 27 28 29 31 32 46 47 49 50 55 57 58 60 61 63 73 75 76 78 79 81 Difference: 8 10 11 13 14 16 17 30 33 48 51 56 59 62 64 65 67 68 70 71 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 15 / 29

eqmc A B C D 8 0 0 2 1 10 0 1 0 0 11 0 1 0 1 13 0 1 1 0 14 0 1 1 1 16 0 1 2 0 17 0 1 2 1 30 1 0 0 2 33 1 0 1 2 48 1 2 0 2 51 1 2 1 2 56 2 0 0 1 59 2 0 1 1 62 2 0 2 1 64 2 1 0 0 65 2 1 0 1 67 2 1 1 0 68 2 1 1 1 70 2 1 2 0 71 2 1 2 1 Non-redundant PIs: 8 10 30 56 A B C D 8 0 0 2 1 C D 10 0 1 0 0 B 30 1 0 0 2 AD 56 2 0 0 1 A D Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 16 / 29

eqmc Dușa and Thiem (2015) Enhancing the Minimization of Boolean and Multivalue Output Functions With eqmc, Journal of Mathematical Sociology 39, 92-108 The complexity level reached 18 causal conditions, with: a minimal memory consumption, decreasing from about 1.5 GB for the improved QMC, to some tens of MB for eqmc hundreds of times faster than the (improved) QMC Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 17 / 29

Espresso Developed more than 30 years ago at MIT Different method from QMC: instead of expanding a logic function with minterms, it iteratively manipulates the product terms in the ON, OFF and DC sets Can deal with any number of inputs and outputs It is a heuristic logic minimizer, with a very quick solution that is not guaranteed to be a global minimum (just very closely approximated) Not suitable for QCA, where we need all possible solutions for a given problem, not just the first quick one Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 18 / 29

CCubes Top - down From complex towards parsimonious Bottom - up From parsimonious towards more complex Definition: A prime implicant is the simplest possible, non-redundant, fully consistent superset of a positive output configuration. Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 19 / 29

CCubes A B C D 0 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 1 1 A B C D ~B OUT 1 1 1 0 0 0 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 20 / 29

CCubes ~A~D ~AD A~D AD 1 1 1 0 0 0 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 21 / 29

CCubes: partitioning the search space The implicant matrix from equation 2 can be partitioned to: S MV = k c=1 ( ) k c l s (3) c s=1 S CS = k c=1 ( ) k c 2 = c s=1 k c=1 ( ) k 2 c = 3 k 1 (4) c Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 22 / 29

CCubes: partitioning the search space The following equality (between equations 2 and 3) holds: ( ) k k k c (l c + 1) = 1 + l s c c=1 c=1 s=1 Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 23 / 29

CCubes: shortening the search space ~A~D ~AD A~D AD A D OUT 0 1 1 1 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 0 0 Not all combinations of 2 out of 4 conditions are meaningful / useful Concentrate only on the observed combinations, which are already found in the truth table Both AD and A D are fully consistent with the positive output, because they are not found in the negative output configurations. Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 24 / 29

CCubes: search depth Usually, about half of the entire search space is void, does not produce any prime implicants. where: P = prime implicants k c=1 U = unique subsets pf the prime implicants ( ) k c l s = P + U + N (5) c s=1 N = non prime implicants (supersets of the negative configurations) Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 25 / 29

CCubes: search depth and min.pin Check after each complexity level if: the PI chart can be solved the PI chart can be minimally solved: the disjunctive solution has the same length as the one from the previous level of complexity the PIs generated at the current complexity level contribute to minimally solving the PI chart (argument min.pin) Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 26 / 29

Performance benchmark hundreds of times faster than eqmc works with up to 30 conditions (compared to a maximum of 18 for eqmc) the Espresso challenge: 1000 random samples, 20 conditions and 20 cases Espresso x = 2.017 seconds s = 1.277 seconds CCubes x = 0.941 seconds s = 0.550 seconds x MP = 0.571 seconds Dușa (2018, forthcoming) Consistency Cubes: A Fast, Efficient Method for exact Boolean Minimization., R Journal. Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 27 / 29

CCubes: pseudo-counterfactual method CCubes does not explicitly uses the remainders but it always finds exactly the same solutions as the classical QMC when including the remainders it can be used to find intermediate solutions it can be used for ESA, by excluding the problematic remainders (which are added to the set of negative output configurations) Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 28 / 29

Thank you Dușa (2018, forthcoming) QCA with R. A comprehensive resource. https://bookdown.org/dusadrian/qcabook/ dusa.adrian@unibuc.ro Configurational Analysis beyond the Quine-McCluskey Milan, algorithm 8 February 2018 29 / 29