An introduction to Boolean Algebras Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)

Slides:



Advertisements
Similar presentations
Presented by: Ms. Maria Estrellita D. Hechanova, ECE
Advertisements

Copyright © Cengage Learning. All rights reserved.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Math 3121 Abstract Algebra I
Boolean Algebra cont’ The digital abstraction Graphs and Topological Sort מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
Discrete Mathematics Lecture 4 Harper Langston New York University.
Induction Sections 4.1 and 4.2 of Rosen Fall 2010
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1#
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Boolean Algebra cont’ The digital abstraction מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
Lattice and Boolean Algebra
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)
Boolean Algebra Computer Organization 1 © McQuain Boolean Algebra A Boolean algebra is a set B of values together with: -two binary operations,
CSE 460: Switching Theory David M. Zar
Intro to Discrete Structures
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Geometric interpretation & Cubes Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
Karnaugh map covering Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
Basic Boolean Functions Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CS201: Data Structures and Discrete Mathematics I
CompSci 102 Discrete Math for Computer Science
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
--- outputs logical functions of inputs --- new outputs appear shortly after changed inputs (propagation delay) --- no feedback loops --- no clock Sequential.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
Boolean Algebras Lecture 27 Section 5.3 Wed, Mar 7, 2007.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
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.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesBoolean Algebra.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Boolean Algebra.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
CHAPTER 2 Boolean algebra and Logic gates
The Relation Induced by a Partition
Math 3121 Abstract Algebra I
Boolean Algebra & Logic Gates
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
Lecture 1 – Formal Logic.
Boolean Algebra A Boolean algebra is a set B of values together with:
Boolean Algebra A Boolean algebra is a set B of values together with:
CHAPTER 2 Boolean Algebra
Propositional Calculus: Boolean Algebra and Simplification
Set Operations Section 2.2.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
A Brief Summary for Exam 1
Sungho Kang Yonsei University
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Digital Systems Section 3 Boolean Algebra. Digital Systems Section 3 Boolean Algebra.
Presentation transcript:

An introduction to Boolean Algebras Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA) Lecture 3.1

2 3.1 Goal  This lecture first provides several definitions of Boolean Algebras, and then focuses on some significant theorems and properties.  It eventually introduces Boolean Expressions and Boolean Functions.

3 3.1 Prerequisites  Students are assumed to be familiar with the fundamental concepts of:  Algebras, as presented, for instance, in:  F.M. Brown: “Boolean reasoning: the logic of boolean equations,” Kluwer Academic Publisher, Boston MA (USA), 1990, (chapter 1, pp. 1-21)

4 3.1 Prerequisites (cont’d)  Number systems and codes, as presented, for instance, in:  E.J.McCluskey: “Logic design principles with emphasis on testable semicustom circuits”, Prentice-Hall, Englewood Cliffs, NJ, USA, 1986, (chapter 1, pp. 1-28) or

5 3.1 Prerequisites (cont’d)  [Haye_94] chapter 2, pp or  M. Mezzalama, N. Montefusco, P. Prinetto: “Aritmetica degli elaboratori e codifica dell’informazione”, UTET, Torino (Italy), 1989 (in Italian), (chapter 1, pp. 1-38).

6 3.1 Homework  Prove some of the properties of Boolean Algebras, presented in slides 39 ÷ 59.

7 3.1 Further readings  Students interested in a deeper knowledge of the arguments covered in this lecture can refer, for instance, to:  F.M. Brown: “Boolean reasoning: the logic of boolean equations,” Kluwer Academic Publisher, Boston MA (USA), 1990, (chapter 2, pp )

8 3.1 Outline  Boolean Algebras Definitions  Examples of Boolean Algebras  Boolean Algebras properties  Boolean Expressions  Boolean Functions.

9 3.1 Boolean Algebras Definitions Boolean Algebras are defined, in the literature, in many different ways:  definition by lattices  definition by properties  definition by postulates [Huntington].

Definition by lattices A Boolean Algebra is a complemented distributive lattice.

Definition through properties A Boolean Algebra is an algebraic system ( B, +, ·, 0, 1 ) where:  B is a set, called the carrier  + and · are binary operations on B  0 and 1 are distinct members of B which has the following properties:

P1: idempotent  a  B:  a + a = a  a · a = a

P2: commutative  a, b  B:  a + b = b + a  a · b = b · a

P3: associative  a, b, c  B:  a + (b + c) = (a + b) + c = a + b + c  a · (b · c) = (a · b) · c = a · b · c

P4: absorptive  a, b  B:  a + (a · b) = a  a · (a + b) = a

P5: distributive Each operation distributes w.r.t. the other one: a · (b + c) = a · b + a · c a + b · c = (a + b) · (a + c)

P6: existence of the complement  a  B,  a’  B |  a + a’ = 1  a · a’ = 0. The element a’ is referred to as complement of a.

Definition by postulates A Boolean Algebra is an algebraic system ( B, +, ·, 0, 1 ) where:  B is a set  + and · are binary operations in B  0 and 1 are distinct elements in B satisfying the following postulates:

A1: closure  a, b  B:  a + b  B  a · b  B

A2 : commutative  a, b  B:  a + b = b + a  a · b = b · a

A3: distributive  a, b, c  B:  a · (b + c) = a · b + a · c  a + b · c = (a + b) · (a + c)

A4: identities  0  B |  a  B, a + 0 = a  1  B |  a  B, a · 1 = a

A5: existence of the complement  a  B,  a’  B |  a + a’ = 1  a · a’ = 0.

Some definitions  The elements of the carrier set B={0,1} are called constants  All the symbols that get values  B are called variables (hereinafter they will be referred to as x 1, x 2, , x n )  A letter is a constant or a variable  A literal is a letter or its complement.

Outline  Boolean Algebras Definitions  Examples of Boolean Algebras  Boolean Algebras properties  Boolean Expressions  Boolean Functions.

Examples of Boolean Algebras Let us consider some examples of Boolean Algebras:  the algebra of classes  propositional algebra  arithmetic Boolean Algebras  binary Boolean Algebra  quaternary Boolean Algebra.

The algebra of classes Suppose that every set of interest is a subset of a fixed nonempty set S. We call  S a universal set  its subsets the classes of S. The algebra of classes consists of the set 2 S (the set of subsets of S) together with two operations on 2 S, namely union and intersection.

This algebra satisfies the postulates for a Boolean Algebra, provided the substitutions: B  2 S +  ·  0  1  S Thus, the algebraic system ( 2 S, , , , S ) ia a Boolean Algebra. The algebra of classes (cont'd)

Propositions A proposition is a formula which is necessarily TRUE or FALSE (principle of the excluded third), but cannot be both (principle of no contradiction). As a consequence, Russell's paradox : “this sentence is false” is not a proposition, since if it is assumed to be TRUE its content implies that is is FALSE, and vice-versa.

Propositional calculus Let: Pa set of propositional functions Fthe formula which is always false (contradiction) T the formula which is always true (tautology)  the disjunction (or)  the conjunction (and)  the negation (not)

The system ( P, , , F, T ) is a Boolean Algebra:  B  P  +   ·   0  F  1  T Propositional calculus (cont'd)

Arithmetic Boolean Algebra Let:  n be the result of a product of the elements of a set of prime numbers  D the set of all the dividers of n  lcm the operation that evaluates the lowest common multiple  GCD the operation that evaluates the Greatest Common Divisor.

The algebraic system: ( D, lcm, GCD, 1, n ) Is a Boolean Algebra:  B  D  +  lcm  ·  GCD  0  1  1  n Arithmetic Boolean Algebra (cont'd)

Binary Boolean Algebra The system ( {0,1}, +, ·, 0, 1 ) is a Boolean Algebra, provided that the two operations + and · be defined as follows: · ·

Quaternary Boolean Algebra The system ( {a,b,0,1}, +, ·, 0, 1 ) is a Boolean Algebra provided that the two operations + and · be defined as follows: +0ab1·0ab1 00ab aaa11a0a0a bb1b1b00bb ab1

Outline  Boolean Algebras Definitions  Examples of Boolean Algebras  Boolean Algebras properties  Boolean Expressions  Boolean Functions.

Boolean Algebras properties All Boolean Algebras satisfy interesting properties. In the following we focus on some of them, particularly helpful on several applications.

The Stone Representation Theorem “Every finite Boolean Algebra is isomorphic to the Boolean Algebra of subsets of some finite set ”. [Stone, 1936]

Corollary In essence, the only relevant difference among the various Boolean Algebras is the cardinality of the carrier. Stone’s theorem implies that the cardinality of the carrier of a Boolean Algebra must be a power of 2.

Consequence Boolean Algebras can thus be represented resorting to the most appropriate and suitable formalisms. E.g., Venn diagrams can replace postulates.

Duality Every identity is transformed into another identity by interchanging:  + and ·  and   the identity elements 0 and 1.

Examples a + 1 = 1 a · 0 = 0 a + a’ b = a + b a (a’ + b) = a b a + (b + c) = (a + b) + c = a + b + c a · (b · c) = (a · b) · c = a · b · c

The inclusion relation On any Boolean Algebra an inclusion relation (  ) is defined as follows: a  b iff a · b’ = 0.

The inclusion relation is a partial order relation, i.e., it’s:  reflexive : a  a  antisimmetric :a  b e b  a  a = b  transitive :a  b e b  c  a  c Properties of the inclusion relation

The relation gets its name from the fact that, in the algebra of classes, it is usually represented by the symbol  : A  B  A  B’ =  A B The inclusion relation in the algebra of classes

In propositional calculus, inclusion relation corresponds to logic implication: a  b  a  b The inclusion relation in propositional calculus

The following expressions are all equivalent:  a  b  a b’ = 0  a’ + b = 1  b’  a’  a + b = b  a b = a. Note

Properties of inclusion a  a + b a b  a

Complement unicity The complement of each element is unique.

(a’)’ = a Involution

(a + b)’ = a’ · b’ (a · b)’ = a’ + b’ De Morgan’s Laws

Generalized Absorbing a + a’ b = a + b a (a’+ b) = a b

Consensus Theorem a b + a’ c + b c = a b + a’ c (a + b) (a’ + c) (b + c) = (a + b) (a’ + c)

Equality a = b iff a’ b + a b’ = 0 Note The formula a’ b + a b’ appears so often in expressions that it has been given a peculiar name: exclusive-or or exor or modulo 2 sum.

Boole’s expansion theorem Every Boolean function f : B n   B : f (x 1, x 2, …, x n ) can be expressed as: f (x 1, x 2, …, x n ) = = x 1 ’ · f (0, x 2, …, x n ) + x 1 · f (1, x 2, …, x n )  (x 1, x 2, …, x n )  B

Dual form f (x 1, x 2, …, x n ) = = [ x 1 ’ + f (0, x 2, …, x n ) ] · [x 1 + f (1, x 2, …, x n ) ]  (x 1, x 2, …, x n )  B

Remark The expansion theorem, first proved by Boole in 1954, is mostly known as Shannon Expansion.

Note According to Stone’s theorem, Boole’s theorem holds independently from the cardinality of the carrier B.

Cancellation rule The so called cancellation rule, valid in usual arithmetic algebras, cannot be applied to Boolean algebras. This means, for instance, that from the expression: x + y = x + z you cannot deduce that y = z.

Demonstration xyzx+yx+zx+y = x+zy=z

Demonstration xyzx+yx+zx+y = x+zy=z 00000TT FF FF 01111TT 10011TT TF 10111TF TF 11011TF 11111TT

Demonstration xyzx+yx+zx+y = x+zy=z

Demonstration xyzx+yx+zx+y = x+zy=z

Demonstration xyzx+yx+zx+y = x+zy=z 00000TT FF FF 01111TT 10011TT TF 10111TF TF 11011TF 11111TT

Demonstration xyzx+yx+zx+y = x+zy=z 00000TT FF FF 01111TT 10011TT TF 10111TF TF 11011TF 11111TT

Some Boolean Algebras satisfy some peculiar specific properties not satisfied by other Boolean Algebras. An example The properties: x + y = 1 iff x = 1 or y = 1 x · y = 0 iff x = 0 or y = 0 hold for the binary Boolean Algebra (see slide #28), only. Specific properties

Outline  Boolean Algebras Definitions  Examples of Boolean Algebras  Boolean Algebras properties  Boolean Expressions  Boolean Functions.

Boolean Expressions Given a Boolean Algebra defined on a carrier B, the set of Boolean expressions can be defined specifying:  A set of operators  A syntax.

Boolean Expressions A Boolean expression is a formula defined on constants and Boolean variables, whose semantic is still a Boolean value.

Syntax Two syntaxes are mostly adopted:  Infix notation  Prefix notation.

Infix notation  elements of B are expressions  symbols x 1, x 2, …, x n are expressions  if g and h are expressions, then:  (g) + (h)  (g) · (h)  (g)’ are expressions as well  a string is an expression iff it can be derived by recursively applying the above rules.

Syntactic conventions Conventionally we are used to omit most of the parenthesis, assuming the “·” operation have a higher priority over the “+” one. When no ambiguity is possible, the “·” symbol is omitted as well. As a consequence, for instance, the expression ((a) · (b)) + (c) Is usually written as: a b + c

Prefix notation Expressions are represented by functions composition. Examples: U = · (x, y) F = + (· ( x, ‘ ( y ) ), · ( ‘ ( x ), y ) )

Outline  Boolean Algebras Definitions  Examples of Boolean Algebras  Boolean Algebras properties  Boolean Expressions  Boolean Functions.

Boolean functions Several definitions are possible. We are going to see two of them:  Analytical definition  Recursive definition.

Boolean functions: Analytical definition A Boolean function of n variables is a function f : B n  B which associates each set of values x 1, x 2, …, x n  B with a value b  B: f ( x 1, x 2, …, x n ) = b.

Boolean functions: Recursive definition An n-variable function f : B n  B is defined recursively by the following set of rules:  b  B, the constant function defined as f( x 1, x 2, …, x n ) = b,  ( x 1, x 2, …, x n )  B n is an n-variable Boolean function  x i  { x 1, x 2, …, x n } the projection function, defined as f( x 1, x 2, …, x n ) = x i  ( x 1, x 2, …, x n )  B n is an n-variable Boolean function

Boolean functions: Recursive definition (cont’d)  If g and h are n-variable Boolean functions, then the functions g + h, g · h, e g’, defined as  (g + h) (x 1, x 2, …, x n ) = g(x 1, x 2, …, x n ) + h(x 1, x 2, …, x n )  (g · h) (x 1, x 2, …, x n ) = g(x 1, x 2, …, x n ) · h(x 1, x 2, …, x n )  (g’) (x 1, x 2, …, x n ) = (g(x 1, x 2, …, x n ))’  x i  { x 1, x 2, …, x n } are also n-variable Boolean function

Boolean functions: Recursive definition (cont’d)  Nothing is an n-variable Boolean function unless its being so follows from finitely many applications of rules 1, 2, and 3 above.