46
CSE 460: Switching Theory David M. Zar Computer Science and Engineering Washington University Spring 2010 [email protected] http://classes.engineering.wustl.edu/ cse460

CSE 460: Switching Theory

  • Upload
    ray

  • View
    19

  • Download
    0

Embed Size (px)

DESCRIPTION

CSE 460: Switching Theory. David M. Zar Computer Science and Engineering Washington University Spring 2010 [email protected] http://classes.engineering.wustl.edu/cse460. Boolean Algebras. Sets, Relations and Functions Orders Boolean Functions Properties of Boolean Algebras - PowerPoint PPT Presentation

Citation preview

Page 1: CSE 460: Switching Theory

CSE 460: Switching Theory

David M. ZarComputer Science and Engineering

Washington University

Spring [email protected]

http://classes.engineering.wustl.edu/cse460

Page 2: CSE 460: Switching Theory

Boolean AlgebrasSets, Relations and FunctionsOrdersBoolean FunctionsProperties of Boolean AlgebrasBoole’s Expansion TheoremIntervals and Don’t Cares

Read HS 77-108

Page 3: CSE 460: Switching Theory

1-3 - David Zar - 04/22/23

What is a Boolean Algebra? Boolean algebras are defined over sets

» Two-valued Boolean algebra defined over {0,1} or {TRUE, FALSE}

» Boolean algebras can be much more general and can be defined over much larger sets

» We will soon define Boolean algebras over sets of functions We need to define some terms and look at how they

help us to define a Boolean algebra» Sets form the underlying structures of Boolean algebra» Relations that characterize relationships between elements

of a set» Equivalence Relations that characterize the elements that

are equivalent to one another for a specific purpose We will eventually be interested in the collection of

all Boolean formulas that are equivalent to a given formula

Page 4: CSE 460: Switching Theory

1-4 - David Zar - 04/22/23

Sets Some definitions:

» A set is an unordered collection of objects, referred to as elements or members of the set, such that each element occurs exactly once in the collection Sets are generally denoted by a matching pair of curly braces surrounding a list of the elements or some rule specifying the elements.For example {1,2,3} or {(x,y):x2 y2 1}

» A multi-set is an unordered collection of elements in which each element may appear one or more timesFor instance, {1,1,2,3} which is equivalent to{1,2,3,1} (unordered collection), but not equivalent to {1,2,3}

» An ordered set is a collection of elements in which each element may appear one or more times and in which ordering is significant (as in a vector); usually denoted with parenthesis as in (2,1,3)

» The cardinality of a set A, written|A|, is the number of elements in A

» The empty or null set, written {} or Ø, is the set with no elements

» The universal set or universe of discourse, commonly denoted , is the set which contains all possible elements under consideration

Page 5: CSE 460: Switching Theory

1-5 - David Zar - 04/22/23

Predicates A predicate is a variable statement which may be true or

false depending on the values of the variablesFor example, x 1 is a predicate P(x) which is true for some x in the universe of discourse and false for othersOr, x2 y2 0 is a predicate P(x,y) which is true for all real x but not true for some complex x

Commonly used predicates involving sets:» Membership a A is an assertion that a is an element in the set

A

» Inclusion A B is an assertion that all the elements in set A are also in set B; A is said to be a subset of B

» Proper Inclusion A B is an assertion that all the elements in set A are also in set B but that B contains some elements not in A; A is said to be a proper subset of B

» Equality A B is an assertion that sets A and B contain the same elements; equivalent to an assertion that A B and B A

Page 6: CSE 460: Switching Theory

1-6 - David Zar - 04/22/23

Union A B is the set of elements in A or in B Intersection A B is the set of elements in A and in B Complement A’ is the set of elements from the universal set which

are not in A Difference A - B is the set of elements in A but not in B; equivalent to

A B’ Power Set 2A is the set of all subsets of A; that is, 2A {B A}

For example:let A {1,2,3}, then

2A {Ø,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}}The notation is due to the fact that |2A| 2|A|

By definition, A 2A and Ø 2A

Cartesian Product A x B is the set of all ordered sets of two elements, the first of which is some element of A and the second of which is an element of BThat is, A B {(a,b):a A and b B}For example, if A = {1,2} and B {1,2,3}, then A x B={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3)}Notation: A2 A A, and An A A A … A

Operations on Sets

Page 7: CSE 460: Switching Theory

1-7 - David Zar - 04/22/23

Collections of Sets A collection of sets A1, A2, …, An is said to be mutually exclusive or

pairwise disjoint if Ai Aj = Ø for i jThat is, if A1, A2, …, An are mutually exclusive, then a Ai implies that a Aj unless i jFor example, let Ai, I 0, 1,… ,9 be the set of numbers congruent to i modulo 10. Then 11 A1 precludes it from being in any of the other sets

A partition of a set is a collection of mutually exclusive subsets A1, A2, … , An such that A1 A2 ··· An That is, if a , then a Ai for exactly one value of iA partition P is a set of sets; P {A1, A2, …, An} where Ai For example, the set of rational numbers and the set of irrational numbers partition the set of real numbers

A partition P1 of is a refinement of partition P2 of if every element of P2 is partitioned by a subset of P1

For example, the sets of integers, nonintegral rationals, and irrationals partition and are a refinement of the partition rationals and irrationals

Page 8: CSE 460: Switching Theory

1-8 - David Zar - 04/22/23

RelationsA binary relation, R, between two sets, A and B, is a subset of A x

B

If (x,y) R, we write xRy If R {-2,-1,0,1,2} x {0,1,2} represents “of lesser magnitude,”

then R {(-1,2),(0,1),(0,2),(1,2)}

For finite |A| and |B|, a relation can be represented as a |A| x |B| matrix in which a nonzero value at (r,c) implies that the corresponding pair is an element of the relation

Relations are commonly defined over the Cartesian product of a set with itself, R A2. An example is the “” relationship over the set of real numbers. For finite A, the relation can be represented as a directed graph (digraph) with nodes representing the elements A and edges from node a to node b indicating aRb

The elements of a relation are ordered and for relation R A x B we sometimes call A the domain and B the range of R .» Note: despite the terminology, R is not a function from A to B because an

element of A may be related to more than one element of B The inverse of relation R A x B is a relation R-1 B x A defined

as R-1 {(b,a):(a,b) R}

Page 9: CSE 460: Switching Theory

1-9 - David Zar - 04/22/23

Classes of Relations A relation R A2 is reflexive if xRx for every x A

» For example the relation “” defined over is reflexive because every number is less than or equal to itself, x x

» A matrix representation of a reflexive relation has nonzero elements in all diagonal entries (and possibly elsewhere)

» A digraph representation of a reflexive relation has edges from every node to itself

A relation R A2 is symmetric if xRy implies yRx» For example, the relation ““ defined over is symmetric because every

number is equal to itself» Also, the relation “ (mod n)” (congruence modulo n) defined over the set of

integers is symmetric» A matrix representation of a symmetric relation is a symmetric matrix» A digraph representation of a symmetric relation has an edge from node b to

node a corresponding to every edge from node a to node b A relation R A2 is antisymmetric if xRy and yRx together imply that x

y» For example “” defined over is antisymmetric because x y and y x

imply x y» On the other hand, “ (mod n)” is not antisymmetric because “5 3 (mod 2)”

and “3 5 (mod 2)” but 3 5.» A matrix representation of an antisymmetric relation has a zero in element (j,i)

if element (i,j) is nonzero, unless i j (along the diagonal)» A digraph representation of an antisymmetric relation has no edge from node a

to b if there is an edge from b to a, unless the edge loops from a node to itself

Page 10: CSE 460: Switching Theory

1-10 - David Zar - 04/22/23

More Classes of Relations A relation R A2 is transitive if xRy and yRz together imply xRz

» For example the relation “” defined over is transitive since x y and y z implies x z

» Also, the relation “ (mod n)” is a transitive relation over the integers An equivalence relation is a relation that is reflexive, symmetric,

and transitive» For example, the relation “ (mod 2)” is an equivalence relation and

has the interpretation that, if (mod 2) then a rotation by an amount yields the same location as a rotation by

» The relation “has the same grandfather” is not an equivalence relation since it is not transitive

An equivalence relation R A2 induces a partition of A into sets of elements that are equivalent» The set of elements of A that are equivalent to a A is called the

equivalence class of a and is denoted [a]» For example, congruence modulo 5 partitions the set of integers into the

equivalence classes [0], [1], [2], [3], and [4] A compatibility relation is a relation that is reflexive and

symmetric but not transitive» The relation “has the same grandfather” is a compatibility relation

Page 11: CSE 460: Switching Theory

1-11 - David Zar - 04/22/23

Functions A function (or mapping) is a relation f A x B such that:

1. (a,b) f and (a,c) f implies that b = c 2. For each a A there is some b B such that (a,b) f

That is, every element of A is paired with exactly one element B in the relation As with other relations, A is called the domain of f and B is called the range

or co-domain of f If (a,b) f, then b is said to be the image of a under f and we write b f(a) Definition: If C A, then the image of C under f is the set {b B:a C b =

f(a)} Definition: If D B, then the preimage of D under f is the set {a A:b D

b f(a)} Definition: A function f is said to be injective or one-to-one if a1 a2 implies

that f(a1) f(a2) Definition: A function f is said to be surjective or onto if b B, a A b

f(a) Definition: A function f that is both one-to-one and onto is called bijective or

invertible; in this case, the inverse relation is also a function and we denote it as f-1

Page 12: CSE 460: Switching Theory

1-12 - David Zar - 04/22/23

Algebras Our goal is to define a Boolean algebra in terms of a

universal set of elements that have some ordering relation defined on them

First, some more definitions:» An n-ary operation on a set A is a function f:An

A» An algebraic system (or simply algebra)

consists of a set of elements called the carrier of the algebra, a set of operations on the carrier, and, optionally, a set of relations on the carrierAs an example, arithmetic is an algebra with the carrier , operations {-(unary), +,} and the relation ““

A Boolean Algebra is a lattice and a lattice is a partial order, so let’s look at what these things are

Page 13: CSE 460: Switching Theory

1-13 - David Zar - 04/22/23

Partial Orders A partial order on a set P is a relation P2 that is

» reflexive (x x)» Antisymmetric (x y and y x implies x y)» transitive (x y and y z implies x z)

The set P is called the ground set of the pair (P, ) which is referred to as a partially ordered set or poset

As an example, the set 2 is a poset if for any two points x, y 2 we define the relation 4 as x y means x1 y1 and x2 y2

Definition: Two elements a and b of a poset are said to be comparable if either a b or b a

Definition: We say that y covers x if x < y and there exists no element z such that x z y

If a is an element of a poset P and a b for every b P, then a is said to be the least member of P

If a is an element of a poset P and b a for every b P, then a is said to be the greatest member of P

Not every poset has a least or greatest member but if one exists then it is unique

Page 14: CSE 460: Switching Theory

1-14 - David Zar - 04/22/23

Hasse Diagrams An element a is said to be a minimal member of a poset P if no

element b exists such that b a

An element a is said to be a maximal member of P if no element b exists such that a b

We can represent a partial order by a directed graph with nodes representing the elements of the poset and with a directed edge from node a to b representing a b

A Hasse diagram is a digraph representation of a partial order with implied edge directions» If a b , then b is drawn higher in the graph than a and an edge connects

them» Unrelated nodes have no edge between them and can be placed anywhere

relative to one another» Edges are not explicitly drawn if they are implied by transitivity» Self-loops are not explicitly drawn

Page 15: CSE 460: Switching Theory

1-15 - David Zar - 04/22/23

(2,3)

(2,2)

(2,1)

(1,1)

(1,3)

(1,2)

P:

As an example, let P={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3)} and let (x1,x2) (y1,y2) whenever x1 y1 and x2 y2. This relation can be represented in the following Hasse diagram :

Example Hasse Diagrams

Another example, let Q=2{a,b,c} and for x,y Q let x y mean that x y. Then Q is a poset and we can draw the Hasse diagram for Q.

Q:{a,b,c}

{b,c}{a,b}{a,c}

{a} {b} {c}

Ø

Page 16: CSE 460: Switching Theory

1-16 - David Zar - 04/22/23

Meet and Join Definition: An element m of a poset P is a lower bound of elements

a,b P if m a and m b. Further, m is the greatest lower bound or meet of a and b if m’ m for any other lower bound m’

We write ab = m or ab = m to denote that m is the meet of a and b Definition: An element m of a poset P is a upper bound of elements

a,bP if ma and mb. Further, m is the least upper bound or join of a and b if m m’ for any other upper bound m’

We write a b = m or ab = m to denote that m is the join of a and b The meet and join of two elements are unique when they exist Two elements may or may not have a lower (upper) bound and even

if they do, they may not have a meet (join) because it can be the case that none of the bounds is greatest (lowest)

It is an immediate consequence of the definitions that in any poset, if x and y have a meet, then (xy) x. Dually, if x and y have a join, x (xy)

Page 17: CSE 460: Switching Theory

1-17 - David Zar - 04/22/23

Meet and Join Theorem Theorem: In any poset, x y if and only if both xy=x and x+y=y

Proof: Clearly, if x y then x is a lower bound of x and y. Suppose x were not the meet of x and y. Let any other lower bound be denoted by m. If m were the meet of x and y, then x m because, by assumption, x is not the greatest lower bound. However by the definition of meet, m x and since the relation is antisymmetric, m x which is a contradiction. So, x must be the meet. If xy = x, then by definition, x x and x y.

Similar arguments hold for join: If xy = y, then by definition, y y and y x.

Page 18: CSE 460: Switching Theory

1-18 - David Zar - 04/22/23

Well-Ordered Sets Definition: If all pairs of elements in a poset are

comparable, then the poset is called a chain and is said to be totally ordered.

An antichain is a poset in which no two elements are comparable.» As an example, the set of real numbers is totally ordered under the

relation “” Definition: If every nonempty subset of a totally ordered

set has a smallest element, then the set is said to be well ordered.» As an example, the set of negative integers is well-ordered, but the

set of real numbers is not.

Page 19: CSE 460: Switching Theory

1-19 - David Zar - 04/22/23

Lattices Definition: A lattice is a poset (A,) in which any two elements have both a meet and a

join All lattices have the following properties for x,y,zA:

P0 Greatest 1A Least 0A

x1=1 x0=0

P1 Idempotent xx=x xx=x P2 Commutative xyyx xyyx P3 Associative x(yz)(xy)z x(yz)(xy)

z P4 Absorptive x(xy)x x(xy)x

These properties follow directly from the definition of a poset. As an example,

Proof of P4: If A is a lattice, then all pairs of elements have a meet and join, by definition. Thus, xy exists and x(xy) exists. By definition, x (xy) so that x(xy) x because xz x if xz.

Page 20: CSE 460: Switching Theory

1-20 - David Zar - 04/22/23

More Lattices Theorem: In any lattice (A,) with x,y,zA

(xy)(xz)x(yz) (1)

Proof: By definition, xyx and xyyyz so that xy is a lower bound for both x and yz. The meet is the greatest lower bound, so xyx(yz). Similarly, xzx(yz). Thus, x(yz) is an upper bound of both xy and xz. The join is the least upper bound, so the theorem statement follows.

A lattice is defined as a poset, that is a set with a relation» All relations have inverses» The pair (A is the dual of the pair (A,) where is the inverse of relation

» The result is a lattice (A,)» The join of two elements x,yA under (A,) is equal to the meet under (A,)» The meet of two elements x,yA under (A,) is equal to the join under (A,)» As a result, the 0 and 1 elements under (A,) are equal to the 1 and 0

elements under (A,), respectively

Page 21: CSE 460: Switching Theory

1-21 - David Zar - 04/22/23

Duality The principle of duality states that every lattice identity can be

transformed into another by interchanging:

1. with , and vice-versa2. with , and vice-versa3. 0 with 1, and vice-versa

As an example, each of the lattice properties P0 through P4 has a dual Another example, a dual to the previous theorem exists that states

that in any lattice (A,), (xy)(xz)x(yz) (2)

Page 22: CSE 460: Switching Theory

1-22 - David Zar - 04/22/23

Complement of a Lattice Definition: Given x,y which are elements of a lattice (A,), x is a

complement of y (written y’) if xy 1 and xy 0. A lattice is said to be complemented if all elements have a complement

Complements within a lattice are not necessarily unique As an example, the left lattice below is not complemented because,

although c and b are complements, d has no complement. The right lattice below is complemented and e has two complements, namely f and g.

1

d

b

0

c

a

1

e f g

0

Page 23: CSE 460: Switching Theory

1-23 - David Zar - 04/22/23

Dristributive Lattice Definition: A lattice is said to be distributive if the two distributive

properties hold for all x,y,z

x(yz) (xy)(xz) and x(yz) (xy)(xz) (3)

As an example, the lattice representing the subset relation shown below is distributive: {a,b,c}

{b,c}{a,b}{a,c}

{a} {b} {c}

Ø

Page 24: CSE 460: Switching Theory

1-24 - David Zar - 04/22/23

Boolean and Switching Algebras Definition: A Boolean algebra is a lattice that is

distributive and complemented

As an example, the lattice (2A, )is a Boolean algebra with the join and meet of x,y2A given by xy and xy, respectively.

» It is distributive since x(yz)=(xy)(xz) and x(yz)=(xy)(xz)

» It is complemented since x and Ax are complements

Definition: A switching algebra is a Boolean algebra whose carrier consists of two elements. This is the Boolean algebra with which you are probably already familiar: » Carrier B={0,1}» Relation ={(0,0),(0,1),(1,1)}» Join: 0+0=0, 0+1=1+0=1, 1+1=1» Meet: 00=0, 01=10=0, 11=1

Page 25: CSE 460: Switching Theory

1-25 - David Zar - 04/22/23

Isomorphism Definition: Two Boolean algebras (A,) and (B, ¹) are isomorphic if

there exists a bijection f from A to B such that

1. f(a1+a2) f(a1) + ¹ f(a2)2. f(a1a2) f(a1) ¹ f(a2)

where a1, a2 A, and + and are join and meet operations defined under the partial order , and + ¹ and ¹ are join and meet operations defined under the partial order ¹

Any result obtained for a Boolean algebra also applies to all Boolean algebras to which it is isomorphic

As an example, a switching algebra is isomorphic to the Boolean algebra (2A,) where A 1

Page 26: CSE 460: Switching Theory

1-26 - David Zar - 04/22/23

Stone’s Theorem Stone’s Representation Theorem: It can be shown that every

finite Boolean algebra with n elements is isomorphic to (2A,) for any set A such that A log2n.

The only relevant difference among various Boolean algebras is the number of elements in the carriers

An immediate consequence of Stone’s representation theorem is that all finite Boolean algebras have 2n elements for some integer n

Page 27: CSE 460: Switching Theory

1-27 - David Zar - 04/22/23

Theorem: Complementation in a Boolean algebra is uniqueProof: Suppose both x0 and y are complements of x. Then, x+x0=x+y=1 and xx0=xy=0. It follows that

Theorem: In a Boolean algebra, (x0)0=xProof: By the definition of complement, xx0 =0 and x+x0=1. Both meet and join are commutative, so x0x =0 and x0+x=1. So x is the complement of x0.

Theorem: In a Boolean algebra,

Proof: From the absorptive property of all lattices, x+x0 y = x+xy+x0 y = x+(x+x0)y = x+y. The other equality follows from the principle of duality.

Properties of Boolean Algebras

Page 28: CSE 460: Switching Theory

1-28 - David Zar - 04/22/23

Theorem (isotone property): In a Boolean algebra:

Proof: A Boolean algebra is a poset and we have by theorem

that x· y , x=xy. So, x· y, x=xy, xz=xyz=xyzz=(xz)(yz) , xz· yz.The other implication follows from the principle of duality.

Theorem: In a Boolean algebra:

Proof: x· y, xy0· yy0, xy0· 0, xy0=0 The other equality follows from the principle of duality.

More Properties of Boolean Algebras

Page 29: CSE 460: Switching Theory

1-29 - David Zar - 04/22/23

Theorem (Demorgan’s Laws): In a Boolean algebra:

Proof: x0 y0(x+y)=0 and (x+y)+x0 y0=1, so x0 y0=(x+y)0 since aa0 =0 and a+a0 =1.

Theorem (Consensus): In a Boolean algebra:

Proof: Apply the distributive property to see that yz(x0+y0)(x+z0) = 0. Application of DeMorgan's law twice yields yz(xy+x0 z)0 = 0. Which, from the above theorem, implies yz· xy+x0z. From the isotone property, xy+x0z +yz · xy+x0z. However, for any poset, a · a+b so xy+x0 z · xy+x0 z+yz. Hence, xy+x0z = xy+x0z+yz. The other equality follows from the principle of duality.Note that the consensus theorem provides a means to simplify expressions

DeMorgan’s Laws and Consensus

Page 30: CSE 460: Switching Theory

1-30 - David Zar - 04/22/23

A formula is an equation or expression that yields the value of a function in terms of its parameters

For any given function, there are an infinite number of formulas that yield the functional relationship

We have a particular interest in a class of formulas known as Boolean formulas

Definition: Let (B,·) be a Boolean algebra and let x1, x2, ..., xn be variables taking values on B.

Then the set of Boolean formulas are defined as:

» The elements of B are Boolean formulas» The symbols x1, x2, ..., xn are Boolean formulas» If g and h are Boolean formulas, then so are

– (g)+(h)– (g) ¢ (h)– (g)0

» An expression is a Boolean formula if and only if it can be derived by finite application of the previous rules

Boolean formulas

Page 31: CSE 460: Switching Theory

1-31 - David Zar - 04/22/23

As an example, if B ={0,a,b,c,a0,b0,c0,1} and x1, x2, ..., xn are variables taking values in B, then the following are all Boolean formulas » a+b¢ c

» x1+x2¢(x3+x4)

» (x1+x2¢(x3+x4))0 ¢ a+b¢ c

Boolean formulas Example

Page 32: CSE 460: Switching Theory

1-32 - David Zar - 04/22/23

A Boolean formula is a string that represents a sequence of join, meet, and complement operations on elements of a Boolean algebra B

Informally, a Boolean function is a relation from Bn to B that can be represented as a Boolean formula

Definition: Let (B,·) be a Boolean algebra and let x1, x2, ..., xn be variables taking values on B. Then the set of Boolean functions on x1, x2, ..., xn consist of:» The constant functions f(x1, x2, ..., xn)=b for any element b2 B» The projection functions f(x1, x2, ..., xn)=xi for any i=1,2,...,n» If g and h are Boolean functions on x1, x2, ..., xn, then so are

1. (g+h)(x1, x2, ..., xn) = g(x1, x2, ..., xn)+h(x1, x2, ..., xn)2. (g¢ h)(x1, x2, ..., xn)=g(x1, x2, ..., xn)¢ h(x1, x2, ..., xn)3. (g0)(x1, x2, ..., xn)=(g(x1, x2, ..., xn))0

» A function is a Boolean function on x1, x2, ..., xn if and only if it can be derived by finite application of the previous rules

Definition: The set of Boolean functions f:{0,1}n ! {0,1} are called switching functions

Boolean Functions

Page 33: CSE 460: Switching Theory

1-33 - David Zar - 04/22/23

Definition: If f(x1, x2, ..., xn) is a Boolean function on the Boolean algebra (B,·), then the positive cofactor of f with respect to xi is the Boolean function in n-1 variables

Similarly, the negative cofactor of f with respect to xi is the function

Cofactors

Page 34: CSE 460: Switching Theory

1-34 - David Zar - 04/22/23

If f(x1, x2, ..., xn) is a Boolean function on the Boolean algebra (B,·), then

Proof: Proceed by induction for each of the items 1 through 3 in the definition of a Boolean function.

Boole’s Expansion Theorem

Page 35: CSE 460: Switching Theory

1-35 - David Zar - 04/22/23

Boole’s Expansion Theorem Proof

Page 36: CSE 460: Switching Theory

1-36 - David Zar - 04/22/23

Where the last equality follows from the consensus property of Boolean algebras. The other equality follows from duality.

We can apply the expansion recursively and represent any Boolean function as a Boolean formula

Conversely, every Boolean formula is an expansion of some Boolean function

Boole’s Expansion Thm. Proof (cont.)

Page 37: CSE 460: Switching Theory

1-37 - David Zar - 04/22/23

We will often be interested in whether two Boolean formulas implement the same Boolean function» Note that a given Boolean function may be represented by an

infinite number of Boolean formulas» We can restrict the form of a formula so that there is only one

formula for each function» The resulting form is called canonical» We arrive at the minterm canonical form by recursive

application of the expansion theorem

Canonical Form

Page 38: CSE 460: Switching Theory

1-38 - David Zar - 04/22/23

The minterm canonical form for a Boolean function f(x1,x2,...,xn) is

The values f(0,0,...,0), etc. are elements of B and are called the discriminants of f. The products x1

0 x20 ... xn-1

0 xn0, etc. are called

minterms.

Minterm Canonical Form

Page 39: CSE 460: Switching Theory

1-39 - David Zar - 04/22/23

The maxterm canonical form for a Boolean function f(x1,x2,...,xn) is dually defined as

The sums x1+ x2+ ... + xn-1+ xn, etc. are called maxterms.

Maxterm Canonical Form

Page 40: CSE 460: Switching Theory

1-40 - David Zar - 04/22/23

As an example, let B={0,a,b,1} be the carrier of a Boolean algebra and let f(x1,x2)=x1x2 + ax2

0. Then the minterm canonical form for f is

It is a consequence of Boole's expansion theorem that each Boolean function has a unique minterm and unique maxterm canonical form» A Boolean function is uniquely specified by its discriminants» Since there are 2n discriminants and each has one of |B| values, there are

Boolean functions– In a switching algebra, there are Boolean functions of two variables– In a switching algebra, there are Boolean functions of three variables

The remaining possible functions of n variables are not Boolean functions

Example of Canonical Form

Page 41: CSE 460: Switching Theory

1-41 - David Zar - 04/22/23

The set of Boolean functions in n variables defined over a Boolean algebra (B,·) form a Boolean algebra (B,¹)» The partial order ¹ is defined for two n-variable Boolean functions

f2B and g2B as f(x1,x2,...,xn)¹ g(x1,x2,...,xn) means that the value of f is less than or equal to the value of g for every assignment of values to x1,x2,...,xn

» The constant function f0(x1,x2,...,xn)=02B is the least element in the function algebra

» The constant function f1(x1,x2,...,xn)=12B is the greatest element in the function algebra

» The meet of two functions g(x1,x2,...,xn)2B and h(x1,x2,...,xn)2B is g(x1,x2,...,xn)¢ h(x1,x2,...,xn) where ¢ is the meet operation under (B,·)

» The join of two functions g(x1,x2,...,xn)2B and h(x1,x2,...,xn)2B is g(x1,x2,...,xn)+ h(x1,x2,...,xn) where + is the join operation under (B,·)

» The complement of a function g(x1,x2,...,xn)2B is the function g(x1,x2,...,xn)0 where 0 denotes complementation under (B,·)

The Boolean Algebra of Boolean Functions

Page 42: CSE 460: Switching Theory

1-42 - David Zar - 04/22/23

For example, the Boolean algebra of two variable switching functions has Hasse diagram

All properties of Boolean algebras, lattices, and posets can be applied to the Boolean algebra (B,¹)

Logic minimization algorithms are methods of systematically applying these properties

Hasse Diagram of the Boolean Algebra

Page 43: CSE 460: Switching Theory

1-43 - David Zar - 04/22/23

Definition: The atoms of a Boolean algebra are its minimal nonzero elements. That is, the set A of atoms of a Boolean algebra (B,·) is A={x2 B:x 0 and y· x ) y=0 8 y2 B}

Since all finite Boolean algebras are isomorphic to a power set with the same number of elements:» a Boolean algebra with carrier B and atoms a2 A has|B|=2|A| elements» a Boolean algebra is uniquely determined (up to element names) by its set

of atoms

Because the atoms are defined as minimal, nonzero elements the following properties hold for all a,b2 A:1. a¢b = 02. a+bA3. a2 A a = 1

The set A of atoms of the Boolean function algebra (B,¹) of n-variable functions over the Boolean algebra (B,·) with atoms A is given by the cross product of the set of n-variable minterms and the set A

The set of atoms of the Boolean algebra of n-variable switching functions is the set of n-variable minterms

Atoms of a Boolean Algebra

Page 44: CSE 460: Switching Theory

1-44 - David Zar - 04/22/23

Consider the atoms of the Boolean algebra (B,¹) of two variable Boolean functions defined over the Boolean algebra (2{a,b,c},µ) » The set of minterms of two variable Boolean functions is

» The set of atoms of the Boolean algebra (2{a,b,c},µ) is

» The set of atoms of the Boolean function algebra (B,¹) is

Any element e of a Boolean algebra E can be uniquely

characterized by the set of atoms which, when combined with the join operator, yield the element e

An element e is greater than or equal an element f if and only if the set of atoms representing e contains the set of atoms representing f

Example of Atoms of a BA

Page 45: CSE 460: Switching Theory

1-45 - David Zar - 04/22/23

Definition: An interval [L,U] in a Boolean algebra B is the subset of B defined by

By construction, an interval in a Boolean algebra is itself a Boolean algebra, ([L,U],·)» The least element is L» The greatest element is U» It is characterized by its atoms

We can define an interval in any Boolean algebra. Particularly they can be defined for Boolean function algebras.

Since all elements in an interval are greater than or equal to L the set of atoms representing them must contain the set of atoms representing L

In some cases, the value of a Boolean function for certain combinations of inputs is irrelevant. We say that the value of the function is don't care (denoted -) for these inputs.» Satisfiability don't cares arise when it is known that certain input combinations

will never occur» Observability don't cares arise when the output is known to be irrelevant to

successive circuits for certain inputs The don't care conditions (the set of inputs for which the function is

don't care) can be described by the set of minterms whose discriminant is irrelevant

Intervals in Boolean Algebras

Page 46: CSE 460: Switching Theory

1-46 - David Zar - 04/22/23

Looking back at the minterm canonical form, we can represent a Boolean function f over a Boolean algebra (B,·) as the join

where fa is the join of all minterms with corresponding discriminant equal to a, etc.

A set of don't care conditions corresponds to an additional function f- equal to the join of minterms for which the function f is don't care A function with don't care values corresponds to an interval [L,U] in

the Boolean function algebra where

and

Given an interval of functions, the minterms for which the function is don't care is given by the set of minterms of U with discriminant 1 minus the set of minterms of L with discriminant 1.

Don’t Cares