You are on page 1of 36
Chapter 5 Boolean Algebras 5.1 Boolean Calculus 1. Definition A Boolean algebra is a system 8 = {B, V, +, /, 0, 1}, where: Bis a non-empty set; Vi Bx BoB and BxBOB are operations on B called disjunction and, respectively, conjunction; BOB is a map called negation; 0 and 1 are two elements in B with 0 1 such that for every x,y,z € B, we have 99 100 CHAPTER 5. BOOLEAN ALGEBRAS avy = (a) ry (1a) (eVu)vz = (1.2) (zy)z (1.2) aVey = (1.3) a(x Vy) (13!) eVye = , (1.4) ay V 2) (a) rvl = (1.5) x0 (15') Ve = 1 (1.6) az! 0, (16') Hence, the disjunction and the conjunction are commutative, (1.1 and 1,1’), associative, (1.2 and 1.2’) and verify the absorption laws, (1.3 and 1.3"); a system {B, V, -, } with properties 1.1 to 1.3! is called a lattice. ‘To be a Boolean algcbra, this lattice must be distributive, (1.4 and 1.4’), to have a unit element, (1.5) and a zero element, (1.5’), and to be complemented, (1.6 and 1.6’). The clement : is called the complement of x 2. Examples (i) Let By = {0,1} and let v, - and ' be defined as follows ov0=0,0V1=1,1Vv1 0-0=0,0-1=0,1-1=1 o=1,7=0 The properties 1.1 to 1.6” can be easily verified. By is called the two- element algebra. (ii) The set of all propositions is a Boolean algebra with the usual logical connectors. (iii) Let X be a non-empty set and let P(X) = (A; A CX} be the set of all subsets of X. We consider the usual operations of sets: AUB={reX;2€Aorre B} ANB={2€X;x€Aande€ B} 5.1, BOOLEAN CALCULUS 101 A= {ce X;0¢ A} ‘Then {P(X), U, 1, /, 0, X} is a Boolean algebra. (iv) More generally, if H © P(X) such that: WEN, ABeH>AUBEN, ABEH>ANBER, AcCH>A EN, then (1,U, 9, ', 0, X} is a Boolean algebra. (v) Let 8 = {B,V, -,', 0, 1} bea Boolean algebra; then the system {B, -, V,', 1, 0} is also a Boolean algebra, called the dual of 8 and denoted by N*. The as- sertion results because in the definition of a Boolean algebra the axioms are grouped into pairs, by interchanging V with » and 0 with 1 (vi) We now give an example of a lattice which is not a Boolean algebra. Lot M be a non-cmpty set and let F(M) = {f5 f: Me [0,1)} An clement f € F(M) is called a fuzzy set. For every f,g € F(IM),we define: FV 9: Mes [0,1], (Fv 9)(0 = maximumt s(t), 9(0)}; fog: Mv (0,1), (f-9)(0) = minimum{ f(t), 9(} It results that {F(M), V, -} is a distributive lattice In order to define a structure of a Boolcan algebra on F(M), a natural choice is to consider: 0: Mr (0,1), 0(¢) =0, 1M (0,1, 1) = simins However, the system {F(M), V, -,, 0, 1} is not a Boolean algebra because if f is a constant function (fuzzy set), f #0 and f 4 1, then there is no 9 € F(M) such that fV.g=1and f-9=0. 102 CHAPTER 5. BOOLEAN ALGEBRAS 3. Theorem (the principle of duality) Let 8 = (B, V, 0, 1} be a Boolean algebra and let P be a property expressed using V, -,', 0 and 1. Let P“ be the property (usually called the cual property of P) obtained by interchanging (in P) V with - and 0 with 1 ‘Then we have Pis true 4 Ptis true. Proof If P is a true property in an arbitrary Boolean algebra 8, then P must be true in the dual algebra, 8%, (see example 2(v)). But the property P in 4 is exactly the property P? in X. 4. Theorem Let {B, V, -,', 0, 1} be a Boolean algebra; then, for every x,y € B, we have aVe =e (17) nr = 2 (7) rv0 = 2 (1.8) clos (18') rVy=0 6 x =y=0 (1.9) py=1 @ 4 =y=1 (19) ‘We call (1.7) and (1.7') the laws of idempotency. Proof We shall prove only (1.7), (1.8) and (1.9); the rest will follow by using the principle of duality, From (1.3) and (1.3'), we get n=aVa(eVy)=2Ve From (1.5') and (1.3), we get: aVO=2Va20=2, We now prove (1.8); from the idempotency, we get 0.0 = 0. Conversely, if Vy =0, by using (1.3') and (1.5’), we get: x=a(rVy)=20=0. Of course, a similar argument gives y = 0. 5.1, BOOLEAN CALCULUS 103 5. Lemma Let x,y €B. If Vy = land zy =0, theny = 2’ We say that the complementation in a Boolean algebra is unique Proof We have y= yl ay(2Ve2l) = ye V ye! =2'yV0= ay Var = =2'yV2)=c/1=2" 6. Theorem For every x,y € B, we have: (ev ay, (1.19) (xy) avvy, (1.10') (ry x, (1.11) ava'y Vy, (1.12) a(x Vy) y (1.124 We call (1.10) and (1.10') De Morgan laws, (1-11) the law of double negation and (1.12) and (1.12’) the laws of Boolean absorption. Proof We shall prove only the properties (1.10), (1.11) and (1.12); the others follow by using the principle of duality. From (1.6) and (1.6"), we have a/V (2 = Land 2’ (2'! hence, (2’)' = x by the above lemma. By using the same lemma, to prove De Morgan laws, we need to prove (2Vy) Valy' = Land (x Vy)z'y' = 0. We have: (evu)Vvalyl = ((eVy) V2) (eV y) V9) = (vv @ve))(@Vv Vy) =YVD@VI)=lvi=l, and: (eV y)a'y! = 22'y Vyo'y! = 22'y Vay 104 CHAPTER 5. BOOLEAN ALGEBRAS =0y V0 =0V0=0 For the Boolean absorption, we have eV y=1UxVy) = (V2 Vy) = (eV 2y) Vey =a Very. 7. Definition Let x,y € B. Then, by definition: rsyervy=y We read < "less or equal”. The converse relation is "greater or equal” r>yeysr 8. Observation For every x,y € B, we have: BS ye aty= Proof If x < y, then x Vy = y, hence: xy=x(eVy) = Conversely, if zy = y, then: zVy=zyVy=y, hence x < y. We can extend the principle of duality to relations < and >! 9. Theorem (the extended principle of duality) Let 8 = {B, Vv, »,/,0, 1} be a Boolean algebra and let P be a property expressed using V, -,',0, 1, < and >. Let P* be the dual property of P, obtained by interchanging V with », 0 with 1 and < with >. We have: Pis true @ Ptis true. 5.1, BOOLEAN CALCULUS 105 Proof From theorem 3 and from the above observation, we get: x (ii) (iii) + (iv) are obvious, We prove (iv)= (i) Let us suppose that there is ¢ € B such that ac< bandas bVe. 108 CHAPTER 5. BOOLEAN ALGEBRAS Using the exercise 12(i), we get: acc beacsevb But a<¢Vbanda B is a Boolean function if and only if it can be written in the canonical disjunctive form: JX) = Vax" a the coefficients a4 being aa = f(A) (ii) A function f ; B" > B is a Boolean function if and only if it can be written in the canonical conjunctive form: F(X) = \ (bay (Vx*)) A ste) CHAPTER 5. BOOLEAN ALGEBRAS the coefficients b, being ba = f(A’). Of course, assertion (ii) is the dual of (i) 29. Corollary (i) A Boolean function is determined by its values on the elementary vectors (ii) The values of a Boolean function f satisfy the inequalities AIA) s £00) $V SA), VX € B A A (iii) A Boolean function f is a simple Boolean function if and only if for every elementary vector A, we have: F(A) € {0,1} 30. Examples (i) Let f(x) = ax V bx! Vc, We compute: f(0) =bVe, f(l) =aVe hence the canonical disjunctive form is f(z) = (bVe)2' V (avez, and the canonical conjunctive form is J (2) (ii) Let f(x) = (av 2)( (oveva)avev2') Yr V2"). We compute: F(0) =a, and f(1) hence the canonical disjunctive form is: Sa) = az! vB. and the canonical conjunctive form is S(z) = (av 2)(0 v2!) 5.2. BOOLEAN FUNCTIONS 115 (iii) Let f: BO B, Fl.y) = ab (ev y)(a'zy V Wa! V y)') VaV (x Vb). We compute: (0,0) =aVb, f(0,1) =aVb, f(2,0) =1, f(1,1) =a, hence the canonical forms are: Fey) = (av Baty V (av B)x'y V ay! Vary, and. fla,y) = ((aV 8) VaVy)((aV8)VaVy)AV2Vvy)aval Vy) = =((avd)VveVvy)((avd)VeVvy)(ava' Vy). (iv) Let f : BE B, S(t,¥.2) = (BV y)(@V 2! V (x2!) ‘We compute: £(0,0,0) = 0, f(0,0,1) = 0, £(0,1,0) = 1, f(1,0,0) =1, £(0,1,1) =1, £(1,0,1) =a, f(1,1,0) =1, FU, =a. ‘The canonical forms are Sey, 2) = a'ye! Vny'2' V a'y2 V ary'z V xyz! V axyz, and F(ey2) =(@VyV2)eVyV2)(aVal VyVz)(aVval Vy V2!) 31. Exercise Let f : BY + B, defined by: S(a,b,2,y, 2) = ary V bry’ V U'z'y V a’s'y! Prove that! t,y,a,6) = f(a,0.y 2) = S(z,y',b,a) = f(2'y’,a’,8) 116 CHAPTER 5. BOOLEAN ALGEBRAS 5.3 Boolean equations As usual, {B, V, -,', 0, 1} is a Boolean algebra. 32. Definition By a Boolean equation in n unknowns we mean an equation of the form F(X) = 9X), where f and g are Boolean functions of n variables ‘The vector X = (1r,.., z,) is the unknown. A solution of the equation is any vector X, such that f(X,) = 9(X.) By a Boolean inequality in n unknowns we mean an inequality of ‘the form s(X) <9(X), with f and g as above; of course, a solution of the inequality is any vector X, such that f(X,) < 9(X.) By a system of Boolean equations in n unknowns we mean a system of the form: JAX) = gilX), Vi € {1,2,..m}, where, for every # € {1,2,..,.m}, fi and g; are Boolean functions of n variables A solution of the system is any vector X, which satisfies all the equations of the system. Analogously is defined the system of Boolean inequalities. To solve a Boolean equation (or system, etc,) it means to determine all the solutions. An equation (or system, ete) is called consistent if it has at least a solution (or, equivalently, the set of all its solutions is non-empty). Otherwise the equation (or system, etc) is called inconsistent. ‘Two equations (or systems, ete) are said to be equivalent if they have ‘the same sets of solutions 32. Theorem Every Boolean equation of n unknowns (or inequality, or system of equa- tions, or system of inequalities) is equivalent to a single Boolean equation of the form: L(x) 5.3. BOOLEAN EQUATIONS 17 where f is a Boolean function of n variables. Proof Let us consider the Boolean equation F(X) = 9X). By using the equivalence: x= y < xy/V2'y =0, (section 1, theorem 11 (1.21')) it rosults that the equation is equivalent with F(X)g'(X) v F(X) 9(X) = 0. Let us consider now the inequality: J(X) < 9X). By using the equivalence: x < y < xy/ =, (section 1, theorem 11 (1.20')), it results that the inequality is equivalent with: F(X) q'(X) = 0. It results that every system of equations (or inequalities) is equivalent with a system of equations of the form: f(X) = 0, Vi € {1,2,...m} By using the equivalence x = y= 0 4 2Vy = 0, (section 1,theorem 4 (1.9), it results that the system is equivalent with the single equation: A(X) Vo V fn(X) = 01 As a consequence of the above theorem, we shall r out loss of generality) to equations of the form f(X’ ‘estrict our study (with- 0 33, Examples (i) The equation xVvyl sav? is equivalent with: (eV y2'\(zv 2) Vv (2V y2')'(zV 2) =0, (eV ye!)a'zV aly’ V (2 V2’) 118 CHAPTER 5. BOOLEAN ALGEBRAS ay! V ay’ Vaz = 0, ay Vaz =0, (ii) The system: a Vy2 S22, cyV2l=1, is equivalent with: (2! Vy2)(22")' =0, (zy V a Vyz=0, a'zVylz=0. Of couse, in this moment we can solve the system: and the solution is: 34. Exercise Let a,b, ¢,p,1, 8 € B; then the equation: ax V br! Vo=prVrz'V s, is equivalent with: [lavelp's' va'e(pv s)jrV [bv cr's! VU er V 5)] Solution We put first both members of the equation in the canonical disjunctive form, hence the equation is equivalent with: (avezv bVe2" =(pvs)rV(rvs)z" Further: ((aV ole V (BV ca! PV s)zV (rv s)x"]- [Cav cla v (bv cla" [(pV s)z V(r V s)a"] =0. We compute: [(aVo)xv (bV ex"! = (a'e V2')(U'el V2) = 5.3. BOOLEAN EQUATIONS ug = adr vier Vale, Analogously: [PV s)x V(r s)z'|! = pista Vr's'x V pir's!, Introducing the above expressions into the equation, we get the desired form, 35. Exercise Let a,b € B; then the system: ay =ab, a'y is equivalent with the equation: (a’bV ab')zy V (a! V B)zy’ V (av B)x'y V (ab! V a'b)x'y! = 0. Solution The system is equivalent with: ay'(ab!)! V (xy'Yab! = 0, 2'y(a'by' v (x'y)'a’b by using De Morgan laws, we get: ay(a VB)V (2! V y)ab’ =0, 2'y(aV 0) V (eV y)a'b =. We reduce to a single equation: albx V abla! V ably V aby’ V (a! V b)xy! V (av B2"y If we bring the left member of this equation to the canonical disjunctive form, then we get the required conclusion. 36. Exercise is equivalent with: ery V (bVc)zy’ V (aVe)z'y V (aV OV o)a'y! = 120 CHAPTER 5. BOOLEAN ALGEBRAS Solution ‘The system is equivalent with the system ax! =0, by =0, dy Vex" Vey! = hence, by reducing to a single equation, we get: (ava! V (bV oy Very =0. The canonical disjunctive form of the left member of the above equation is the required form of the equation. 37. Exercises Reduce the following systems to a single equation of the form F(X) = 0. (i) yz =aVbc, V ab. ) zy =a, zVy=b. fii) x(y V 2) =bVe, y(zV 2) =eVa, 2(zVy) =aVb bVca, xy We shall study now the Boolean equation in one unknown, written in the canonical disjunctive form: ax V bx! = 0. If we denote f(r) = ax V ba’, then we have a = f(1) and b = (0) 38. Lemma The following assertions are equivalent (i) arVbs! =0. (i) b< (i) By conjugation with 2! and with ax of the z=drVbe', we deduce (respectively) 0 = be! and ax hence ax V br! = 0, 39. Theorem ‘The Boolean equation in one unknown’ ax V bx! is consistent if and only if ab = 0. If this condition is satisfied, then the set of all the solutions of the equation is the interval: ze (bal, on, equivalently, in a parametric form =a't Vb, where t € B. 122 CHAPTER 5. BOOLEAN ALGEBRAS Proof Let us assume that the equation is consistent, hence there is, € B such that: ar, V br, = 0. From the above lemma we get 6 s ‘The inequality is equivalent with the equation: (zVos= 5.3. BOOLEAN EQUATIONS 123 hence we must solve: sc'x! = 0. ‘We observe that the consistency condition is fulfilled: 0- (se) =0. The solution is: [sel], or, in parametric form: n=tvsd, teB. (ii) Let us consider the equation: zVess, which is equivalent with: sav slov sda! or, in the canonical disjunctive form: six V (s'cV se’)a" ‘The consistency condition is: sic=0, which is not always fulfilled; if it holds, the solution is: x €[sc,s], or in parametric form: rastVsc, teB (iii) Let us solve the equation ar=s It is equivalent. with: (staV sa')z V sx! ‘The consistency condition is: 124 CHAPTER 5. BOOLEAN ALGEBRAS If the above condition is satisfied, the solution is: re ls,sVal] or, in parametric form: sValjivs, te B (iv) More generally, lot. us solve the equation: arVc=s, ‘The equation is equivalent with: [s(a Ve) V sa'e|x v (sev se’)! ‘The consistency condition is seVa'ds =0, and the solution (if the above condition holds) is x €[sc,s Val] or, in parametric form: (sVa'}tv sc, t€B. (v) Let us solve now: ax V br! Ve=0. ‘The canonical disjunctive form is (see section 2,example 6(i)): (aver Vv GV ez" =0. ‘The equation is consistent if and only if: (av cj(bVe) or: 5.3. BOOLEAN EQUATIONS 125 hence: ab =Oand c= 0. If these conditions are satisfied, the solution is: 2€ [bal], or, equivalently: zaatVb,bEB. (vi) Let us solve the equation az = br ‘The equation is equivalent with: (ab! V a'b) which is always consistent; the solution is: x €[0,abva'b), or, in parametric form: =(abVald))t, te B. 41. Example Let us solve now the general equation: ar V br! Ve = pr Viral Vs. ‘The canonical disjunctive form is (see example 40): (Cav op's' Va‘e(pV sz V [OV e's! V #e(r V5) ‘The consistency condition is: (abv c)p'r's! V ablep'rs! v albe'pr’s! V ab d(pr Vs) If this condition is fulfilled, the solution is: 2 [(bVchr’s' VBE V5),a'ep's' V (aV (pV 5), 126 CHAPTER 5. BOOLEAN ALGEBRAS or, in parametric form: = [a'ep's! V (aV (pv stv (OV o's! VU e(rV 8). We now return to the case of several variables. The consistency condition is given in the following theorem. 42. Theorem Let f : B" + B, be a Boolean function of n variables. The equation (in n unknowns) F(X) =0 is consistent if and only if A fA=o. Aeto.1)" The result is a generalization to n variables of the consistency condition of the case of a single variable. 43. Examples (i) Lot us consider the general equation in two unknowns: ary V bry! V ex'y V da'y’ The consistency condition is: abed = 0 (ii) Let us consider the equation ery V ayzV brz = 0. If we denote: Sle, y,2) = cay V aye V bre, then the consistency condition is £(0,0, 0) f (0,0, 1) F(O, 1, 0) F(2, 0, 0) (2, 1,0) (2, 0, 1) F(0, 1, 1) F211) = 0. 5.3. BOOLEAN EQUATIONS 127 We have: £(0,0,0) = 0, (0,0,1) = 0, f(0,1,0) = 0, f(1,0,0) = (11,0) =, f(1,0,1) =8, f(0,1,1) =a, f(1,1,1) =aVbVe. ‘The canonical disjunctive form for f is: F(2,y.2) = cays! V bay’2 V ax'y2V (a V BY oayz, and the consistency condition for the equation f(x, y, 2) = 0 is always true 44. Proposition ‘The range of a Boolean function of n variables: f: BoB is the interval: B= A 4, Vo FAD Actoy" Actonyn Proof It was shown (seo section 2,corollary 5) that fel A A), Vo fA vx © B" acfoy Acta)" ‘To prove the converse, we have to prove that for every cel A fA), Vo SA); Ae(o1y" Ae(oy" the equation i(X) =e is consistent. The above equation is equivalent with: CT(X) Vef'(X) =0. By using theorem 12, the consistency condition for this equation is: A [ef(A)vef"(A)] = 0. Ac(oa}" 128 CHAPTER 5. BOOLEAN ALGEBRAS which is equivalent with: é A fave A FA=0. Ac{o1" Ac{o.y" This last equality is fulfilled because: NK fA B be a Boolean function and let I(X) = be the associated Boolean equation. For every p € {1,2,..,n}, we define: Fors 5 %)) = AN F255 Bp Apt) 5 Os Gpiananletory-> ‘thus, in particular, we have: In(ars1Fn) = fr tn)s Fray 5a) = f(r, 5 m1, 0) F154, 2-1 1), ‘The method (algorithm) starts with the equation f(X) = 0, written as fr(t1,.2n) = 0. We write this equation in the equivalent form: Satis nas Wty V fer, stn, 0)2h, = 0. 5.3. BOOLEAN EQUATIONS 129 If we consider the above equation as an equation in the single variable x, then its solution is Fatty tna. 0) Stn S f(y Fras 1s if and only if the consistency condition holds: Fars oy Envy V) * f(y) tn1 0) But the above equation (in the unknowns 21, .., %-1) is precisely: Fa-1(@1) 4) %n-1) = 0. By repeating the above step n — 1 times, we finally got the equation Alt) =0, whose solution is fA) Sm <= fi), if and only if the consistency condition holds: A:(0) - fxd) = 0. It can be proved that the original equation f(X)=0 is consistent if and only if f,(0)f,(1) = 0. If this condition is fulfilled, the solutions can be written as recurrent inequalities: So(@1y 4 %p-240) S xp SM (e1, p11), Vp = 1,2,.0, or, equivalently, in recurrent parametric form: Bp = fy, yay tp V fo(ta, -.2p-1,0), Wty € B, Wp = 1,2,...n. 46. Example Let us apply the method of successive eliminations to solve the general Boolean equation in two unknowns ary V bry’ Vox'y V da'y! = 130 CHAPTER 5. BOOLEAN ALGEBRAS We have: Jrlx,y) = Flz.y), which can be written in the equivalent form: (az V ca")y V (be V de')y' = 0 ‘The solution is: br Vde' Sy < (ar Ver’)! =a'xV cx", provided the consistency condition holds: (ax V cx")(bx V da!) = ‘This last equation in x is equivalent with: abs V eda! = 0. ‘The consistency condition is abed = 0 and the solution is cdSasa'vo, be Vda! Sy

You might also like