<<

Int'l Conf. Frontiers in Education: CS and CE | FECS'15 | 131

Lattices and Boolean Algebra from Boole to Huntington to Shannon and Theory

Hassan Farhat Computer Science University of Nebraska at Omaha, USA

Abstract - The study of computer design and architecture Boolean algebra where the elements can be true or false, high includes many topics on formal languages and discrete or low, and 0 or 1 for example [9-15]. structures. Among these are state minimizations, Boolean In this paper we survey the progress of this important algebra, and switching algebra. In minimization, three algebra from its beginnings to today's definitions based on approaches are normally used that are based on equivalence lattice theory. Since its introduction in 1847 the algebra has relations. Partial order relations are used today in witnessed contributions by many scholar such as Pierce [16], constructions of Boolean algebra. Venn [17], Huntington [18], and Shannon [5]. We compare In this paper we survey this important algebra from its these contributions as we progress in the survey. After the beginnings as alternative symbolic algebra starting with initial idea of forming this survey, we found an expanded George Boole and De Morgan, to Peirce, to Venn, to reference on the topic [19]. Part of our work is influenced by Huntington and to Shannon. We then look at definitions [19]. based on lattice theory. Lattices are special cases of partially The paper is organized as follows. In section 2, we look ordered sets that have common properties with equivalence at the history of the algebra from Boole to Peirce to Venn and relations. The paper is educational in nature intended to aid to Huntington. Section 3 looks at the contributions by the instructor on this topic from its beginnings and provide a Shannon. In section 4 we look at Boolean algebra as a special condensed survey. type of a lattice. Section 5 discusses the common mathematical properties. The conclusion is given in section Keywords: Digital Design, Boolean Algebra, Switching 6. Algebra, Symbolic Algebra, Lattices, State Minimization 2 A Brief History of Boolean Algebra 1 Introduction from Boole to Peirce, Venn, and

Fundamental to all aspects of computer design is the Huntington of Boolean algebra and formal languages used in the study of finite state machines. Topics on formal Boolean algebra derives its name in honor of George Boole languages are found in [1-3]. [4]. During the mid-nineteenth century, several scholars Boolean algebra provides the mathematical tools needed were interested in formalizing alternative algebras on logic in design, realization and verification. While the algebra was that is different from numerical algebra (algebra of numbers) intended as a mathematical tool for formalizing logic [4], [4,7]. These included Boole, De Morgan and Hamilton. De many years later it found applications in computer Morgan's influence on the formalization of Boolean algebra engineering where it was adapted by Shannon as two-valued is evident in De Morgan's Formal Logic and examples of algebra to be used in design of relays [5,6]. The algebra has symbolic algebra [7]. In symbolic algebra, the algebra is matured since its introduction by its founder George Boole defined by a set of symbols and a set of operations on the and other scholars such as De Morgan [7]. Boole symbols. The different interpretations of the algebra are introduction of the symbolic algebra emphasized similarities derived afterwards. This notion of the symbolic algebra has and differences to traditional numerical algebra. In influenced Boole formalization of the algebra as discussed expanding the possible similarities between both, Boole did next. consider a two-valued Boolean algebra as a solution to the In [8], Boole discussed his Algebra of Logic where he x = x). The idempotent property referred to the combinations of symbols and operations asڄ idempotent property (x holds true in traditional numerical algebra only for two cases, signs and then continued to break the signs into literals x = 0 and x = 1 [8]. Today, with few exceptions, many (symbols) and "signs of operations" on the literals such as +, textbooks on computer and digital design assume a two-value –, × and "sign of identity, =" (borrowed from numeric algebra

132 Int'l Conf. Frontiers in Education: CS and CE | FECS'15 |

but with different interpretations). His interpretation of a to 1 – x. Boole represented 1 – x as "contrary or literal such as x as "a class of individuals to which a supplementary class of objects". particular name or description is applicable". He also Today's Boolean algebra is such that the idempotent referred to the class of "nothing" to mean "no being" and class property holds true under + as well based on Peirce and Venn of "universe" to mean "all beings". Today these represent the modifications [16,17]. While under Boole the term x + x will empty set and the universal set. have no meaning due to the constraint that the classes must As to the operations on classes, Boole used the product be mutually exclusive (not possible when both terms (x) are xy, where x and y represent two classes, to mean the class of the same), starting with Peirce and following with Venn the things where the descriptions (or individuals) given to x and idempotent property holds true due to relaxing the constraint y are simultaneously true (applicable). "Let it further be of mutual exclusion. agreed, that by the combination xy shall be represented that Boole restriction of the use of + with mutual exclusive to class of things to which the names or descriptions preserve the aggregate sum as in arithmetic sum was relaxed represented by x and y are simultaneously applicable. Thus, by Peirce where + represents a logical (logical if x alone stands for "white things," and y for "sheep," let xy ). To emphasize this, Peirce changed the + stand for "white sheep;"". With this definition, two important operation to '+,' and defined '+,' as "a +, b denote all the properties are deduced to hold true, as is the case in numeric individuals contained under a and b together". That is, what algebra with respect to multiplication, mainly commutativity is common to a and b is taken into account once. This is and associativity, hold true in Boole Algebra of Logic. similar to counting number of elements in the resulting set of In his writings, it was a common theme for Boole to the operation. relate his form of algebra to traditional numeric algebra and Similar arguments were presented by Venn to the point to similarities as well as to differences. Among the meaning of logical add, a + b, where he considered several differences between the two algebras he discussed were the interpretations [17]. Venn's contribution to symbolic logic cancellation property, which holds true in regular algebra but includes Venn diagrams where he represented classes (sets) not in his symbolic algebra, and the idempotent property, using circles and represented composition (set ), which holds true in symbolic algebra but not in regular addition (set union) and 1 – x (set complement) using these algebra. The cancellation property is diagrams. In further developing the symbolic algebra introduced by xy = xz and x ≠ 0 then y = z (1) Boole, Huntington [18] has considered an alternative important approach to further the study; it is that of axiomatic The idempotent property is algebra based on a set of symbols, and a set of postulates including composition postulates. This was emphasized in xx = x (2) Huntington paper [18], "… show how the whole algebra, in its abstract form, may be developed from a selected set of In continuing with comparisons of common properties of fundamental propositions, or postulates, which shall be the two algebras, Boole introduced a two-value Boolean independent of each other, and from which all the other algebra as an algebra where the idempotent property does propositions of the algebra can be deduced by purely formal hold true as follows. If the composition is understood as a processes." multiplication in traditional numeric algebra then the solution The algebra considered does not depend on the meaning to equation (2) in regular algebra is x = 0 and x = 1. Hence or interpretation of the symbols as intended by Boole but an algebra with two classes only "nothing" (0 in traditional rather on the set of postulates placed on the compositions of algebra) and "universe" (1 in traditional algebra) will work in the symbols. To distinguish the compositions symbols found both algebras with the operators interpreted accordingly. in the postulates from the traditional symbols found in and ,ڀ ,ۨ ,۩ Today's Boolean algebra includes two additional numeric algebra, Huntington used the symbols to represent combination operators and special element ٿ operations, OR (+) and NOT ( ¯ ). Boole considered these operations in [8] where he defined the binary operator + to symbols. In the application to Boolean algebra, the symbols have a meaning over classes (operands) that have nothing in represent, respectively, the logical sum, logical product, the common, mutually exclusive. x + y refers to aggregate class constant 1, and constant 0. (set) composed of x and y. This was done in analogy to In his paper, Huntington presented three sets of regular algebra, the number of elements in the aggregate set equivalent postulates. We list the first set taken from [18]. is the sum of the elements in each class. This definition has "… we take as the fundamental concepts a class, K, with two changed since then and is replaced by the inclusive OR as rules of combination, ۩ and ۨ; and as the fundamental suggested by Peirce and Venn [16,17]. As to the NOT propositions, the following ten postulates: operator, Boole used the notation 1 – x to mean x̅ or x'. The .use of the over bar, instead of 1 – x, was suggested by Venn Ia. a ۩b is in the class whenever a and b are in the class .to remove the ambiguity resulted from 1 – x. Later, Shannon Ib. a ۨ b is in the class whenever a and b are in the class [5] used the prime symbol as alternative to the over bar and

Int'l Conf. Frontiers in Education: CS and CE | FECS'15 | 133

a for every represent that portion of the original class by the expression = ٿ ۩ such that a ٿ IIa. There is an element element a. ux…. Hence the class in its totality will be represented by a for every = ڀ ۨ such that a ڀ IIb. There is an element element a. ux + v(1 – x); IIIa. a ۩ b = b ۩ a whenever a , b, a ۩ b, b ۩ a are in the class. which may be considered as a general developed form for IIIb. a ۨ b = b ۨ a whenever a, b, a ۨ b, b ۨ a are in the the expression of any class of objects considered with class. reference to the possession or want of a given property x". IVa. a ۩ ( b ۨ c) = (a ۩ b) ۨ (a ۩ c) whenever a, b, c, a Note that based Boole definition of +, the + applies to b, a ۩ c, b ۨ c, a ۩ (b ۨ c), mutually exclusive classes which is certainly the case for a ۩ and (a ۩ b) ۨ (a ۩ c) are in the class. two-valued algebra (the universe is x and (1 – x)). He later IVb. a ۨ (b ۩ c) = (a ۨ b) ۩ (a ۨ c) whenever a , b, c, a states "treat x as a quantitative symbol, susceptible only of .(b, a ۨ c, b ۩ c, a ۨ (b ۩ c), the values 0 and 1" and assigns the above equation to f(x ۨ and (a ۨ b) ۩ (a ۨ c) are in the class. Then he solves the equation for x = 0 and x = 1 to result in in postulates IIa and IIb exist and ڀ†ƒٿ V. If the elements are unique, then for every element a there is an element a̅ 0()1()( )(  xfxfxf )1 .ٿ = and a ۨ a̅ ڀ = such that a ۩ a̅ VI. There are at least two elements, x and y, in the class such Shannon used X' instead of (1 – x) and has expanded the that x ≠ y." above equation to several variables as

Huntington used proof by deduction to derive the XXXf ),,,( different Boolean algebra properties found in today's 21  n )textbooks. He also gave an example of ۩ and ۨ tables 1 2  n ),,,1(.  1 '. 2  XXfXXXfX n ),,,0 similar to truth tables of the logic OR and AND when the class of elements, K, contains 0 and 1 only (two-valued He then proved the equality by perfect induction on X1 (X1 = Boolean algebra). 0 and X1 = 1). He then repeated the above on all variables, always expanding the right-hand side, to obtain the 3 Shannon's Contribution to Digital canonical-sum equation Design XXXf ),,,( 21  n While the algebra and its definitions as an f  nn   11  fXXX  nn   ''')1,,0,0(''')0,,0,0( XXXX 121 was founded and studied as an abstract mathematical  )1,,1,1( XXXf , Shannon [5] related the algebra to relays   nn   11 design in electrical engineering. With that, the algebra found footing in digital and computer design. We look at Shannon's Shannon's proofs by perfect induction were possible because contribution in this section. of the two-valued Boolean algebra chosen with known Shannon represented the composition operations in . Boolean algebra as switches in parallel and in series. He also used the switch structure to simplify Boolean expressions. In 4 Boolean Algebra as a Lattice addition, he introduced the method of proof by perfect induction, used to show equality of Boolean functions. Other Today the definition of Boolean algebra has extended to contributions included Shannon's expansion, adapted from lattice theory. A good source for lattice theory and Boolean Boole expansion with regard to his special two-value algebra. algebra is found in [20]. The section looks at this topic. The following excerpts are taken from Boole [8]. Boole restricted his discussion to: composition, the aggregate "Suppose that we are considering any class of things operator + and the contrary operator (1 – x). Lattice theory is with reference to this question, viz., the relation in which its an extension of the concepts of partial orders defined over a members stand as to the possession or want of a certain set of elements and a relation, R, over the set. The property x. As every individual in the proposed class either contribution of this section is in presenting a condensed possesses or does not possess the property in question, we compiling of the concepts. may divide the class into two portions, the former consisting A relation, R, from a set L to itself is a of the of those individuals which possess, the later of those which L × L and called a relation on L (or relation do not possess, the property. … Suppose then, …, that the over L). Elements of R can be written as (a, b) or a R b. members of that portion which possess the property x, Let R be a relation on a set L. We say L א R, ׊ a א (possess also a certain property u, and that these conditions a) R is reflexive if and only if (a, a R א (R then (b, a א (united are a sufficient definitions for them. We may then b) R is symmetric if and only if (a, b

134 Int'l Conf. Frontiers in Education: CS and CE | FECS'15 |

where L is a distributive and (ٿ ,ڀ ,R then algebra is (L א (R and (b, c א (c) R is transitive if and only if (a, b R. . With 0 and 1, a complemented lattice א (a, c) L there exists an א is a lattice where for each element a א (R and (b, a א (d) R is antisymmetric if and only if (a, b ٿ a̅ = 1 and a ڀ R then a = b. element, a̅ , called complement of a, where a ٿ b) ڀ A relation that is reflexive, symmetric and transitive is a̅ = 0. A satisfies the properties: a ,c) ׊ aٿ a)ڀ (b ٿ c) = (a ڀ b) ٿ c) and aڀ a) ٿ (b ڀ called an . In digital design equivalence c) = (a .L א relations are used in state minimizations as an example. A b, c relation that is reflexive, antisymmetric and transitive is said With the above definition, we can show Huntington to be a partial ordering relation. The set with the partial proposition as given in the previous section hold true. This ordering relation is called a and is done in the next section. abbreviated as poset. A partially ordered set, L, is normally represented as 2-tuple (S, ≤) where ≤ represents the partially 5. Boolean algebra as Lattices, ordered relation R on L. This is in analogy with the less than or equal to operator (≤ ) as a partial ordered relation on the Huntington postulates, and Shannon's set of integers. Lattices are special types of partially ordered two-valued Boolean algebra ,L, the 2-tuple (a א L and b א set on set L where for each a b) has a unique greatest lower bound (glb) and unique least In this section we look at showing the algebra defined using lower bound (lub) discussed next. lattice theory satisfies the Huntington proposition. In the and ۨ the meet ڀ (Let (L, ≤) be partially ordered with a, b, x, y in L. (a) x verification, note that ۩ is the join (sum ٿ is the greatest element 1 and ڀ Note as well .ٿ (is said to be a lower bound of a and b if x ≤ aand x ≤ b. (b) (product Similarly, y is said to be upper bound of a and b if a ≤ yƒ† is the least element 0. b ≤ y. (c) x is also said to be a greatest lower bound (glb) of Verification of Ia and Ib follows since by definition the a and b if and only if for any other element x' in L, where x' glb and lub of any two elements in L is such that both glb and ڀ and (ۨ) ٿ is a lower bound of a and b we have x' ≤ x. (d) y is also said lub are in L as well. This is set closure under to be a least upper bound (lub) of a and b if and only if for (۩). Proposition IIa and IIb follow as well since for each a . IIIa and IIIb = 1 ٿ a and a = 0 ڀ L we have a א any other element y' in L where y' is an upper bound of a and element a b we have y ≤ y'. An element, g, in L is said to be a greatest for commutativity also holds true since the glb of (a,b) is the L, a ≤ g. Similarly, and same as the glb of (b,a) and the lub of (a,b) is the same as the א element if and only if for every a element l in L is said to be least element if and only if for lub of (b,a). The distributive properties holds by definition L, l ≤ a. of the Boolean algebra above (distributed lattice). For א every a The greatest upper bound, least upper bound, greatest postulates VI there at least two elements in the class; we element and least element are unique. For completeness we assume the minimum number of elements in L is two include the proof of two sample cases. corresponding to the least element (0) and greatest element Case 1: for any two elements a, b in L their glb is unique. (1). Assume there are two glb's x1 and x2. Since x1 and x2 are  It is remaining to show the existence of the complements both lower bounds of a and b we have x1 ≤ x2 since x2 is the and the uniqueness of the complements. The existence of greatest lower bound of a and b. Similarly, we have x2 ≤ x1 complements follows from complemented lattices. The since x1 is the greatest lower bound of a and b. By the uniqueness of complements follows. L with two complements א antisymmetric property x1 = x2. Assume given an element a Case 2: The least element is unique. Similar logic is x and y. Since each is a complement of a, we have L hence l1 א applied. l1 ≤ l2 since l1 is the least element (l2 ሻ›ڀሺƒٿͳൌšٿl2). Similarly l2 ≤ l1. By the antisymmetric property we  šൌš ≥ ሻ›ٿሺšڀሻƒٿhave l1 = l2. ൌሺš ሻ›ٿሺšڀThe uniqueness of the glb, lub, least element and greatest ൌͲ šٿൌ››ٿelement is used in the definition of Boolean algebra as ൌš follows. First, for any two elements a and b in L, since lub  and glb are unique they can be thought of as binary operations Now starting with y we have or + for the lub, and ڀ called join or sum represented by ሻšڀሺƒٿͳൌ›ٿor ̇ . Since the least element  ›ൌ› ٿ meet or product represented as ሻšٿሺ›ڀሻƒٿand greatest elements are unique, they are represented as 0 ൌሺ› ሻšٿሺ›ڀand 1. In terms of algebraic representation, we can represent ൌͲ šٿwhere L is a set of ൌ› (1 ,0 ,ٿ ,ڀ ,the previous as a 5-tuple (L  are binary operations, and with 0 and 1 ٿ and ڀ ,elements representing the least and greatest elements of L. Hence x = y and the complement is unique. With two additional properties on elements of a lattice the definition of a Boolean algebra is established: a Boolean

Int'l Conf. Frontiers in Education: CS and CE | FECS'15 | 135

6 Conclusion [7] A. De Morgan, “Formal Logic: or, The Calculus of Inference, Necessary and Probable”, Taylor and In this paper we surveyed the algebra, Boolean algebra, from Walton, London, 1847. its beginning by George Boole and De Morgan's where it did [8] G. Boole, “An Investigation of the Laws of Thought on not attract initial interest to attracting much interest many Which are Founded the Mathematical Theories of years later by several scholars such as Peirce, Venn, Logic and Probabilities”, Walton and Maberly, London, Huntington and Shannon. We then looked at lattice theory 1854 [9] S. Brown and Z. Vranesic, “Fundamentals of Digital and at Boolean algebra as a special type of a lattice, a rd complemented and distributive lattice. We concluded with Logic with VHDL Design with CD-ROM, 3 edition”, showing that Huntington postulates can be derived from McGraw-Hill, 2009. Boolean algebra as a complemented and distributive lattice. [10] T. Floyd, “Digital Fundamentals: A System Approach”, Our contribution is to provide a condensed survey of the Prentice Hall, 2013. progress of the important algebra from its beginnings starting [11] W. Kleitz, “Digital Electronics a Practical Approach with VHDL, 9th edition”, Prentice Hall, 2012. with Boole and De Morgan's. th [12] M. Mano and M. Cilette, “Digital Design, 5 edition”, Prentice Hall, 2013. [13] R. Tocci, N. Widmer and G. Moss, “Digital Systems References Principles and Applications, 11th edition”, Prentice Hall, 2011. [1] J. E. Hopcroft, R. Motwani, & J. D. Ullman, [14] J. Wakerly, “Digital Design Principles and Practices 4th “Introduction to Automata Theory, Languages, and edition”, Prentice Hall, 2006. Computation, 3rd edition”, Addison Wesley, 2007 [15] D. Harris and S. Harris, “Digital Design and computer [2] Rich, “Automata, Computability and Complexity: Architecture”, 2nd edition, Morgan Kaufman, 2013. Theory and Applications”, Prentice Hall, 2008. [16] C. S. Peirce, “On an Improvement in Boole's Calculus [3] Sudkamp, “Languages and Machines: An Introduction of Logic”, Proceedings of the American Academy of to the Theory of Computer Science, 3rd edition”, Arts and Sciences, 7, pp. 250-261, 1867. Addison Wesley, 2006 [17] J. Venn, “Symbolic Logic”, MacMillan, London, 1881 [4] G. Boole, G. “Mathematical Analysis of Logic”, [18] E. V. Huntington, “Sets of Independent Postulates for MacMillan, Barclay & MacMillan, Cambridge, 1847 the Algebra of Logic”, Transactions of the American [5] C. E. Shannon, “The Synthesis of Two-Terminal Mathematical Society, 5:3, pp. 288-309, 1904. Switching Circuits”, Bell System Technical Journal, 28 [19] J. H. Barnet, “Origins of Boolean Algebra in logic pp. 417-425, 1949. Classes: George Boole, John Venn and C.S. Peirce”, [6] C. E. Shannon, “A Symbolic Analysis of Relay and Mathematical Association of America, 2013. Switching Circuits”, Masters Thesis, MIT 1940. [20] A. Doerr and Levasseur, “Applied Discrete Structures”, lul publishing (lul.com), 2013.