Professional Documents
Culture Documents
Developed by The Center for Conceptual Studies Presented by: Richard Singer ccsfrs@worldnet.att.net Phone Number: (314) 721-2779 Edition Date: 1/00 This is the first in a collection of units on boolean algebra. Appendix 2 gives an outline describing these units and showing the relationship between them. Notation &: and : or : not : belongs to the set Boolean Lattice Laws This unit will introduce some specific structures called boolean lattices. The main laws that such structures satisfy are listed below for easy reference. You are not expected to understand them until later. xy = yx (xy)z = x(yz) 1x = x x1 = x x(y+z) = (xy)+(xz) 0x = 0 x0 = 0 x+(xy) = x xx = x x/x = 0 /xx = 0 (xy)+(x/y) = x /(xy) = /x+/y /(x+y) = /x/y //x = x complement x+y = y+x (x+y)+z = x+(y+z) 0+x = x x+0 = x x+(yz) = (x+y)(x+z) 1+x = 1 x+1 = 1 x(x+y) = x x+x = x x+/x = 1 /x+x = 1 (x+y)(x+/y) = x /(/x/y) = x+y /(/x+/y) = xy commutative associative identity distributive annihilator absorption idempotent complement reduction DeMorgan double
Briefs Parentheses and multiplication signs may be omitted according to the usual conventions of ordinary algebra. Boolean Inequality: The relation is defined by: x y iff xy = x xx reflexive xy&yxx=y xy&yzxz 0 x, x0x=0 x 1, 1xx=1 x y xz yz, x y & w z xw yz x y x+z y+z, x y & w z x+w y+z antisymmetic transitive minimum maximum addition multiplication
SECTION 0 INTRODUCTION
Algebra When a collection of mathematical systems satisfy similar algebraic laws, we can classify them as being of a certain type and study the laws common to this type of system. The ordinary algebra studied in secondary school focuses on laws for the integers, the rationals, the reals, and certain other algebraic structures. Students are seldom aware of this point of view. They just think they are studying algebra. They dont even have a special name for this type of algebra and probably wouldnt even call it ordinary algebra, having never encountered another type of algebra and recognized it as such. The structures to which much of ordinary applies are examples of what mathematicians call rings. There are many less familiar examples of rings, so ordinary algebra can be considered as the study of the algebra common to some special kinds of numerical rings. Boolean Algebra What is boolean algebra? Why would anyone study it? Compared to the mathematics normally taught in school, boolean algebra is new. It was invented in the 19th century when George Boole investigated set operations and the operations of propositional logic. Boolean algebra was later found to apply to the design of digital control systems. This present unit focuses on the concepts of boolean algebra by using these concepts to describe solutions for attribute puzzles. It also introduces the application of boolean algebra to digital design. The puzzles in this unit are stated as if they involved a challenge, but this is only to illustrate the idea of an attribute puzzle and to introduce boolean concepts. Attribute puzzles involving some real challenges can be found in Various Attribute Puzzles. A more direct application of boolean algebra to logic can be found in Various Logic Puzzles. Likewise the digital design problem in this present unit is simplistic. It is given only to illustrate boolean concepts. More significant design problems are suggested in Digital Control Devices. Before illustrating the application of boolean algebra we exhibit some structures whose algebra is boolean, and we describe the laws they satisfy. BIT Operations The only competencies required for the study of boolean algebra is an understanding of the basic concepts of ordinary algebra, and a flexible attitude towards the use of notation. The core structure for boolean algebra is a simple one, involving a set with only two elements, denoted as 0 and 1. We shall refer to this set as BIT. The ordinary product of two bits gives a bit. This is not the case for the ordinary sum, since the ordinary sum of 1 and 1 is 2. For a sum operation that only gives bits, we must use either 1+1 = 1 or 1+1 = 0. It is the first of these which will be the main focus of these units on boolean algebra, although the other sum is also used in some of them. Boolean arithmetic also includes a unary operation /, called complementation, which is not suggested by any operation from ordinary arithmetic. Thus the main operations for BIT which we apply in this unit are given below. 00 = 0 01 = 0 10 = 0 11 = 1 0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1 /0 = 1 /1 = 0 The set BIT is called a boolean lattice with respect to these operations, and the sum indicated above is called the boolean lattice sum. BIT is called a boolean ring with respect to the product above and the sum operation for which 1+1 = 0. Unit Boolean Lattice Theorems, described in Appendix 4, gives a detailed discussion of the two types of operational structure for BIT. Both play an important role in contemporary mathematics.
Remark The main reason some people have difficulty with 1+1 = 1, is that they you associate the symbol + exclusively with numerical addition. The convention above merely gives another use to this symbol. We could use a different symbol for the lattice sum, but using + simplifies the notation for boolean operations. It also makes it easy to transform habits learned in ordinary algebra to similar habits needed for boolean algebra. The use of the same name for different things that are closely related is a common practice. For instance, new towns are sometimes named by their settlers, using names of the towns they left behind. Boolean Lattice Laws To use the operations for BIT, we focus on the algebraic laws satisfied by these operations. The cover lists some of the main laws that are useful for BIT. Some of these follow immediately from the definition of BIT operations. For example, the identity law for sums is immediate, since the only elements of BIT are 0 and 1, and since 0+0 = 0, 0+1 = 1, 1+0 = 1. For laws that are not as immediate, we can use BIT arithmetic on the expressions involved. These 2 tables show that both parts of the distributive law are satisfied. The first one shows what happens when we use BIT arithmetic to calculate x(y+z) and xy+xz for all possible bit triples for the variables (x, y, z). xyz 000 001 010 011 100 101 110 111 x(y+z) 0 0 0 0 0 1 1 1 xy+xz 0 0 0 0 0 1 1 1 xy These 2 table uses all possible bit pairs (x, y) to show that both x+xy and x(x+y) are equal to x. Thus both parts of the absorption law are satisfied. 00 01 10 11 x+xy 0 0 1 1 xyz 000 001 010 011 100 101 110 111 x+yz 0 0 0 1 1 1 1 1 xy 00 01 10 11 (x+y)(x+z) 0 0 0 1 1 1 1 1 x(x+y) 0 0 1 1
Some of the boolean laws are the same as the laws of ordinary algebra, but BIT also satisfies some other laws that are not the laws of ordinary algebra. For instance, BIT satisfies the absorption law as indicated in the preceding bit table, and the idempotent laws which are immediate from the definition of BIT operations since 00 = 0, 11 = 1, 0+0 = 0, 1+1 = 1. BIT also satisfies a strange annihilator law x+1 = 1, where 1 acts for sums the wayy0 act for products. While these laws may seem strange when first encountered, once you are familiar with them, you can use them as a major tools for transforming boolean expressions. Since ordinary algebra does not have an operation like the complement, this operation is also a source of some laws not found in ordinary algebra. That //x = x is immediate from the definition of BIT operations. To show x+/x = 1, note that 0+/0 = 0+1 = 1 and that 1+/1 = 1+0 = 1. The reduction laws can be easily verified by a bit table.
Boolean algebra can be considered as the study of the algebra common to some special kinds of lattices. For a general definition of ring and lattice, see Boolean Lattice Theorems. In this present unit we will take a less abstract algebraic perspective. Note that boolean and ordinary algebra share some common laws. For both types of algebra, + and are commutative and associative, 0 and 1 are identity elements for + and respectively, distributes over +. However in boolean algebra + also distributes over . Perhaps the most apparent difference is the idempotent law. Also the boolean complement does not behave like a numerical inverse. The similarities in laws allow some techniques from ordinary algebra to be carried over into boolean algebra. Because there are differences, this must be done with some caution. Furthermore these differences allow for techniques not available in ordinary algebra. One of the main purposes of this unit will be to exploit the similarities and develop the differences in more detail. Bit String Lattices The laws on the cover are called boolean lattice laws rather than BIT laws, since BIT is only one of many structures that satisfy them. In particular, let BIT2 be the set of all bit strings of length 2, and define operations with the tables below. This can be generalized to bit strings of any length. x /x
00 01 10 11 00 00 00 00 00 01 00 01 00 00 10 10 00 01 10 11
+ 00 01 10 11
00 01 10 11 00 01 10 11 01 01 11 11 10 11 10 11 11 11 11 11 If we denote 00 as 0 and 11 as 1, then BIT2 is a boolean lattice with respect to these operations.
00 11 01 10 10 01 11 00
00 01 10 11
Note that for bit strings x and y, we have xy = x iff all the bits in x are less than or equal to the corresponding bits in y. This is one of the observations that motivated the definition of the relation on the cover. At times we want to focus on the fact that x y but x y. We denote this as x < y. An element of a boolean algebra is called an atom iff the only element less than it is 0. For a bit string lattice the atoms are those elements having exactly one bit which is a 1. Set Lattices Let X and Y be any subsets of the set {a, b, c}. Denote this set by 1 and the empty set by 0. Denote the union and intersection and of X with Y as X+Y and XY respectively. Denote the complement of X as /X. It is easy to show the set of all subsets of {a, b, c} satisfies the boolean lattice laws. Furthermore, the boolean defined on the cover is merely the subset relation and the atoms are the sets with exactly one element. Of course from an algebraic perspective there is nothing special about the subsets of {a, b, c} The collection of subsets of any set forms a boolean lattice in a similar manner, and in contemporary mathematics the study of sets is the main application of boolean concepts. Def of for Boolean Lattices The subset relation can be described in terms of the intersection operation. In particular x is a subset of y if and only if the intersection of x with y is x. This suggests the definition of the relation for boolean inequalities given on the cover. This definition allows us to change an inequality to an equation, and thus easily mix the use of inequalities and equations in boolean algebra.
Def of Atoms For Boolean Lattice The intersection any set A having exactly one element with any other set is either A or 0. The concept of an atom can also be defined in terms of a lattice products, Thinking of an atom as element with only 0 as smaller is more intuitive than the one given below, however it is less algebraic. a is an atom iff a 0 and for any x either ax = a or ax = 0. Note that that the product of 2 different atoms is 0 follows from this definition. Terminology Note that any set is the union of all its single element subsets. Thus it is the sum of the atoms it contains. Likewise a bit string is the sum of the atoms it contains. The fact that all other elements of a boolean lattice can be built by adding atom is what suggests the concept of an atom. Bit String Names Name any subset X of {a, b, c} by writing a 1 in bit 1 if aX, a 1 in bit 2 if bX, a 1 in bit 3 if cX. Let denote the function that maps a set to its bit string name. The bit string names for the subsets of {a, b, c} are given below. A similar coding method can be used for the subsets of any finite set. {} = 000, {a} = 100, {b} = 010, {c} = 001, {a, b} = 110, {a, c} = 101, {b, c} = 011, {a, b, c} = 111 Side Remark Since (/{a, b} = 001 and /{a, b} = 001Thus (/{a, b} = /{a, b}. Also note that ({a, c}{a, b}) = {a, c}{a, b}, and ({a, c}+{a, b}) = {a, c}+{a, b}. This can be generalized as below, allowing us to use bit strings arithmetic to do set arithmetic. Since computers have machine level instructions for bit string arithmetic, this gives an efficient method for programming computers to work with sets. Such programs can also be written in higher level language, as indicated by the project in Appendix ??. /(X) = (/X) (XY) = (X)(Y) (XY) = (X)(Y) Propositional Logic The boolean system BIT can be related to logic by letting variables represent propositional formulas and letting 0 and 1 represent false and true. Since a+b = 1 if a = 1 or b = 1, the lattice sum represents the logical operation of inclusive alternation and we may read a+b as a or b. Likewise the boolean product represents the logical operation of conjunction and we may read ab as a and b, while the boolean complement represents logical negation and we may read /a as not a. Because of this application to logic some books use the logical symbols & and rather than and + for these operations. Some applications of boolean algebra to logic are given in Various Logic Puzzles. For an extensive application of boolean algebra to propositional logic, see the our units on mathematical logic. A Broader Perspective on Mathematics The main reason we have developed the units on boolean algebra is to bring a broader perspective on mathematics to a wider audience. For a brief discussion this see Appendix 1.
Boolean Table Solutions for Attribute Puzzles For any clue, there is a unique subset of BAS that satisfies the clue, and which can be coded by a bit string. This bit table indicates how to solve BI0 using BIT8. There is a row for each of the main subsets of BAS. Using BIT8 arithmetic on these gives rows for the satisfaction subset of the clues. The product of these gives the final row which the shows that lbc is the only item satisfied by all the clues.
BIT String Description Except for notation, the BIT8 arithmetic solution to BI0, is similar to the manifest one. The only difference is that a bit table shows items eliminated by each clue. Once you are used to bit tables, it is convenient to abbreviate each row as a string from BIT8. This gives the following brief description of this solution. iS iR iS iC All 1111 0000 Note: To make bit strings easier to read, we use a space in the middle. 1100 1100 Names of items are omitted. If you forget which items the 1010 1111 bits refer to, recall the table for BI0. 1000 0000 lbc
BIT Variables The main subsets of BAS are denoted by S, L, R, B, D, C. S denotes the small items, L the large items, etc. Given a puzzle, we use s, l, r, b, d, c as variables indicating which of these subsets the item we want must belong to. s = 0 if iS s = 1 if iS l = 0 if iL l = 1 if iL r = 0 if iR b = 0 if iB r = 1 if iR b = 1 if iB d = 0 if iD c = 0 if iC d = 1 if iD c = 1 if iC
Instead of using BIT8 arithmetic, we could use BIT variables to give an algebraic solution to BI0. For example, the information in the clue iS iC can then be given as s+c = 1. Standard notational convention from ordinary algebra are also used in boolean algebra. Brief Algebraic Description (1) s = 0 (2) r = 0 (3) s+c = 1 clues (4) l = 1 by (1) (5) b = 1 by (2) (6) c = 1 by (1)(3) (7) lbc = 1 by (4)(5)(6) Note: This is brief for (lb)c = 1. Algebraic Laws For BAS To see that (4) follows from (1), first take complements to obtain /s = /0. Then use /s = l. These is one of the algebraic laws below which hold for BAS because of the meaning of the variables and the relationships between attributes. sl = 0, s+l = 1, /s = l, /l = s, rb = 0, r+b = 1, /r = b, /b = r, dc = 0, d+c = 1, /d = c, /c = d BI1 i is large and i is red. i is blue or i is a circle. BI2 i is a circle or i is small. i is blue or a diamond. i is red. BIT8 Solutions BI1 iL & iR 0011 0000 iB iC 1110 1110 All 0010 0000 BI2 iC iS iB iD iR All 1010 1111 1101 1101 0011 0011 0000 0001
BIT Algebra Solution For BI1 we give a detailed explanation for each step. We leave it to you to do the same for BI2. BI1 (1) lr = 1 (2) b+c = 1 (3) b = 0 (4) c = 1 (5) lrc = 1 clue clue (1) mult by b, br = 0, annih (3)(2) replace b, ident (1)(4) mult, 11 = 1 BI2 (1) (2) (3) (4) (5) (6) c+s = 1 b+d = 1 r=1 d=1 s=1 srd = 1 clue clue clue (3)(2) (4)(1) (5)(3)(4)
Details An algebraic description should include enough details to make it easy to follow, but not so many to make it tedious. If we the amount of details doesnt suit your taste, either expand or contract our description. For more detail we could insert a step with b = 0 before step (4) in the solution for BI2. However since the only colors are red and blue, b = 0 follows intuitively from (3). From an algebraic perspective, we can complement r = 1 to obtain b = 0. Since br = 0, taking the product of r = 1 with b also gives this result. While it is useful to use your intuitive understanding of BAS, it is also useful to develop an algebraic perspective. One main advantages of algebraic reasoning is that it allows you to focus on the form of you reasoning without having to recall its content. To check your understanding you may want to write both algebraic and arithmetic solutions for the puzzles below. They are written in a brief fashion using S for iS, R for iR, etc. BI3 (1) SB (2) RC (3) S BI4 (1) RS (2) DB (3) C
Calculating Strings To see which items satisfy a clue, you can think about its meaning, but there is also a algorithm for calculating its string from the strings of its atomic parts. The clue it is not a blue circle is satisfied by items that are not blue circles, so its string is 01110111. While this is easily be obtained without using a calculation from atomic parts, writing the details of the bit string arithmetic illustrates a method that can also be used for more complex clues. Computers contain circuits that can directly perform such calculations. (1) (2) (3) (4) iB 1100 1100 iC 1010 1010 iB & iC 1000 1000 BIT8 product of (1) and (2) (iB & iC)0111 0111 BIT8 complement of (3)
Suppose we want the string for iB & iC. This clue says it is not blue and it is a circle. It denies blue while asserting circle, and thus has 00100010 for its bit string. Using (1) and (2) above, this is calculated below. iB & iC differs from (iB & iC) which does not deny or assert either attribute, but which denies the combination of 2 attributes. (5) iB 0011 0011 BIT8 complement of (1) (6) iB & iC 0010 0010 BIT8 product of (2) and (5) A More Complex Clue Consider the clue It is not both a red circle and large or blue. This clue only eliminates the large red circle. Writing this clue as (iR & iC & (iL iB)), we can calculate its bit string in stages. (1) iR (2) iC (3) iR & iC (4) iL (5) iB (6) iL iB (7) iR & iC & (iL iB) (8) (iR&iC&(iLiB)) 0011 0011 1010 1010 0010 0010 1111 0000 1100 1100 1111 1100 0010 0000 1101 1111
BIT8 sum (4) and (5) BIT8 product (3)and (6) BIT8 product
The Set XAS The preceding puzzles refer to BAS. For slightly more challenging puzzles we use a set of attribute items called XAS. XAS includes these items and 16 more, with green and yellow as additional colors and triangle as an additional shape. The name of an item indicates its attribute in the obvious way. For example sgt is the small green triangle. Along with the variables s, l, r, b, d, c; we use y, g, t in the obvious manner. For example, g = 0 means the item is not green. The rest of the puzzles in this section are called attribute item puzzles and will be labeled with the letters XI. BIT24 As with BI puzzles, we could use bit strings to solve XI puzzles, however we would need strings from BIT24, such strings 111000000000111000000000 for the blue items. Such strings are tedious to use. Thus we only use algebraic solutions with BIT variables for such puzzles. A way of using BIT24 for this puzzles with more compact names is illustrated in the unit Solving Attribute Puzzles XAS Laws Because there are 2 sizes, 4 colors, 3 shapes XAS laws include: s+l = 1, t+d+c = 1, y+r+g+b = 1, sl = 0, td = 0, td = 0 dc = 0, yr = 0, etc. We also have laws such as: /s = l, /t = d+c, /y = r+g+b.
Conditional Clues For a conditional XY we call X the antecedent Y the consequent. A conditional only eliminate items which satisfy the antecedent but not the consequent. Thus XY can be described by the boolean equation x/y = 0, where x and y are boolean values corresponding to X and Y. For instance, the clue if i is red then i is a diamond only eliminates the red items that are not diamonds. Thus a boolean equation for the clue RD, can be given by r/d = 0. Likewise, the clue SC only eliminates the small items that are not circles, and can be described by s/c = 0. Above we expressed the conditional clue RD by r/d = 0. Since this clue is satisfied by a red item iff this item is a red diamond, this clue also gives the boolean equation r = rd. The deduction below uses the boolean lattice laws to shows that the equations x/y = 0 and x = xy are equivalent. Thus for a clue of the form XY we can use either form. In most cases representations that avoid complements make the algebra easier. x = xy x/y = xy/y x/y = 0 assume mult by /y compl, annihil x/y = 0 xy+x/y = xy+0 x = xy assume add xy reduct, ident
XI0a i is red or green. i is not a red diamond. i is not a circle. If i is green then i is a circle. If i is a small then i is a not red. Solution The discussion on conditionals indicates that we could represent clue 5 either by s//r = 0 or s = s/r. However since clue 5 eliminates small red items, it can also be represented by the simpler equation sr=0. (1) r+g = 1 (2) rd = 0 (3) c = 0 (4) g = gc (5) sr = 0 clues
(6) g = 0 (3)(4) (7) r = 1 (6)(1) (8) d = 0 (7)(2) (9) t = 1 (3)(8) (10) l = 1 (7)(5) (11) lrt = 1 (10)(7)(9)
Note: using g/c = 0 for (4) gives the same result Note: this uses t+d+c = 1 Note: this uses s+l = 1
Comment Manifest solutions to XI involve 24 tokens, and a bit table for such puzzles has 24 rows. Since these are tedious to describe, we only present algebraic descriptions for solutions to these puzzles. Propositional logic is another approach that gives fairly brief solutions to these puzzles. Try to solve the next 2 puzzles before looking ahead to their solutions. XI0b i is blue or i is red. If i is small then i is not blue. If i is red then i is a diamond. i is small. XI0c i is yellow or i is a triangle. If i is a triangle then i is not small. If i is circle then i is red. i is small. Solutions (1) (2) (3) (4) (5) (6) (7) (8) b+r = 1 sb = 0 r = rd s=1 b=0 r=1 d=1 srd = 1 clue clue clue clue (4)(2) (5)(1) (6)(3) (4)(6)(7) (1) y+t = 1 (2) ts = 0 (3) c = cr (4) s = 1 (5) t = 0 (6) y = 1 (7) r = 0 (8) c = 0 (9) d = 1 (A) syd = 1 clue clue clue clue (4)(2) (5)(1) (6) This uses yr = 0 (7)(3) (5)(8) This uses c+d+t = 1 (4)(6)(9)
Reminder If x and y are boolean variables corresponding to an attribute X and an attribute Y respectively then a clue of the form XY can be represented, either by x = xy or by x/y = 0. When the conditional is of the form X = Y it could be represented either by x = x/y or by x//y = 0, but it can also be represented more simply by xy = 0. XI0d If i is green then i is a small circle. If i isnt a circle then i isnt red. i is neither yellow nor blue. If i is not large then i is a triangle. Solution Clue 2 could be represented by /cr = 0, but since /cr+cr = r, /cr = 0 is equivalent to cr = r. Clue 3 can be represented by /(y+b) = 1, but /(y+b) = r+g, so we can use r+g = 1. Clue 4 can be represented by /l/t = 0, but this is equivalent to t+l = 1. Thus each clue can be represented without using complements. The comments to the side indicate in more detail how boolean laws and concepts apply. However in these and other comments the use of the associative and commutative laws is ignored. (1) g = g(sc) (5) sc = 0 (6) g = 0 (7) r = 1 (8) c = 1 (9) t = 0 (10) l = 1 (2) cr = r (4) (5)(1) (6)(3) (7)(2) (8) (9)(4) (3) r+g = 1 (4) l+t = 1 clues
mult by sc; ct = 0, sl = 0 , ident: (sc)1 = sc annihil: g0 = 0 ident: r+0 = r ident: c1 = c mult by t; ct = 0, ident: 1t = t ident: l+0 = l
Summary for Representing Conditional Clues A conditional clue eliminates items which satisfy the antecedent but not the consequent. Thus we can always represent a conditional clue by equating the product of an expression for the antecedent and an expression for the complement of the consequent to zero. The first row below gives a brief summary for representing conditional clues this way. In the above puzzles we saw how various conditional clues can also be represented without using complements. This is indicated in the second row. XY as x/y = 0 XY as x = xy XY as xy = 0 XY as xy = 0 XY as /xy = 0 XY as y = xy XY as /x/y = 0 XY as x+y = 1
Remark See the BBC.X if you want more XAS puzzles like those from this section.
1 / 0 1 0 1 1 1 + 1 1
Situation Two switches control a light X. Using either switch changes the light to on if it is off, while using a switch changes the light to off if it is on. Each switch sends an input signal of 1 when up, 0 when down. The output x is1 if the switches send the same signals, and this results in the light being on. The output x is 0 if the switches send opposite signals, and this results in the light being off. Input 00 gives output 1 output 1 Input 01 gives output 0 Input 10 gives output 0 Input 11 gives
Since the equation x = ab+/b/a can be used to calculate the relation between the output x and the inputs a and b, the following arrangement of these components will have the desired output. a b + / / To see that this has the desired result we can trace the results of the various inputs for this circuit. Note we abbreviate each complement gates by a / followed by is input. 0 0 0 + 1 /0 /1 0 0 1 0 + 0 /1 /0
0
1 0 0 + 0
1 1 1 + 1
/0 /0
/1 /1
General Perspective A bit function is a function whose inputs and output come from {0,1}. A variety of situations like the light switch one can be described using bit functions, however the algebra of these functions is independent of any of their applications. A polynomial contain no parentheses when abbreviated by the usual algebraic conventions for order of operation. Boolean algebra can be used to transform any boolean expression into an equivalent boolean polynomial, so any bit function can be represented by a boolean polynomial, and in fact more than one such polynomials. For various reasons we may want to select from these alternatives one which has been reduced to be as simple as possible. There are 16 possible bit functions of two variable. Polynomial representations for all but two of these are indicated in the table below. The one labeled x is the light switch function, which we have just shown can be represented by ab+/a/b. The one after it is its complement, and so we labeled it as /x. This means that it can be represented by /(ab+/a/b). However this is not a polynomial. Note that it can also be obtained by adding the columns under /ab and a/b. Thus it has /ab+a/b as a polynomial representation. a 0 0 1 1 b 0 1 0 1 0 0 0 0 0 /a/b /ab a/b ab 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 /a 1 1 0 0 /b 1 0 1 0 x 1 0 0 1 /x /a+/b /a+b a+/b a+b 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 1
Since each function has 4 outputs each such function can be coded as a bit string from BIT4. For example, the 4 functions represented by the polynomials /a/b, /ab, a/b, ab are coded by the atoms 1000, 0100, 0010, 0001 of BIT4. The only difference between describing a function by a bit string rather than by a table is that the inputs are implicit in the order of the bits. It is fairly easy to verify that these 4 atoms can be represented by the single term polynomials labels used in the tables. Since each other non-zero function with 2 inputs can be built as a sum of 2 or more of these function, the set consisting of these functions is called the atomic basis for functions with 2 inputs. For example, the function f which we could describe as 0111, that is the function whose first three table entries are 1 and whose last entry is 0 can be built as f = /ab+a/b+ab. In general, to represent a function f of 2 variables this way simply see how its BIT4 code is the lattice sum of BIT4 atoms. The polynomial /ab+a/b+ab is eqaul to the simpler polynomial a+b, as you can see by bit arithmetic. It can also be reduced to a+b by boolean algebra. The main strategy used to reduce atomic basis polynomials is illustrated below. First look for reducible pairs of terms, that is a pair that differs in exactly one factor. Thus in /ab+a/b+ab, /ab+ab is a reducible pair. By the reduction law the sum of this pair reduces to b, giving b+a/b. Likewise, the pair a/b+ab will reduce to a. To be able to make both reductions we use the idempotent law to replace ab by ab+ab, thus having a copy of ab for each reduction. This allows us to reduce /ab+a/b+ab to a+b. /ab+a/b+ab = /ab+a/b+ab+ab = (ab+a/b)+(/ab+ab) = a+b idemp, assoc comm, assoc reduct
For functions with 2 inputs it is easy to find a reduced polynomial without using boolean algebra. Looking at the table 1010, we see that this can be represented by /b without first representing it as a/b+/a/b. However using the atomic basis representation illustrates a method that works in general.
Functions with 3 Inputs As with functions of 2 input variable there is a direct method for representing any other function with 3 inputs can as a sum of 2 or more of the atomic basis functions below. a b c /a/b/c /a/bc 000 1 0 001 0 1 010 0 0 011 0 0 100 0 0 101 0 0 110 0 0 111 0 0 /ab/c 0 0 1 0 0 0 0 0 /abc 0 0 0 1 0 0 0 0 a/b/c 0 0 0 0 1 0 0 0 a/bc 0 0 0 0 0 1 0 0 ab/c 0 0 0 0 0 0 1 0 abc 0 0 0 0 0 0 0 1
Note there are 8 possible triples involving 3 bits. Thus a bit function of 3 variables can be code by an element of BIT8. Thus there are 256 bit functions involving 3 variables. Exactly 8 of these have tables containing a single 1.
Reduction Method To find a polynomial expression for a function from its BIT8 code, just think of it as a sum of its atoms and write the corresponding sum of basis polynomials. To reduce this look for reducible pairs and use the idempotent law to introduce any extra copies. For example, in the polynomial with code 00011010 the sum is 00010000+00001000+0000010. Thus it can be represented by a/b/c+a/bc+ab/c. To reduce this note that the pair (a/b)/c+(a/b)c reduces to a/b and that (a/c)/b+(a/c)b reduces to a/c. Thus this polynomial reduces to a/b+a/c.
Solutions The BIT8 arithmetic solution is like the BIT8 solutions used before, except that the set W which satisfies all clues has more than one element. This is simpler than the algebraic solution below, primarily because BAS only has 8 elements.
iW
0100 0001
{src, lbc}
For each puzzle we use a boolean algebra in which the multiplicative identity is the puzzle world. To stress this we use the symbol 1 instead of W. We use boldface 1 to distinguish this from a 1 which denotes a bit. We also use a boldface 0 to denote the empty set. We use variables in a way that extends their use form Section 1. The letter: s, l, r, b, c, d are now used as world variables, in the sense that s denotes the set of items in 1 that are small, l the items in 1 that are large, etc. Since the world for each puzzle in Section 1 has one member, we also could have interpreted 0 as the empty set and 1 as the world. Thus unlike the puzzles in this section, its only subsets are 0 and 1, so each of the world variables is also BIT variables. Line (8) below shows that 1 is the union of src and lbc. Thus 1 cannot contain any items other that src and s = lbc. Since src and lbc both satisfy all the clues, the puzzle world is {src, lbc}. Solution (1) b+s = 1 (2) r+l = 1 (4) (5) (6) (7) (8) sr = r lb = b sr+lb = 1 c=1 1 = src+lbc (1) (2) (4)(5) (3) (6)(7) (3) d = 0 clues
Comments In algebraic solutions we omit the multiplication sign. Thus src means src, and names a set rather than the small red circle. In this puzzle src denotes the set whose only member is the small red circle. Likewise, lbc denotes the set whose only member is the large blue circle. However srd = 0, so srd denotes the empty set. The deduction below expands the solution of this puzzle to show in detail how boolean laws and concepts apply. (1) b+s = 1 (a) (4) (b) (5) (6) (7) (c) (8) br+sr = 1r sr = r rb+lb = b1 lb = b sr+lb = 1 c=1 (sr+lb)c = 1 src+lbc = 1 (2) r+l = 1 (1) (a) (2) (2) (4)(5) (3) (6)(7) (c) (3) d = 0 clues
mult by r, dist use br = 0, ident mult by b, dist use rb = 0, ident add, r+b = 1 apply /, /d = c, /0 = 1 mult, 11 = 1 dist
Number World Puzzles Many problems in ordinary algebra can be considered as number world problems. For one that gives rise to a linear equation in one unknown, we expect the world to contain a single number. For one that gives rise to quadratic equation in one unknown, we do not necessarily expect the world to contain a single number. While we may have been told to check the solution we derive, we seldom bother, since most of the time we just hope that we made a correct deduction, and we trust that this will only yield answers that work. Many students are puzzled when we first encounter the phenomena of extraneous roots, since such roots occur even when we have made a correct deduction. Consider the 2 number world puzzles below. We can deduce a solutions using ordinary algebra much as we use boolean algebra to solve attribute world puzzles. NWP1 Squaring a number and increasing the result by 1 and gives the same result as doubling. this number. NPW1 Doubling a number and then increasing this result by 1 and then taking the square root gives the original number. Solutions x2x = 2(x+2) x2x = 2x+4 x23x4 = 0 (x4)(x+1) = 0 x = 4 x = 1 clue 1x = (x+5) x22x+1 = x+5 x23x4 = 0 (x4)(x+1) = 0 x = 4 x = 1 clue
Extraneous Roots From the solutions above it would appear that the world for both puzzles is the set {4, 1}. However the number 4 does not satisfy the clue for NPW2, since increasing 14 gives 3 and since the square root of 4+5 is positive 3. A correct deduction from a set of clues only shows that everything which satisfies the clues also satisfies the final step. It does not show that everything that satisfies the steps in a deduction must satisfies all the clues. In most cases we merely trust our intuition to make sure we continue the deduction until we reach a final step that is satisfied by those and only those items that satisfy all the clues. For NPW2, we could continue to reason that 0 (x+5), so 0 1x. , so x 4. Using this with the last step above give x = 1. The clue is satisfied by this number. Checking a Solution For BAWP0, step (8) merely showed i = src i = lbc. Just as in a deduction involving ordinary algebra, this does not show that these two items satisfy all the clues. For this puzzle a quick check shows that they do. In a more complicated puzzle this may not be as apparent, so when dealing with a world puzzle be sure to check to see if the last step in your deduction actually satisfies all the clues. For BAS puzzles this can be done by using bit string calculations. Bit string calculations could also be used for XAS puzzles but working with 24 bits can be tedious. One alternative is to show that the clues can all be deduced from the final step in your solution. We illustrate this for the BWP0 whose final steps was src+lbc = 1 and whose clues were b+s = 1, r+l = 1, d = 0. (0) src+lbc = 1 (1) d = 0 (2) c = 1 (3) sr+lb = 1 (4) rl = 0 (5) b+s = 1 (6) bs = 0 (7) r+l = 1 given (0) mult by d (1) (0)(2) (3) mult by rl (4) compl both sides. (3) mult by bs (6) compl both sides.
BAWP0 Each item is blue or small. Each item is red or large. There are no diamonds. Solution The clue each item is blue or small is equivalent to a red item must be small. Thus we can use r s to represent this clue. Likewise, b l can represent Each item is red or large. Line (9) shows that the set we are to determine contains at most src and lbc. (1) r s (2) b l (3) d = 0 (4) r sr (5) b lb (6) 1 sr+lb (7) c src+lbc (8) c = 1 (9) 1 src+lbc (10) src+lbc = 1 Clues (1) (2) mult by r, idemp mult by b, idemp mult by c, dist apply /, /d = c, /0 = 1 maximum
(8)(7) replace c by 1
Alternate Representation From the iB iS we might have observed that any large item must be blue. This can be represented by l b. Likewise the clue iR iL can be represented by s r. This gives the same solution as the one above. Merely use l b to obtain l lb, and use s r to obtain s sr. Adding these inequalities, and using s+l = 1, gives 1 sr+lb.
AWP0a If i is large then i is blue. If i is blue then i is a diamond. If i is small then i is green. If i is green then i is a circle. Solution Below we contrast using equations an inequalities. Horizontal lines separate clues from the reasoning. (1) l = lb (2) b = bd (3) s = sg (4) g = gc (5) l = lbd (1)(2) (6) s = sgc (3)(4) (7) 1 = sgc+lbd (5)(6) (1) l b (2) b d (3) s g (4) g c (5) l lb (1) mult by l, idem (6) lb lbd (2) mult by lb, idem (7) l lbd (5)(6) transitive (8) s sgc (3)(4) similar to (7) (9) 1 sgc+lbd (7)(8) add, s+l = 1
AWP0b If i is not red then i is a circle. If i is small then i is red. If i is red then i is a circle. If i is large the i is red or blue. Solutions Again we contrast using equations an inequalities. However we leave the commentary on the laws involved to the reader. (1) r+c = 1 (2) s = sr (3) r = rc (4) l = l(r+b) (5) s = src (3)(2) (6) l = lr+lb (4) (7) lr = lrc (3) (8) lbr+lbc = lb (1) (9) lb = lbc (8) (10) l = lrc+lbc (6)(8)(9) (11) 1 = src+lrc+lbc (5)(9) (1) /r c (2) s r (3) r c (4) l r+b (5) 1 c (1)(3) (6) s sr (2) (7) l lr+lb (4) (8) 1 sr+lr+lb (6)(7) (9) 1 src+lrc+lbc (5)(8)
Comment The main advantage in using boolean inequalities is for more complex puzzles, such as the level 3 puzzles in Unit VAP. Some of these also contain complex clues, such as the one below. If i is not a triangle then i is small or yellow. T S Y This means that the non-triangles are a subset of the union of the small items with the yellow items. This can be represented by the inequality: /t s+y. Sample Complex Puzzle If i is blue or i is large then i is a large circle. If i is not blue then i is not a circle. If i is not both small and a circle then i is either blue or large. Solution (1) b+l lc (2) /b /c (3) /(sc) b+l (4) /(sc) lc (3)(1) transitive law (5) 1 sc+lc (4) add sc (6) c b (2) compl (7) c = bc (6) def of (8) 1 sbc+lbc (7)(5) replace c by bc
BIT4 Solution As indicated earlier, any subset X of {srd,src,sbd,sbc} can be named as bit string of length 4. Use a 1 in bit 1 if srd is in X, a 1 in bit 2 if src is in X, a 1 in bit 3 if sbd is in X, a 1 in bit 4 if sbc is in X. The atoms of BIT4 are 1000,0100,0010,0001. Using this the solution described above can also be described using bit string codes. While this is not as easy to read for this particular puzzle, it has advantages for complex puzzles with many variables. It is also easy to implement bit string solutions using a computer. (1) b 1100 (6) b = 0100 (7) d = 0001 (8) r = 0010 (9) c = 1000 (2) c 1010 (1)(5) (6)(3) (7)(4) (3) d 0101 (4) r 0011 (5) b 0101
mult, idemp, atom mult (3) by /b, /bd = d, /01000101 = 0001 mult (4) by /d, /dr = r, /00010011 = 0010
More Complex Puzzles Unit VLA contains a variety of more elaborate puzzles that can be solved by using boolean atoms. For one such puzzle see Pr4 in Appendix 3. The following puzzle, while not as elaborate, illustrates some of the ideas involved. Puzzle 1 Four people have different small items from BAI. They put these items in boxes marked with the letters p,q,r,s. Cathy and Dick have a circle. Al did not use box s. The mens items are the same color. A female used box q. Items of the same shape were placed in boxes p and r. If Cathy used box q then she did not have a red circle. Later one of these people took a blue item from their box. If Beth has box r then it was not Beth. If Al has box r then it was Al. Which item was taken? Who took it? What box was it in? Solution Let a,b,c,d be the distinct atoms denoting the items in the boxes belonging to Al, Beth, Cathy, Dick. Let p,q,r,s be the distinct atoms denoting the items in the boxes with those labels. Let x denote the item taken. Comments are included only for some of the steps. Steps without comments should be fairly easy to follow, although to explain them may involve a certain amount of detail. For instance, consider (18). By (17) a+d cannot be 0011, so a+d = 1100 and hence a = 1000, and thus by (7) a x. (1) c+d = 0101 (4) a+d = 1100 a+d = 0011 (2) as = 0 (3) q b+c (10) aq = 0 (11) a(p+r) = a (12) p+r 0101 (5) p+r = 0101 p+r = 1010 (6) c = q c 1011 (3) (10)(2) (11)(1) (7) x 0011 (8) b = r bx = 0 (9) a = r a = x
(13) p+r = 1010 = a+b (12)(5)(1) a+b = /(c+d) (14) q+s = 0101 = c+d (13) (15) q = c (14)(3) mult q b+c by q+s = c+d apply / mult (16) c = 0001 = q (17) d = 0100 = s (18) a = 1000 x (19) a r (20) a = 1000 = p (21) b = 0010 = r (22) bx = 0 (15)(6)(1) mult c 1011 by c+d = 0101 (16)(14) (17)(4)(7) (18)(19)(13) (20)(13) (21)(8) (16)(21)(22)
(18)(9)
(23) x = c = 0001 = q
Details via Boolean Algebra While step (18) is fairly easy to infer if you think about what the symbols mean, it can also be derived in a purely algebraic manner as indicated below. The details are rather tedious. A similar remark applies to some of the other steps. (A) a+d = 0011 assume (B) d = 0 (17)(A) mult, d(a+d) = da+dd = 0+d = d, 01000011 = 0
(C) d 0
(17)
(D) a+d 0011 contradiction (E) a+d = 1100 (D)(4) (F) a = 1000 (G) ax = 0 (H) a x (E)(17) mult by /d = 1011, /d(a+d) = /da = a, 10111100 = 1000 (F)(7) mult, to obtain ax 10000011 = 0 (G) atom
While these puzzles can be solved using boolean equations, boolean inequalities provide more powerful methods. We will use both methods. Ex1 For item puzzles the clues determine a single item. The goal is to discover this item. Below the ordinary language statement of these puzzles you will find them stated in abbreviated language using set names, but with i omitted. You will also find boolean equations representing each of the clues. You may want to cover these while you try to formulate your own equations. Use boolean algebra to solve some of these puzzles. AIP1 i is small or i is a circle. i is large or i is red. i is blue. AIP2 i is small or yellow. i is large or a circle. i is a triangle. AIP3 If i is a diamond then i is not large. i is a circle or i is yellow. i is not a triangle. i is not a circle. AIP4 i is blue or green. If i is large then i is not blue. If i is green then i is a diamond. i is large. AIP5 If i is small then i is red. If i is a circle then i is blue. i is a circle. AIP6 i is small or green. i is large or red. if i is red then i is a circle. i is a diamond. AIP7 i is small or a circle. i is large or red. i is green. AIP8 i is a blue circle. If i is large then i is not blue. AIP9 If i is not a circle then i is red. i is neither red nor small. If i is not green then i is red. AIP10 i is small and blue. If i is blue then i is a circle. If i is blue or large then i is a circle. AIP11 i is blue or red. i is neither small nor blue. If i is small or red then i is a circle. ] IDEOGRAPHIC VERSIONS REPRESENTING EQUATIONS ] ] SC ] SY ] BG ] SR ] SG ] SC LR LC B T T C ] s+c = 1 l+r = 1 b = 1 ] s+y = 1 l+c = 1 t = 1 C ] dl = 0 ] s = sr c+y = 1 t = 0 ] ] c=0 ] g = gd l = 1 ] ] ]
] D L C Y CB LR LR
L B G D L ] b+g = 1 lb = 0 c = cb c=1 RC D G
] s+g = 1 l+r = 1 r = rc d = 1 ] ]
] s+c = 1 l+r = 1 g = 1
] B&C
L B BC
] bc = 1 BLC
lb = 0
] ] b = bc (b+l)/c = 0 ]
] C R (S R) G R ] S&B ] BR (S B) S R C
Ex 2 The goal for these puzzles is to find the largest subset of AI whose members satisfy all the puzzles clues. For example consider the puzzle whose clues are L R, S R, R D. The 2 red diamonds are the only items of AI that satisfy all the clues, so the answer to this puzzle would be {lrd,srd}. Use boolean algebra to solve some of these puzzles. For at least 2 puzzles show that your solition has no extraneous items. AWP1 i is green. If i is not a diamond then i is not green. AWP2 If i is large then i is red or yellow. If i is red then i is a diamond. If i is yellow then i is not a diamond. If not a circle then i is a diamond. i is not small. AWP3 If i is not a triangle then i is small or yellow. i is not yellow. If i is a triangle then i is red. If i is small then i is a triangle. AWP4 If i is a blue diamond then i is large. If i is blue and i is not a diamond then i is large. i is not large. AWP5 Either i is not red or i is not a diamond. If i is large and blue then i is a triangle. If i is not both large and blue then i is red. If i is not a diamond then i is large and blue. AWP6 If i is a red circle then i is large. If i is red and small then i is a circle. i is not large. AWP7 i is red or i is yellow. If i is not b1ue then i is not a small circle. If i is not small then i is not yellow. If i is red then i is small AWP8 i is red or yellow. If i is not red then i is a small diamond. If i is not yellow then i is not small and not a diamond. If i is not a circle then i must be small. AWP9 If i is small then i is yellow. If i is not a diamond then i is not blue. If i is a diamond then i is red. If i is not small then i is blue. Problems and projects are supplementary. They either extend ideas from the text or use these ideas in a more challenging way. Pr1 The relation is defined for boolean lattices as: x y iff xy = x. Use this to prove some of the laws for boolean inequalities listed below. For example, the reflexive law x x follows from this definition and the idempotent law, and to prove x y xz yz, we can assume x y and deduce xz yz as follows. (1) x y (2) xy = y (3) zz = z (4) xyzz = yz (1) def of idemp (2)(3)
(6) xz yz
(5) def of
Pr2 The concept of an atom can be defined as follows: x is atom iff x 0 and there is no y such that y 0 & y x & y x Prove that x is an atom x 0 and for all y, xy = 0 xy = x. Prove that for any atoms a and b, a b ab = 0. Pr3 In this problem Q+ denotes boolean lattice addition and + denotes boolean ring addition. Show that xQ+y = x+y+xy. Thus boolean lattice addition can also be used to solve attribute puzzles if we use a ring equation of the form x+y+xy = 1 for a clue of the form X Y. This is illustrated for BAIP0. Solve some other attribute puzzles using boolean ring addition. (1) l = 1 (2) b = 1 (3) s+d+sd = 1 (4) s = 0 (5) d = 1 (1) (4)(3)
(6) lbd = 1 (1)(2)(5) Pr4 Will,Bob,Pete,Hal,Nash are weak,brave,polite,heavy,nice and they live in Waldon,Bliss,Pike,Hadley,Newark. No man lives in the city or has an attribute with the same initial as his name, nor does his attribute have the same initial as the name of his city. The weak one does not live in Newark. The brave one does not live in Pike. Bob is not heavy or polite. Harper is not brave. Will is not a resident of Bliss, nor is Nash, who is not brave and not heavy. Neither Pete nor Will live in Newark. In which city does Nash live? Hint: Let 10000,01000,00100,00010,00001 represent White, Brown, Peters, Harper, Nash. Let w,b,p,h,n be atoms naming the men whose occupations begin with these letters. Let W,B,P,H,N be atoms naming the men who live in the cities which begin with these letters. Note that wW,Bb,pP,hH,nN are all 0. Other information can be coded by the boolean equations and inequalities below. (1) w 01111 (2) b 10100 (3) p 10011 (4) h 10100 (5) n 11110 (6) W 01111 (7) B 00110 (8) P 11011 (9) H 11101 (10) N 01010 (11) wN = 0 (12) bP = 0
Pr5 Bit operations can be illustrate on pathway systems, that is a system of paths thru which something can move and points within these paths where movement can be either allowed or blocked. A pathway system might involve information flow thru an organization, electricity thru circuits, water thru pipes, etc. To illustrate pathways, consider an application which although less powerful, is easy to visualize, namely a rat maze with passages and doors. Picture 1 show the possibilities for a passage system x with 2 sliding doors a and b in sequence. Picture 1a shows both doors closed, so x is closed. Picture 1b shows a closed and b open, so x is closed. Picture 1c shows
a open and b closed, so x is closed. Picture 1d shows both doors open, so x is open. We code closed by 0 and open by 1. Whether the passage is open or closed can be coded by the product of a and b, with these 4 possibilities corresponding respectively to 00 = 0, 01 = 0, 10 = 0, 11 = 1. Likewise Picture 2 represent a passage system with 2 doors in parallel. Whether the passage is open or closed corresponds to the lattice sum of a and b, with these 2 pictures corresponding respectively to 0+0 = 0, 0+1 = 0, 1+0 = 1, 1+1 = 1. a=0 b=0 a=0 b=1 a=1 b=0 a=1 b=1
Picture 1a a=0
Picture 1b a=0
Picture 1c a=1
Picture 1d a=1
b=0 Picture 2a
b=1 Picture 2b
b=0 Picture 2c
b=1 Picture 2d
Doors in a passage system may be independent or related. A pair of doors is directly related when either they must both be open or both be closed. Doors are complementary when the second door is open if the first door is closed, and the second door is closed if the first door is open. Pictures 3 and 4 illustrate the idempotent and complement laws for lattice multiplication. a=0 a=0 a=1 a=1 a = 0 /a = 1 a = 1 /a = 0
Picture 3a
Picture 3b
Picture 4a
Picture 4b
The first 2 pathway picture below illustrate the idempotent and complement laws for + with an input of 0. Draw pictures illustrating these laws for an input of 1. Relate the last 2 pictures illustrates both parts of the distributive laws. Give more pathway pictures illustrating these laws for other inputs. Idempotent a=0 Complement a=0 a Distributive a a Distributive
a=0
/a = 1
bc
Project A questionnaire having 8 items was given to 9 persons. Each item describes some social policy, and a response indicates whether a person favors or opposes this policy, with a 1 for favors and a 0 for opposes. Thus each element of BIT8 name a possible subset of question numbers answered yes. The responses are given as follows: ITEM NUMBER ]1 2 3 4 5 6 7 8 1 ]1 1 0 1 1 0 1 1 P 2 ]1 1 1 0 1 1 1 0 E 3 ]0 0 0 1 1 1 1 1 R 4 ]0 1 1 0 1 0 0 0 S 5 ]0 0 1 1 1 1 0 0 O 6 ]0 1 0 1 1 0 0 0 N 7 ]1 1 0 1 1 0 1 0 8 ]0 0 1 0 1 0 0 0 9 ]0 1 1 1 1 1 1 1 The fact that the bit string product of all responses is 00001000, indicates that item 5 was favored by all. Likewise the lattice sum of all responses is 11111111, so no item was opposed by all. The people who said yes to item 1 also all said yes to items 2,5,7. To see this, take the product of all those having a 1 in the first byte. 110110111110111011011010 = 11001010. Boolean arithmetic could be used to extract further information of this type. Since the number of responses is small, a quick visual scan, would also reveal the such information. The advantage of using boolean arithmetic is that it can be easily implemented on a computer when there are a large number of respondents. Develop computer programs and procedures to do bit string arithmetic. Apply these to something. The discussion below illustrates some ideas for doing this in logo. We can code a bit string as a logo word of bits. We can then code the responses as a list of these as indicated below. MAKE L [11011011 .... 01111111] The procedure P below defines the boolean product function P for any pair of strings in BIT8. EP is the extended boolean product function EP of any list of such bit strings. To determine which items were favored by everyone, merely give the command PR EP :L. TO P :X :Y IF EMPTYP :Y [OP :X] OP WORD P BL :X BL :Y PRODUCT LAST :X LAST :Y END
RBF
SAP
VLP
BLT
BBC
BBC Basic Boolean Concepts: BBC1 introduces the concept of a boolean lattice, and related concepts of boolean equations. BBC2 discusses atoms and boolean inequalities, which are only used in a few places in later units. BLT Boolean Lattice Theorems: Organizes boolean lattices laws as an axiomatic system. Relates boolean concepts to the broader concepts of contemporary algebra. SAP Solving Attribute Puzzles: Uses boolean algebra to solve more challenging attribute puzzles. XAP2 depends on BBC2. VLP Various Logic Puzzles: Uses boolean equations to solve a variety of logic puzzles. VLP2 depends on BBC2. BGA Boolean Group Applications: Sketches the application of boolean groups to error correcting codes and playing Nim. RBF Representing BIT Functions: Uses the concept of boolean atoms to show how any BIT function can be represented as a atomic lattice polynomial. Also shows how to find reduced representations. DCD Digital Control Devices: Illustrates the use of bit functions in the construction of digital devices, with emphasis on circuits for computers. This application is introduced on the next page. SBE Solving BIT Equations: Uses boolean polynomial representations to solve bit equations, with applications to feedback circuits.