Sungho Kang Yonsei University

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

CSCI 115 Chapter 6 Order Relations and Structures.
Relations Relations on a Set. Properties of Relations.
Chapter 7 Relations : the second time around
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.
Partially Ordered Sets (POSets)
Relations Chapter 9.
Chapter 6. Order Relations and Structure
CSE 460: Switching Theory David M. Zar
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Sets, Relations, and Lattices
--- outputs logical functions of inputs --- new outputs appear shortly after changed inputs (propagation delay) --- no feedback loops --- no clock Sequential.
Mathematical Preliminaries
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Chap. 7 Relations: The Second Time Around
CSCI 115 Course Review.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Boolean Algebra.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
CHAPTER 2 Boolean algebra and Logic gates
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
Review: Discrete Mathematics and Its Applications
Chapter 5 Relations and Operations
CSCE 355 Foundations of Computation
Unit-III Algebraic Structures
Partial Orders.
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Equivalence Relations
Relations Chapter 9.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
Set, Combinatorics, Probability & Number Theory
Relations and Digraphs
CS 2210:0001 Discrete Structures Sets and Functions
CS 105 Digital Logic Design
Relations: Operations & Properties
Chapter 3 Relation and Function Homework 4 For each of the following relations on set A = { 1,2,3,4 }, check each of them whether they are reflexive, irreflexive,
CS201: Data Structures and Discrete Mathematics I
CSCE 355 Foundations of Computation
IS 2150 / TEL 2810 Information Security & Privacy
Boolean Algebra.
Set Operations Section 2.2.
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
Sungho Kang Yonsei University
IS 2150 / TEL 2810 Introduction to Security
Review: Discrete Mathematics and Its Applications
Introduction to Relations and Functions
MCS680: Foundations Of Computer Science
Applied Discrete Mathematics Week 3: Sets
Heuristic Minimization of Two Level Circuits
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
IS 2150 / TEL 2810 Introduction to Security
Foundations of Discrete Mathematics
IS 2150 / TEL 2810 Information Security & Privacy
DISCRETE MATHEMATICS.
Presentation transcript:

Sungho Kang Yonsei University Boolean Algebra Sungho Kang Yonsei University

Outline Set, Relations, and Functions Partial Orders Boolean Functions Don’t Care Conditions Incomplete Specifications

Element is a member of set Set Notation Sets and Relations Element is a member of set Element is not a member of set Cardinality (number of members) of set Set is a subset of The empty set (a member of all sets) The complement of set The universe:

Set Notation Inclusion () Proper Inclusion () Complementation Sets and Relations Inclusion () Proper Inclusion () Complementation Intersection () Union () Difference

(the set of all subsets of set V) Power Sets Sets and Relations 2V = {S|S  V} 2V : The power set of set V (the set of all subsets of set V) |2V|=2|V| : The cardinality of a power set is a power of 2

Power sets are Boolean Algebras Sets and Relations 3-member set 1 subset with 0 members 3 subsets with 1 members 3 subsets with 2 members 1 subset with 3 members Power sets are Boolean Algebras

Set is unordered ( ) denotes Ordered Set Cartesian Products Sets and Relations The Cartesian Product of sets A and B is denoted A x B Suppose , then Set is unordered ( ) denotes Ordered Set

The Cartesian Product of sets A and B is denoted A x B Binary Relations Sets and Relations The Cartesian Product of sets A and B is denoted A x B A x B consists of all possible ordered pairs (a,b) such that and A subset is called a Binary Relation Graphs, Matrices, and Boolean Algebras can be viewed as binary relations

Binary Relations as Graphs or Matrices Sets and Relations a b b d f c d a 1 0 0 1 1 1 f c Bipartite Graph Rectangular Matrix

Properties of Binary Relations Sets and Relations A binary relation can be reflexive, and/or transitive, and/or symmetric, and/or antisymmetric

Notation for Binary Relations Sets and Relations If , we say that is the domain of the relation , and that is the range. If , we say that the pair is in the relation , or .

Example: “a times b = 12” Sets and Relations 1 2 3 12 6 4

reflexive if and only if for every vertex Reflexive Binary Relations Sets and Relations a c b d a A binary relation is reflexive if and only if for every vertex b c d

Non-Reflexive Binary Relations Sets and Relations a c b d Non-Reflexivity implies that there exists such that . Here is such a . a b c d

Transitive Binary Relations Sets and Relations e d c b a A binary relation is transitive if and only if every (u,v,w) path is triangulated by a direct (u,w) edge. This is the case here, so R is transitive.

A binary relation is not transitive if there Non-Transitive Binary Relations Sets and Relations e d c b a Edge (a,e) is missing A binary relation is not transitive if there exists a path from u to w, through v that is not triangulated by a direct (u,w) edge Here (a,c,e) is such a path

Symmetric Binary Relations Sets and Relations A binary relation is symmetric if and only if every (u,v) edge is reciprocated by a (v,u) edge 1 2 3 12 6 4

non-symmetric if there exists an edge (u,v) not reciprocated by an Non-Symmetric Binary Relations Sets and Relations Edge (c,a) is missing A binary relation is non-symmetric if there exists an edge (u,v) not reciprocated by an edge (v,u) a c b d e

Antisymmetric Binary Relations Sets and Relations A binary relation is anti- symmetric if and only if no (u,v) edge is reciprocated by a (v,u) edge v=u e d c b a Not antisymmetric if any such edge is reciprocated : here

Functions Sets and Relations A function f are binary relations from set A (called the domain) to B (called the range) But, it is required that each a in A be associated with exactly 1 b in B For functions, it cannot be true that both (a,b) in R and (a,c) in R, b different from c

Combinational Logic (no DCs) => (0,1) Boolean Algebra The Binary Relation Sets and Relations The Binary Relation of Relations to Synthesis/Verification *DC=don’t care Partial Orders Combinational Logic (no DCs) => (0,1) Boolean Algebra Combinational Logic (with DCs) => Big Boolean Algebras Equivalence Relations Sequential Logic (no DCs) Compatibility Relations Sequential Logic (with DCs)

This graph defines path relation The Path Relation Sets and Relations e d c b a This graph defines path relation Relation is sometimes called Reachability

Equivalence Relations Sets and Relations e d c b a R is reflexive, symmetric, and transitive

NOT an equivalence relation: E An equivalence relation: R Equivalence Relations Sets and Relations e d c b a e d c b a This graph defines path relation This graph defines R NOT an equivalence relation: E An equivalence relation: R

a c a c b b d e d e The Cycle Relation Sets and Relations e d c b a e d c b a This graph defines path relation These are called the Strongly Connected Components of G

Other Binary Relations Sets and Relations Partial Orders (Includes Lattices, Boolean Algebras) Reflexive Transitive Antisymmetric Compatibility Relations Not Transitive--Almost an equivalence relation Symmetric

Functions Sets and Relations A function f from A to B written f : A  B is a rule that associates exactly one element of B to each element of A A relation from A to B is a function if it is right-unique and if every element of A appears in one pair of the relation A is called the domain of the function B is called the co-domain (range) If y=f(x) : A  B, y is image of x Given a domain subset C  A IMG(f,C) = { y  B | x  C  y = f(x) } preimage of C under f PRE(f,C) = { x  A | y  C  y = f(x) } A function f is one-to-one (injective) if x  y implies f(x)  f(y) A function f is onto (surjective) if for every yB, there exists an element xA, such that f(x) = y

The pair is called an algebraic system Algebraic Systems Partial Orders The pair is called an algebraic system is a set, called the carrier of the system is a relation on ( , are similar to ) This algebraic system is called a partially ordered set, or poset for short

Partially Ordered Sets Partial Orders A poset has two operations, and , called meet and join (like AND and OR) Sometimes written (V,≤, . ,+) or (V2,≤, . ,+) even (V, . ,+) , since ≤ is implied

Posets and Hasse Diagrams Partial Orders Integers (Totally Ordered): 4 3 2 1 Matrix View Hasse Diagram Hasse Diagram obtained deleting arrowheads and redundant edges

is refelxive, antisymmetric, and transitive: a partial order Posets and Hasse Diagrams Partial Orders a \ d c b b c a d Relation Hasse Diagram :distance from top is refelxive, antisymmetric, and transitive: a partial order

An element m of a poset P is a lower bound of elements Meet Partial Orders An element m of a poset P is a lower bound of elements a and b of P, if and . m is the greatest lower bound or meet of elements a and b if m is a lower bound of a and b and, for any such that and also , .

An element of a poset is a upper bound of elements and of , if and . Join: the Dual of Meet Partial Orders An element of a poset is a upper bound of elements and of , if and . is the least upper bound or join of elements and if is an upper bound of and and, for any such that and also , .

d d d b c b b c b d a a a a c Meet ( ) and Join (+) posets: Partial Orders posets: d d d b c b b c b d a a a a c

Theorem 3.2.1 If and have a greatest lower bound (meet), then POSET Properties Partial Orders Theorem 3.2.1 If and have a greatest lower bound (meet), then Similarly, if and have a least upper bound (join), then Proof: Since meet exists, by definition. Also, since join exists, by definition.

is a lower bound of and (by Def.) More POSET Properties Partial Orders Theorem 3.2.2 Proof ( ): This means assume . is a lower bound of and (by Def.) is also the meet of and Proof: by contradiction. Suppose . Then where . But since was a lower bound of and , as well. Thus , by the anti-symmetry of posets. Proof ( ): From Definition of meet

Well-Ordered Partial Orders If all pairs of elements of a poset are comparable, then the set is totally ordered If every non-empty subset of a totally ordered set has a smallest element, then the set is well-ordered e.g.) Natural numbers Mathematical Induction Given, for all n  N, propositions P(n), if P(0) is true for all n>0, if P(n-1) is true then P(n) is true then, for all n  N, P(n) is true

Boolean Algebra: a distributed and complemented lattice Lattices Partial Orders Lattice: a poset with both meet and join for every pair of elements of the carrier set Boolean Algebra: a distributed and complemented lattice Every lattice has a unique minimum element and a unique maximum element

b d c a (lattice) (lattice) (Boolean algebra) Lattices and Not Lattices Partial Orders a c b d (lattice) (lattice) (Boolean algebra)

Properties of Lattices Partial Orders Meet, Join, Unique maximum (1), minimum (0) element are always defined Idempotent: Commutative: Associative: Absorptive: Absorptive properties are fundamental to optimization

Duality Partial Orders Every lattice identity is transformed into another identity by interchanging: and Example:

Complementation If x+y=1 and xy=0 then x is the complement of y and vice versa A lattice is complemented if all elements have a complement

Examples of Lattices Partial Orders Complemented? yes no yes

Semi-distributivity: Partial Orders Semi-distributivity: Proof : 1. (def. of meet) 2. (def. of meet, join) 3. (def. of meet) 4. (mutatis mutandis: ) 5. (def. of join)

Boolean Algebras have full distributivity: Partial Orders Boolean Algebras have full distributivity: Boolean Algebras are complemented. That is, must hold for every in the carrier of the poset

Definition of Boolean Algebra Partial Orders A complemented, distributive lattice is a Boolean lattice or Boolean algebra Idempotent x+x=x xx=x Commutative x+y=y+x xy = yx Associative x+(y+z)=(x+y)+z x(yz) = (xy)z Absorptive x(x+y)=x x+(xy) = x Distributive x+(yz)=(x+y)(x+z) x(y+z) = xy +xz Existence of the complement

Are these Lattices Boolean Algebras? Partial Orders Complemented and distributed? yes no no

Examples of Boolean Algebras Partial Orders 1-cube 2-cube

Atoms of a Boolean Algebra Partial Orders A Boolean Algebra is a Distributive, Complemented Lattice The minimal non-zero elements of a Boolean Algebra are called “atoms” 1-atom 2-atoms Can a Boolean Algebra have 0 atoms? NO!

Properties of Boolean Algebra Partial Orders x + x’y = x+y x(x’+y) = xy

Duality for Boolean Algebras Partial Orders Every Boolean Algebra identity is transformed into another valid identity by interchanging: and This rule not valid for lattices Example:

Other Theorems Partial Orders DeMorgan’s Laws Consensus

Positive Cofactor WRT : Cofactors Boolean Functions Positive Cofactor WRT : Negative Cofactor WRT : Note: prime denotes complement

Positive Cofactor WRT : Cofactors Boolean Functions Positive Cofactor WRT : Negative Cofactor WRT : This term drops out when is replaced by Example: This term is unaffected

Cofactors Boolean Functions Example:

Boole’s Expansion Theorem Boolean Functions Example: Sum form: Product form:

Thus some texts refer to f as {0,1,3,4,5,6,7} Minterm Canonical Form Boolean Functions The minterm canonical form is a canonical, or standard way of representing functions. From p100, is represented by millions of distinct Boolean formulas, but just 1 minterm canonical form. Note Thus some texts refer to f as {0,1,3,4,5,6,7}

Minterm Canonical Form Boolean Functions levels of recursive cofactoring create constants These elementary functions are called minterms

Boolean Difference (Sensitivity) Don't Cares A Boolean function depends on if and only if . Thus is called the Boolean Difference, or Sensitivity of with respect to

Boolean Difference (Sensitivity) Don't Cares Example: Note the formula depends on a, but the implied function does not