Binary Decision Diagrams

Size: px
Start display at page:

Download "Binary Decision Diagrams"

Transcription

1 Binar Decision Diagrams Ma 3,

2 Overview Boolean functions Possible representations Binar decision trees Binar decision diagrams Ordered binar decision diagrams Reduced ordered binar decision diagrams Operations on ordered binar decision diagrams Validit, satisfiabilit, function equivalence Function composition operations 2

3 Boolean functions A boolean function maps boolean inputs (0s and 1s) to a boolean result (0 or 1). Basic functions: 0 = 1, 1 = 0 (complementation). + = 0 = = 0 (disjunction, like addition). = 1 = = 1 (conjunction, like multiplication). = 1 (eclusive or). Comple functions: h(,, ) = + ( ) Function composition: h = f + g Goal: represent models and CTL formulas. 3

4 Representing boolean functions Goal: efficientl implement useful operations: Validit Satisfiabilit Equivalence of functions Approaches: Truth tables. Propositional formulas. Propositional formulas in a canonical form. (e.g. CNF, DNF) 4

5 Binar decision trees Truth-table representation: ( + ) Tree representation: 0 0 Evaluation: Use the dotted edge if the variable is 0. Use the solid edge if the variable is 1. Structure depends on the input/output relation, not on the formula definition. 5

6 Problems Trees no more efficient than truth tables. Tree structure depends on the variable ordering: Repeated variables can create unreachable edges. 6

7 Binar decision diagrams (BDDs) BDDs: Trees with sharing (DAGs). Reduction: Eliminate redundant information from a BDD. Share redundant subgraphs. 7

8 Reduction rules Multiple 0 s and 1 s clearl redundant. Eample: 0 0 becomes: 8

9 Reduction rules, contd. If a node has the same child at both outgoing edges, the node is redundant. If two nodes represent the same variable and have the same descendants, one is redundant. 9

10 Variable ordering Reduction opportunities depend on variable ordering. Eamples:

11 Summar Reduction rules: Coalescing duplicate terminal nodes. Removal of redundant tests. Coalescing duplicate non-terminals. No rules introduce terminals, so the first rule can be applied all at once. Otherwise, one application can make opportunities for others: = The rules are confluent. 11

12 Operations on BDDs Desirable predicates: Validit Satisfiabilit Equivalence of functions Desirable operations: f f + g f g f g 12

13 Predicates Validit: Is the result alwas 1? Satisfiabilit: Is the result ever 1? Ideall: Validit: check for absence of 0. Satisfiabilit: check for presence of 1. Problem: Repeated variables impl that some edges might be unreachable. Eample: BDD for + : Solution: Evaluate on all inputs (truth-table approach). 13

14 Equivalence of functions Ideall: Check whether BDDs have the same structure. Problem: structure sensitive to: Variable ordering Repeated variables Redundant nodes Solution: Evaluate both functions on all inputs (again, the truth-table solution). 14

15 Operations f: interchange 0 s and 1 s. f + g: If 1 reached in f, return 1. Otherwise, check g. Replace the 0 nodes of B f b B g. : : : f g: If 0 reached in f, return 0. Otherwise, check g. Replace the 1 nodes of B f b B g. Calculations efficient, but variables occur multipl in resulting paths. 15

16 Ordered BDDs (OBDDs) Problems with BDDs: Repeated variables cause inaccessible edges. Structure depends on variable ordering. Solution: Require a fied order for all paths. Ordered: [,, ]: Not ordered: An BDD can be converted to an order. 16

17 Properties of OBDDs No duplication implies no inaccessible edges. Validit: absence of 0. Satisfiabilit: presence of 1. Implication: f g f g (f g). Check f g for validit. Equivalentl, check that f g has no 1 (alwas false). 17

18 Properties of reduced OBDDs Absence of redundant variables: A reduced OBDD contains no redundant variables. Eample: OBDD: non-obdd: Equivalence of functions: Reduced OBDDs must be identical. Compleit linear in OBDD sie. 18

19 Properties of reduced OBDDs, contd. Validit: Reduced OBDD equivalent to 1. Satisfiabilit: Reduced OBDD not equivalent to 0. Implication: f g iff reduced OBDD of f g is equivalent to 0. Constant time operations. 19

20 OBDDs and variable ordering Variable ordering affects reduced OBDD sie, which affects manipulation costs. ( ) ( ) ( ) [ 1, 2, 3, 4, 5, 6 ] : [ 1, 3, 5, 2, 4, 6 ] : For ( ) ( )... ( 2n 1 + 2n ): [ 1, 2,..., 2n ] 2n + 2 nodes. [ 1, 3,..., 2n 1, 2, 4,... 2n ] 2 n+1 nodes. Problem: the same ordering must be used for all functions. 20

21 Reduction for OBDDs Efficient bottom-up algorithm. Idea: label nodes, giving redundant nodes the same label. Labeling allows efficient comparison of subgraphs. Terminolog: l(n): the child at the dotted edge of n. h(n): the child at the solid edge of n. 21

22 Labeling algorithm 1. Label all 0 s with 1, all 1 s with If l(n) = h(n), label n with l(n). 3. If there is a node m with the same variable such that l(n) = l(m) and h(n) = h(m), label n with m s label. 4. Otherwise, pick a fresh label for n Appl reduction rules, bottom-up. If two children have the same label, the are the same. 22

23 Compleit Visit each node: O(n) Check whether children identical: O(1) Search for a predecessor with the same variable and the same children. B first sorting: O(log n) 23

24 Boolean functions Goal: combine OBDDs so that the result is an OBDD. Operations: f + g, f g, f g. Observation: f op g trivial if f and g are constant functions. Eample: f = 0, g = 1 f + g = = 0 Inductive strateg: Compute f op g on n variables in terms of f op g on n 1 variables. Eventuall reach a constant function. 24

25 Shannon epansion Law of the ecluded middle: = 0 or = 1. f[0/], f[1/] have fewer variables than f. Idea: redefine f in terms of f[0/] and f[1/]: + combines, but f[0/] + f[1/] is wrong. Drop the component that does not use s value. α: = 0 drop α. = 1 keep α. α: = 0 keep α. = 1 drop α. f = f[0/] + f[1/] f op g = (f op g)[0/] + (f op g)[1/] = (f[0/] op g[0/]) + (f[1/] op g[1/]) 25

26 Implementing appl(op, B f, B g ) f op g = (f[0/] op g[0/])+ (f[1/] op g[1/]) Construct OBDDs for f[0/], f[1/] from an OBDD for f. If is at the root: f[0/]: the target of the dotted edge. f[1/]: the target of the solid edge. Inductive algorithm eliminates all variables, so choose the root each time. OBDDs, so f and g variables in the same order. 26

27 appl algorithm Cases: Both roots are terminals: Appl op directl. Both roots associated with : app(op, l(r f ), l(r g )) app(op, h(r f ), h(r g )) Incompatible roots: deferred. These rules are sufficient if all paths contain all variables. Result: a full binar tree. Reduction required. 27

28 Connection to Shannon epansion f op g = f[0/] op g[0/] + f[1/] op g[1/] BDDs: : 1 0 : f[0/] op g[0/] : f[1/] op g[1/] : app(op, l(r f ), l(r g )) 0 0 app(op, h(r f ), h(r g )) Final sum: app(op, l(r f ), l(r g )) 0 app(op, h(r f ), h(r g )) 28

29 Eample Compute product: : 1 a : 1 b 2 a 3 a 0 4 a 1 5 a 2 b 3 b 0 4 b 1 5 b 29

30 Completing the appl algorithm Remaining cases: One root a variable, the other a constant. The two roots represent different variables. OBDD propert: If the variable earlier in the ordering is not the root of one tree, it is not in that tree. Idea: Rules: r f < r g : op op app(op, l(r f ), r g ) app(op, h(r f ), r g ) r g < r f : app(op, r f, l(r g )) app(op, r f, h(r g )) 30

31 Eample Compute product: 1 a 3 a 0 4 a 1 5 a 1 b 3 b 2 b 0 4 b 1 5 b 31

32 Compleit Observation: appl algorithm often creates a full binar tree. 2 n nodes, for n variables. Problems: Repeated computations. Distinct computations give the same result. Memoisation addresses the first problem. Onl compute each app(op, n, m) once. Compleit O( B f B g ). 32

33 Quantifiers (.f)( 1,..., n ) = 1 iff: f returns 1 for these values when = 0, or f returns 1 for these values when = 1. Encoding:.f = f[0/] + f[1/] (.f)( 1,..., n ) = 1 iff: f returns 1 for these values when = 0, and f returns 1 for these values when = 1. Encoding:.f = f[0/] f[1/] 33

34 Computing restrict(c,, B) For appl, is alwas the root variable. f[0/] is the left child of the root. f[1/] is the right child of the root. For restrict, can be an variable. For each, connect all incoming edges to c child. Eample: ( ) : [0/] : 34

35 Implementing quantification.f = app(+, restrict(0,, B f ), restrict(1,, B f )).f = app(, restrict(0,, B f ), restrict(1,, B f )) Eample, d.f: a b c d e Restrictions: a a b c e b c e Sum: b l + b r = b c l + c r = c a = 0 e l + e r = e = e r = e 35

36 Improving efficienc Most of the tree is not affected b restrictions. Thus most of the tree is duplicated in the result (e.g. b l + b r ). More efficient approach: replace quantified node b the sum of the children. Eample: b a c d e a b c e Nested quantification NP-complete. 36

37 Compleit summar input time compleit reduce B O( B log B ) appl Br f, Br g O( Br f Br g ) restrict Br O( Br log Br ) eists Br NP-complete Br: a reduced OBDD. 37

38 Comparison with other approaches Compact Sat. Val. Prop. formulas + DNF formulas 0 + CNF formulas 0 + Truth tables Reduced OBDDs Prop. formulas DNF formulas + CNF formulas + Truth tables Reduced OBDDs

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #12 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de December 13, 2016 c JPK

More information

Decision Procedures for Satisfiability and Validity in Propositional Logic

Decision Procedures for Satisfiability and Validity in Propositional Logic Decision Procedures for Satisfiability and Validity in Propositional Logic Meghdad Ghari Institute for Research in Fundamental Sciences (IPM) School of Mathematics-Isfahan Branch Logic Group http://math.ipm.ac.ir/isfahan/logic-group.htm

More information

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams An Introduction and Some Applications Manas Thakur PACE Lab, IIT Madras Manas Thakur (IIT Madras) BDDs 1 / 25 Motivating Example Binary decision tree for a truth table Manas Thakur

More information

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams Literature Some pointers: H.R. Andersen, An Introduction to Binary Decision Diagrams, Lecture notes, Department of Information Technology, IT University of Copenhagen Tools: URL:

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

The Maze Generation Problem is NP-complete

The Maze Generation Problem is NP-complete The Mae Generation Problem is NP-complete Mario Alviano Department of Mathematics, Universit of Calabria, 87030 Rende (CS), Ital alviano@mat.unical.it Abstract. The Mae Generation problem has been presented

More information

Boolean decision diagrams and SAT-based representations

Boolean decision diagrams and SAT-based representations Boolean decision diagrams and SAT-based representations 4th July 200 So far we have seen Kripke Structures 2 Temporal logics (and their semantics over Kripke structures) 3 Model checking of these structures

More information

Symbolic Model Checking with ROBDDs

Symbolic Model Checking with ROBDDs Symbolic Model Checking with ROBDDs Lecture #13 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de December 14, 2016 c JPK Symbolic

More information

Propositional and Predicate Logic - II

Propositional and Predicate Logic - II Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic

More information

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for? Computer Engineering and Networks Overview Discrete Event Systems Verification of Finite Automata Lothar Thiele Introduction Binary Decision Diagrams Representation of Boolean Functions Comparing two circuits

More information

Binary Decision Diagrams Boolean Functions

Binary Decision Diagrams Boolean Functions Binary Decision Diagrams Representation of Boolean Functions BDDs, OBDDs, ROBDDs Operations Model-Checking over BDDs 72 Boolean functions:b = {0,1}, f :B B B Boolean Functions Boolean expressions: t ::=

More information

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #13 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de June 5, 2012 c JPK Switching

More information

CTL Model Checking. Wishnu Prasetya.

CTL Model Checking. Wishnu Prasetya. CTL Model Checking Wishnu Prasetya wishnu@cs.uu.nl www.cs.uu.nl/docs/vakken/pv Background Example: verification of web applications à e.g. to prove existence of a path from page A to page B. Use of CTL

More information

Binary Decision Diagrams. Graphs. Boolean Functions

Binary Decision Diagrams. Graphs. Boolean Functions Binary Decision Diagrams Graphs Binary Decision Diagrams (BDDs) are a class of graphs that can be used as data structure for compactly representing boolean functions. BDDs were introduced by R. Bryant

More information

Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae

Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae 1/15 Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae Sylvie Coste-Marquis Daniel Le Berre Florian Letombe Pierre Marquis CRIL, CNRS FRE 2499 Lens, Université d Artois,

More information

Basing Decisions on Sentences in Decision Diagrams

Basing Decisions on Sentences in Decision Diagrams Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence Basing Decisions on Sentences in Decision Diagrams Yexiang Xue Department of Computer Science Cornell University yexiang@cs.cornell.edu

More information

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

SAT based BDD solver for Quantified Boolean Formulas

SAT based BDD solver for Quantified Boolean Formulas SAT based BDD solver for Quantified Boolean Formulas Gilles Audemard and Lakhdar Saïs CRIL CNRS Université d Artois rue Jean Souvraz SP-8 F-62307 Lens Cede France {audemard,sais}@cril.univ-artois.fr Abstract

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms P Formula Simplification, Essential Laws, Normal Forms Lila Kari University of Waterloo P Formula Simplification, Essential Laws, Normal CS245, Forms Logic and Computation 1 / 26 Propositional calculus

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

2.5.2 Basic CNF/DNF Transformation

2.5.2 Basic CNF/DNF Transformation 2.5. NORMAL FORMS 39 On the other hand, checking the unsatisfiability of CNF formulas or the validity of DNF formulas is conp-complete. For any propositional formula φ there is an equivalent formula in

More information

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams Binary Decision Diagrams (BDDs) are a class of graphs that can be used as data structure for compactly representing boolean functions. BDDs were introduced by R. Bryant in 1986.

More information

Propositional and First Order Reasoning

Propositional and First Order Reasoning Propositional and First Order Reasoning Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p p Clause: disjunction of literals q \/ p \/ r given by

More information

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: Lintao Zhang Announcement Project proposals due

More information

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits Logic and Computer Design Fundamentals Chapter 2 Combinational Logic Circuits Part 1 Gate Circuits and Boolean Equations Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. Overview Part 1 Gate

More information

BDD Based Upon Shannon Expansion

BDD Based Upon Shannon Expansion Boolean Function Manipulation OBDD and more BDD Based Upon Shannon Expansion Notations f(x, x 2,, x n ) - n-input function, x i = or f xi=b (x,, x n ) = f(x,,x i-,b,x i+,,x n ), b= or Shannon Expansion

More information

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams Logic Circuits Design Seminars WS2010/2011, Lecture 2 Ing. Petr Fišer, Ph.D. Department of Digital Design Faculty of Information Technology Czech Technical University in Prague

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

More information

Quantified Boolean Formulas: Complexity and Expressiveness

Quantified Boolean Formulas: Complexity and Expressiveness Dagstuhl SAT Interactions 2012 Quantified Boolean Formulas: Complexity and Expressiveness Uwe Bubeck University of Paderborn 20.11.2012 Outline Introduction Free Variables and Equivalence Complexity Expressiveness

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 0, Winter 208 Design and Analsis of Algorithms Lecture 6: NP-Completeness, Part 2 Class URL: http://vlsicad.ucsd.edu/courses/cse0-w8/ The Classes P and NP Classes of Decision Problems P: Problems for

More information

CS 395T Computational Learning Theory. Scribe: Mike Halcrow. x 4. x 2. x 6

CS 395T Computational Learning Theory. Scribe: Mike Halcrow. x 4. x 2. x 6 CS 395T Computational Learning Theory Lecture 3: September 0, 2007 Lecturer: Adam Klivans Scribe: Mike Halcrow 3. Decision List Recap In the last class, we determined that, when learning a t-decision list,

More information

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc CS250: Discrete Math for Computer Science L6: CNF and Natural Deduction for PropCalc How to Simplify a PropCalc Formula: (p q) ((q r) p) How to Simplify a PropCalc Formula: 1. Get rid of s using def. of

More information

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Journal of Artificial Intelligence Research 1 (1993) 1-15 Submitted 6/91; published 9/91 Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Enrico Giunchiglia Massimo

More information

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false. Section 1.2 Propositional Equivalences A tautology is a proposition which is always true. Classic Example: P P A contradiction is a proposition which is always false. Classic Example: P P A contingency

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

On the Relative Efficiency of DPLL and OBDDs with Axiom and Join

On the Relative Efficiency of DPLL and OBDDs with Axiom and Join On the Relative Efficiency of DPLL and OBDDs with Axiom and Join Matti Järvisalo University of Helsinki, Finland September 16, 2011 @ CP M. Järvisalo (U. Helsinki) DPLL and OBDDs September 16, 2011 @ CP

More information

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel Propositional Logic Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

Boolean Algebra. Philipp Koehn. 9 September 2016

Boolean Algebra. Philipp Koehn. 9 September 2016 Boolean Algebra Philipp Koehn 9 September 2016 Core Boolean Operators 1 AND OR NOT A B A and B 0 0 0 0 1 0 1 0 0 1 1 1 A B A or B 0 0 0 0 1 1 1 0 1 1 1 1 A not A 0 1 1 0 AND OR NOT 2 Boolean algebra Boolean

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

Exercises 1 - Solutions

Exercises 1 - Solutions Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note

More information

Lecture 2: Proof of Switching Lemma

Lecture 2: Proof of Switching Lemma Lecture 2: oof of Switching Lemma Yuan Li June 25, 2014 1 Decision Tree Instead of bounding the probability that f can be written as some s-dnf, we estimate the probability that f can be computed by a

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

This is an author-deposited version published in : Eprints ID : 16897

This is an author-deposited version published in :   Eprints ID : 16897 Open Archive TOULOUSE Archive Ouverte (OATAO) OATAO is an open access repository that collects the work of Toulouse researchers and makes it freely available over the web where possible. This is an author-deposited

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

A Collection of Problems in Propositional Logic

A Collection of Problems in Propositional Logic A Collection of Problems in Propositional Logic Hans Kleine Büning SS 2016 Problem 1: SAT (respectively SAT) Instance: A propositional formula α (for SAT in CNF). Question: Is α satisfiable? The problems

More information

13th International Conference on Relational and Algebraic Methods in Computer Science (RAMiCS 13)

13th International Conference on Relational and Algebraic Methods in Computer Science (RAMiCS 13) 13th International Conference on Relational and Algebraic Methods in Computer Science (RAMiCS 13) Relation Algebras, Matrices, and Multi-Valued Decision Diagrams Francis Atampore and Dr. Michael Winter

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Exercises - Solutions

Exercises - Solutions Chapter 1 Exercises - Solutions Exercise 1.1. The first two definitions are equivalent, since we follow in both cases the unique path leading from v to a sink and using only a i -edges leaving x i -nodes.

More information

Formal Verification Methods 1: Propositional Logic

Formal Verification Methods 1: Propositional Logic Formal Verification Methods 1: Propositional Logic John Harrison Intel Corporation Course overview Propositional logic A resurgence of interest Logic and circuits Normal forms The Davis-Putnam procedure

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Please evaluate this course on Axess. Your comments really do make a difference. Announcements Problem Set 8 due tomorrow at 12:50PM sharp with one late day. Problem Set 9 out,

More information

Version January Please send comments and corrections to

Version January Please send comments and corrections to Mathematical Logic for Computer Science Second revised edition, Springer-Verlag London, 2001 Answers to Exercises Mordechai Ben-Ari Department of Science Teaching Weizmann Institute of Science Rehovot

More information

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms Assaf Kfoury 5 February 2017 Assaf Kfoury, CS 512, Spring

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach

Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach Yong Lai, Dayou Liu, Shengsheng Wang College of Computer Science and Technology Jilin University, Changchun

More information

SAT Modulo ODE: A Direct SAT Approach to Hybrid Systems

SAT Modulo ODE: A Direct SAT Approach to Hybrid Systems Welcome ATVA 2008 SAT Modulo ODE: A Direct SAT Approach to Hbrid Sstems Andreas Eggers, Martin Fränzle, and Christian Herde DFG Transregional Collaborative Research Center AVACS Outline Motivation Bounded

More information

Binary decision diagrams for security protocols

Binary decision diagrams for security protocols for Instytut Informatyki Teoretycznej i Stosowanej Politechnika Częstochowska 4 czerwca 2012 roku 1 2 3 4 Infrastructure with Intruder Threat template 5 References BDD definition Definition An BDD G

More information

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Outline for Today Recap from Last Time What is NP-completeness again, anyway? 3SAT A simple, canonical NP-complete problem. Independent Sets Discovering a new NP-complete problem.

More information

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams Sungho Kang Yonsei University Outline Representing Logic Function Design Considerations for a BDD package Algorithms 2 Why BDDs BDDs are Canonical (each Boolean function has its

More information

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ} 6.841 Advanced Complexity Theory February 28, 2005 Lecture 8 Lecturer: Madhu Sudan Scribe: Arnab Bhattacharyya 1 A New Theme In the past few lectures, we have concentrated on non-uniform types of computation

More information

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. De Morgan s a Laws De Morgan s laws say that (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. Here is a proof for the first law: φ 1 φ 2 (φ 1 φ 2 ) φ 1 φ 2 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 a Augustus DeMorgan

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC

More information

Safety and Reliability of Embedded Systems

Safety and Reliability of Embedded Systems (Sicherheit und Zuverlässigkeit eingebetteter Systeme) Fault Tree Analysis Mathematical Background and Algorithms Prof. Dr. Liggesmeyer, 0 Content Definitions of Terms Introduction to Combinatorics General

More information

Toda s Theorem: PH P #P

Toda s Theorem: PH P #P CS254: Computational Compleit Theor Prof. Luca Trevisan Final Project Ananth Raghunathan 1 Introduction Toda s Theorem: PH P #P The class NP captures the difficult of finding certificates. However, in

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 2018 Design and Analsis of Algorithms Lecture 15: NP-Completeness Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ From Application to Algorithm Design Find all maimal regularl-spaced,

More information

NP-Complete Problems. More reductions

NP-Complete Problems. More reductions NP-Complete Problems More reductions Definitions P: problems that can be solved in polynomial time (typically in n, size of input) on a deterministic Turing machine Any normal computer simulates a DTM

More information

Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST

Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST moonzoo@cs.kaist.ac.kr 1 Overview 2.1 Boolean operators 2.2 Propositional formulas 2.3 Interpretations 2.4 Logical Equivalence and substitution

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

CDM. Algorithms for Propositional Logic

CDM. Algorithms for Propositional Logic CDM Algorithms for Propositional Logic Klaus Sutner Fall 2017 1 Boolean Decision Problems SAT Solvers Refutation and Resolution Binary Decision Diagrams Decision Problems 3 Recall the standard decision

More information

Maximum 3-SAT as QUBO

Maximum 3-SAT as QUBO Maximum 3-SAT as QUBO Michael J. Dinneen 1 Semester 2, 2016 1/15 1 Slides mostly based on Alex Fowler s and Rong (Richard) Wang s notes. Boolean Formula 2/15 A Boolean variable is a variable that can take

More information

Worst-Case Upper Bound for (1, 2)-QSAT

Worst-Case Upper Bound for (1, 2)-QSAT Worst-Case Upper Bound for (1, 2)-QSAT Minghao Yin Department of Computer, Northeast Normal University, Changchun, China, 130117 ymh@nenu.edu.cn Abstract. The rigorous theoretical analysis of the algorithm

More information

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013 Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of

More information

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. Lecture #14: 0.0.1 NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. 0.0.2 Preliminaries: Definition 1 n abstract problem Q is a binary relations on a set I of

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

CSE 555 HW 5 SAMPLE SOLUTION. Question 1. CSE 555 HW 5 SAMPLE SOLUTION Question 1. Show that if L is PSPACE-complete, then L is NP-hard. Show that the converse is not true. If L is PSPACE-complete, then for all A PSPACE, A P L. We know SAT PSPACE

More information

Foundations of Databases

Foundations of Databases Foundations of Databases (Slides adapted from Thomas Eiter, Leonid Libkin and Werner Nutt) Foundations of Databases 1 Quer optimization: finding a good wa to evaluate a quer Queries are declarative, and

More information

Mathematical Logic Propositional Logic - Tableaux*

Mathematical Logic Propositional Logic - Tableaux* Mathematical Logic Propositional Logic - Tableaux* Fausto Giunchiglia and Mattia Fumagalli University of Trento *Originally by Luciano Serafini and Chiara Ghidini Modified by Fausto Giunchiglia and Mattia

More information

Model Checking for Propositions CS477 Formal Software Dev Methods

Model Checking for Propositions CS477 Formal Software Dev Methods S477 Formal Software Dev Methods Elsa L Gunter 2112 S, UIU egunter@illinois.edu http://courses.engr.illinois.edu/cs477 Slides based in part on previous lectures by Mahesh Vishwanathan, and by Gul gha January

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals Chapter 2 Combinational Logic Circuits Part Gate Circuits and Boolean Equations Charles Kime & Thomas Kaminski 28 Pearson Education, Inc. (Hperlinks are active in

More information

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

More information

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation Knowledge Bases and Databases Part 1: First-Order Queries Diego Calvanese Faculty of Computer Science Master of Science in Computer Science A.Y. 2007/2008 Overview of Part 1: First-order queries 1 First-order

More information

Boolean Algebra and Logic Gates

Boolean Algebra and Logic Gates Boolean Algebra and Logic Gates Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National Universit Prof. Wangrok Oh(CNU) / 5 Overview Aiomatic Definition of Boolean Algebra 2 Basic Theorems

More information

Non-Deterministic Time

Non-Deterministic Time Non-Deterministic Time Master Informatique 2016 1 Non-Deterministic Time Complexity Classes Reminder on DTM vs NDTM [Turing 1936] (q 0, x 0 ) (q 1, x 1 ) Deterministic (q n, x n ) Non-Deterministic (q

More information

Correctness of Dijkstra s algorithm

Correctness of Dijkstra s algorithm Correctness of Dijkstra s algorithm Invariant: When vertex u is deleted from the priority queue, d[u] is the correct length of the shortest path from the source s to vertex u. Additionally, the value d[u]

More information

Solutions to Homework I (1.1)

Solutions to Homework I (1.1) Solutions to Homework I (1.1) Problem 1 Determine whether each of these compound propositions is satisable. a) (p q) ( p q) ( p q) b) (p q) (p q) ( p q) ( p q) c) (p q) ( p q) (a) p q p q p q p q p q (p

More information

Advanced Topics in Theoretical Computer Science

Advanced Topics in Theoretical Computer Science Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica Sofronie-Stokkermans Universität Koblenz-Landau e-mail: sofronie@uni-koblenz.de 1 Contents Recall: Turing

More information

Exact Equations. M(x,y) + N(x,y) y = 0, M(x,y) dx + N(x,y) dy = 0. M(x,y) + N(x,y) y = 0

Exact Equations. M(x,y) + N(x,y) y = 0, M(x,y) dx + N(x,y) dy = 0. M(x,y) + N(x,y) y = 0 Eact Equations An eact equation is a first order differential equation that can be written in the form M(, + N(,, provided that there eists a function ψ(, such that = M (, and N(, = Note : Often the equation

More information

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015 CS 374: Algorithms & Models of Computation, Spring 2015 NP Completeness Lecture 23 November 19, 2015 Chandra & Lenny (UIUC) CS374 1 Spring 2015 1 / 37 Part I NP-Completeness Chandra & Lenny (UIUC) CS374

More information

This lecture covers Chapter 7 of HMU: Properties of CFLs

This lecture covers Chapter 7 of HMU: Properties of CFLs This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal

More information

Computational Boolean Algebra. Pingqiang Zhou ShanghaiTech University

Computational Boolean Algebra. Pingqiang Zhou ShanghaiTech University Computational Boolean Algebra Pingqiang Zhou ShanghaiTech University Announcements Written assignment #1 is out. Due: March 24 th, in class. Programming assignment #1 is out. Due: March 24 th, 11:59PM.

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Polynomial-Time Reduction Desiderata'. Suppose we could solve X in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Reduction.

More information

Implementing Semantic Merging Operators using Binary Decision Diagrams

Implementing Semantic Merging Operators using Binary Decision Diagrams Implementing Semantic Merging Operators using Binary Decision Diagrams Nikos Gorogiannis and Anthony Hunter 21st February 2008 {n.gkorogiannis,a.hunter}@cs.ucl.ac.uk Department of Computer Science, University

More information

On the satisfiability problem for a 4-level quantified syllogistic and some applications to modal logic

On the satisfiability problem for a 4-level quantified syllogistic and some applications to modal logic On the satisfiability problem for a 4-level quantified syllogistic and some applications to modal logic Domenico Cantone and Marianna Nicolosi Asmundo Dipartimento di Matematica e Informatica Università

More information

Chapter 2 Combinational

Chapter 2 Combinational Computer Engineering 1 (ECE290) Chapter 2 Combinational Logic Circuits Part 1 Gate Circuits and Boolean Equations HOANG Trang Reference: 2008 Pearson Education, Inc. Overview Part 1 Gate Circuits and Boolean

More information