Note: this worksheet has been modified to emphasize the Boolean algebra content. Some problems have been deleted.; this, for instance, is why the first problem is #5 rather than #1. 5. Let A be the set of all bit strings of length 4. Define a partial order on A as follows: x y iff x y = x, where is bitwise conjunction. Does the poset (A, ) have a greatest element? A least element? Draw the Hasse diagram. The least element is 0000, the greatest element is 1111. 5*. Referring to the structure in the previous exercise, define operations product, sum and complement as bitwise conjunction, disjunction and negation, respectively. Then this structure is a Boolean algebra. Find: a. 0100 + 1001 Answer: 1101 b. 1101 0100 Answer: 0100 c. 1010 + 0011 Answer: 1010 + 0011= 0101+1100 =1101 d. 1100 + ( 0101 0011) Answer: 1100 + ( 0101 0011) =1100 + 0001=1101
7. Let A = {1, 2, 3, 5, 6, 10, 15, 30}. Draw the Hasse diagram for the poset (A, ). Is this poset a lattice? This poset is a lattice. We can see that for arbitrary a, b: LUB{a, b} = LCM(a, b) and GLB{a, b} = GCD(a, b}. 7*. Referring to the structure in the previous exercise, define product, sum, and complement as follows: xy = GCD(x, y), x+y = LCM(x, y), x = 30 x Then this structure is a Boolean algebra. A. What integer is the 0 (zero) identity element? Answer: 1 B. What integer is the 1 (unit) identity element? Answer: 30 C. Find 5 10 and 5+10 Answers: 5 10 = 5, 5+10 = 10 D. Find 2 + (2 10) and 2(2+10) Answers: 2 + (2 10) = 2 and 2(2+10) = 2 (absorption laws) E. Find 3 + (5 15) Answer: 5 15 = 5 so 3+(5 15) = 3+5 = 15 F. Find 2 +10 Answer: 2 +10 = 2 10 =15 3 = 3 10. Use Boolean identities, and algebra, to prove x y + y + z = y z + x ( ) Justify each step in the proof. Do not skip or combine steps. Here is one correct proof:
x y + y + z = x y + yz//demorgan'slaw = yx + yz//commutativelaw = y( x + z)//distributivelaw = y( z + x)//commutativelaw There are other correct proofs. We do not need to find the shortest proof just a proof in which each step is correct. However, if you write a shorter proof, you are invited to send it to Mr. Wooland. 11. Use Boolean identities, and algebra, to prove x xy + zy ( ) = x Justify each step of the proof. Do not skip or combine steps. Here is one proof. It is not the only correct proof. x( xy + zy) = xxy + x yz//distributivelaw = xy + x yz//idempotentlaw = xy + x( y + z)//demorgan'slaw = xy + x y + xz//distributivelaw = x( y + y)+ xz//distributivelaw = x( 1)+ xz//complementslaw =x + xz//identitylaw =x//absorptionlaw There are other correct proofs. We do not need to find the shortest proof just a proof in which each step is correct. However, if you write a shorter proof, you are invited to send it to Mr. Wooland. 12. T F The set { +, } is functionally complete. Proof: Since our set of operators contains both sum and negation, we only need to prove that product can be expressed in terms of sums and negations: xy = xy //Double negation = x + y //DeMorgan's Law and double negation
13. Write a Boolean expression that is equivalent to xyz + yz, but without any products. Solution: xyz + yz = xyz + yz //Double negation = x + y + z + y + z //DeMorgan's Law, double negation 14. T F The set {, } is functionally complete. Proof: Since our set of operators contains both sum and product, we only need to prove that sum can be expressed used products and negations: x + y = x + y //Double negation = x y //DeMorgan's Law 15. Write a Boolean expression that is equivalent to xyz + yz, but without any sums. Solution: xyz + yz = xyz + yz //Double negation = xyz yz //DeMorgan's Law 16. T F If the set, { } is functionally complete, then the set Proof: Since we have the hypothesis that {, }, we can prove that showing that negation and product can be expressed using only the nor operator. We will also use the definition: x y = x + y. First, x = x x //Idempotent Law = x + x //DeMorgan's Law = x x //Definition of nor Next, xy = x + y //DeMorgan's Law = x y //Definition of nor = ( x x) ( y y) //because a = a a { } is functionally complete. { } is functionally complete by
This shows that negations and products can be expressed using only the nor operator, so the nor operator is functionally complete. 17. T F If the set +, { } is functionally complete, then the set {} is functionally complete. Proof: Since we have the hypothesis that { +, }, we can prove that {} is functionally complete by showing that sum and negation can be expressed using only the nand operator. We will also use the definition: x y = xy. First, x = x + x //Idempotent Law = x x //DeMorgan's Law = x x //Definition of nand Next, x + y = x y //DeMorgan's Law = x y //Definition of nand = ( x x) ( y y) //because a = a a This shows that negations and sums can be expressed using only the nand operator, so the nand operator is functionally complete. 18. Use algebra (not a truth table) to derive the sum of products expansion (aka disjunctive normal ( ) y + z ( ) = xz + x + yz form) for F x, y,z steps. You must write the answer using lexicographic order. The answer is: x yz + x yz + x yz Here is the derivation: ( ). You don t have to justify the steps. You may skip or combine
( ) y + z ( ) yz xz + x + yz = xz + x + yz ( ) = xz + x yz + yz yz = xz + x yz + yzz = xz + x yz + y 0 = xz + x yz = xz( y + y)+ x yz = x yz + x yz + x yz = x yz + x yz + x yz 19. Use algebra (not a truth table) to derive the sum of products expansion (aka disjunctive normal form) for F ( x, y,z) = x( y + z)+ yz. You don t have to justify the steps. You may skip or combine steps. You must write the answer using lexicographic order. The answer is: xyz + x yz + x yz + x yz Here is the derivation, with some terse explanations. x( y + z)+ yz = x y + xz + yz //distributive law ( ) + xz ( y + y ) + yz ( x + x ) = x y z + z = x yz + x yz + x yz + x yz + xyz + x yz //distribute //multiply various terms by 1 = xyz + x yz + x yz + x yz //place minterms in correct order, remove redundant minterms 20. Use algebra (not a truth table) to derive the sum of products expansion (aka disjunctive normal form) for F ( x, y,z) = ( x + y) yz. You don t have to justify the steps. You may skip or combine steps. You must write the answer using lexicographic order. The answer is: x yz + x yz
( x + y) yz ( ) = x y y + z //DeMorgan's Laws = x y + x yz //Distributive and Idempotent Laws ( ) = x y z + z + x yz //Multiply a term by 1 = x yz + x yz + x yz //Distributive Law = x yz + x yz //Idempotent Law & check correct ordering of minterms 21. Use Boolean identities, and algebra, to prove ( y + x) x + y =1. Justify each step of the proof. Do not skip or combine steps. Here is one proof. It is not the only correct proof. ( y + x) x + y = ( y + x)+ x + y //DeMorgan's Law, Double Negation = ( y + x)+ [ x + y] //Associative Law = ( x + y)+ [ x + y] //Commutative Law =1 //Complements Law 22. Using, as needed, the Identity, Complements, Commutative, Associative and Distributive laws as axioms, prove this Idempotent law: x x = x. Proof: x = x 1//Identitylaw = x( x + x)//complementslaw = x x + x x//distributivelaw = x x +0//Complementslaw = x x//identitylaw 23. Using, as needed, the Identity, Complements, Commutative, Associative and Distributive laws as axioms, prove this Idempotent law: x + x = x. Proof:
x = x +0//Identitylaw = x + ( x x)//complementslaw = ( x + x) ( x + x )//Distributivelaw == ( x + x) 1//Complementslaw = x + x//identitylaw 24. Having proven the Idempotent laws (Exercises 22 and 23 above), use them as needed, along with the Identity, Complements, Commutative, Associative and Distributive laws as axioms, to prove this Domination law: x 0 = 0 Proof: x 0 = x ( x x)//complementslaw = ( x x) x//associativelaw = x x//idempotentlaw = 0//Complementslaw 25. Having proven the Idempotent laws (Exercises 22 and 23 above), use them as needed, along with the Identity, Complements, Commutative, Associative and Distributive laws as axioms, to prove this Domination law: x +1 = 1 Proof: x +1 = x + ( x + x)//complementslaw = ( x + x)+ x//associativelaw = x + x//idempotentlaw = 1//Complementslaw 26. Having proven the Idempotent and Domination laws (Exercises 22-25 above), use them as needed, along with the Identity, Complements, Commutative, Associative and Distributive laws as axioms, to prove this Absorption law: x + xy = x Proof:
x + xy = x 1+ xy//identitylaw = x( 1+ y)//distributivelaw = x 1//Dominationlaw = x//identitylaw 27. Having proven the Idempotent and Domination laws (Exercises 22-25 above), use them as needed, along with the Identity, Complements, Commutative, Associative and Distributive laws as axioms, to ( ) = x prove this Absorption law: x x + y Proof: ( ) ( ) x + y x x + y = x +0 ( )//Identitylaw = x + ( 0 y)//distributivelaw = x +0//Dominationlaw = x//identitylaw 28. Prove the following theorem for x and y in a Boolean algebra: y = xifandonlyify + x = 1andy x = 0. Proof One direction ( )of the biconditional is obvious. For the non- obvious direction ( ), we must prove: If y + x = 1andy x = 0 then y = x. Assume y + x = 1andy x = 0. Then
y = y 1//Identitylaw = y(x + x)//complementslaw = yx + yx//distributivelaw = yx +0//Hypothesis = yx + x x//identitylaw = x y + xx//commutativelaw2 = x ( y + x)//distributivelaw = x 1//Hypothesis = x//identitylaw 29. Use the result from #28 to prove this DeMorgan law: x + y = x y Proof: According to the previous theorem, we can prove this by proving two things: A. x + y + x y = 1 ( ) x y B. x + y ( ) = 0 Here is the proof of (A): ( x + y)+ x y = (( x + y)+ x)+ (( x + y)+ y)//distributivelaw,twice = (( y + x)+ x)+ (( x + y)+ y)//commutativelaw,twice ( ( )) + x + ( y + y ) ( ) //Associativelaw,twice = y + x + x = ( y +1)+ ( x +1)//Complementslaw,twice = 1+1//Dominationlaw,twice = 1//Dominationlaw
Here is the proof of (B): ( x + y) ( x y) = x y ( )//Commutativelaw ( ) x + y = x y x + x y y//distributivelaw = x x y + x y y//commutativelaw,twice = 0 y + x 0//Complementslaw,twice = 0+0//Dominationlaw,twice = 0//Idempotentlaw 30. Use the result from #28 to prove this DeMorgan law: xy = x + y Proof: According to the previous theorem, we can prove this by proving two things: A. xy + x + y ( ) = 1 B. xy x + y ( ) = 0 Here is the proof of (A): ( ) xy + x + y = ( xy + x)+ y//associativelaw = ( x + xy)+ y//commutativelaw = ( x + x) ( x + y)+ y//distributivelaw = 1 ( x + y)+ y//complementslaw = ( x + y)+ y//identitylaw = x + ( y + y )//Associativelaw = x +1//Complementslaw =1//Dominationlaw Here is the proof of (B): xy( x + y) = xyx + xy y//distributivelaw = x x y + xy y//commutativelaw = 0 y + x 0//Complementslaw,twice = 0+0//Dominationlaw,twice = 0//Idempotentlaw
31. Use algebra to derive the sum of products expansion (aka disjunctive normal form) for ( ) ( ) = x + z + y x + z F x, y,z You may skip/combine steps. You don t have to write the justifications. Your answer must be written using lexicographic order. Answer: x yz + x yz + x yz + x yz Solution: Here is one derivation. Some justifications have been provided, for pedagogical reasons, but you would not have to write those justifications on a test. x + z + y( x + z) = x z + yx + yz //DeMorgan's law, Distributive law ( ) + yx ( z + z ) + yz ( x + x ) = xz y + y //Multiply terms by 1, in 3 places = x yz + x yz + x yz + x yz + x yz + x yz //Distributive law 3, also Commutative law to arrange literals = x yz + x yz + x yz + x yz //Commutative law to arrange minterms lexicographically, // also Idempotent law to remove redundant minterm 32. Use algebra, not a truth table, to derive the sum of products expansion for F ( x, y, x) = z( y + x) You may skip/combine steps. You do not have to justify the steps. You must write your answer using lexicographic order. Answer: xyz + xyz + xyz + xyz + xyz Solution: Here is one derivation. Some justifications have been provided, for pedagogical reasons, but you would not have to write those justifications on a test (for this style of problem, only).
( ) ( ) //DeMorgan's Law z y + x = z + y + x = z + yx //DeMorgan's Law = z( x + x)+ yx z + z ( ) //Multiply terms by 1, in two places = zx + zx + yxz + yxz //Distributive law = zx( y + y)+ zx( y + y)+ yxz + yxz //Multiply terms by 1, in two places = zxy + zxy + zxy + zxy + yxz + yxz //Distributive law = xyz + xyz + xyz + xyz + xyz + xyz //Commutative law, repeatedly, to arrange literals within minterms = xyz + xyz + xyz + xyz + xyz + xyz //Commutative law, repeatedly, to arrange minterms lexicographically = xyz + xyz + xyz + xyz + xyz //Idempotent law removes a redundant minterm 33. Let D 30 = { n :n 30}, and define product, sum and complement as follows: x y = gcd(x, y), x+y= lcm(x, y), x = 30 x. The symbols 0 and 1 represent the zero and unit identity elements, respectectively (not necessarily the integers 0 and 1). a. What are the atoms of this Boolean algebra? Answers: 2, 3, 5 b. Find 6+10 and 6 10. Answers: 6+10 = 1, 6 10 = 2 (note that 1 means the integer 30 in this Boolean algebra). c. Find 2+15 and 2 15. Answers: 2+15 = 1, 2 15 = 0 (note that 1 means the integer 30 in this Boolean algebra; 0 represents the integer 1). d. Find 3+6 and 3 6. Answers: 3+6 = 6, 3 6 = 3 e. Find 5,10,and15. Answers: 5 = 6,10 = 3,and15 = 2 f. Express 15 as a unique sum of atoms. Answer: 15 = 3 + 5 34. Let D 165 = { n :n 165}, and define product, sum and complement as follows: x y = gcd(x, y), x+y= lcm(x, y), x = 165 x. The symbols 0 and 1 represent the zero and unit identity elements, respectectively (not necessarily the integers 0 and 1).
a. What are the atoms of this Boolean algebra? Answers: 3, 5, 11 b. Find 3+11 and 3 11. Answers: 3+11 = 33, 3 11 = 0 (note that 1 means the integer 165 in this Boolean algebra; 0 represents the integer 1). c. Find 5+15 and 5 15. Answers: 5+15 = 5, 5 15 = 5 d. Find 55+33 and 55 33. Answers: 55+33 = 1, 55 33 = 11 e. Find 5,33,and15. Answers: 5 = 33,33= 5,and15 = 11 f. Express 55 as a unique sum of atoms. Answer: 55 = 11 + 5 35. Let U = {1, 2, 3, 4} and let 2 4 be the power set of U with the operations x y = x y x+y= x y, and letx be defined by the set math complement operation. a. What are the atoms of this Boolean algebra? Answers: {1}, {2}, {3}, {4} b. What is the zero identity element? Answer: c. What is the unit identity element? Answer: U d. Find {2, 3}+{1, 3} and {2, 3} {1, 3}. Answers: {2, 3}+{1, 3} = {1, 2, 3} and {2, 3} {1, 3} = {3}. e. Find {1, 2, 4}+{2, 3, 4} and {1, 2, 4} {2, 3, 4}. Answers: {1, 2, 4}+{2, 3, 4} = 1 and {1, 2, 4} {2, 3, 4} = {2, 4}. f. Find {2, 3}+{2, 3, 4} and {2, 3} {2, 3, 4}. Answers: {2, 3}+{2, 3, 4} = {2, 3, 4} and {2, 3} {2, 3}.
g. Find 2 { },{ 3,4},and 1,2,3 Answers: 2 { } = { 1,3,4}, 3,4 { }. { } = 1,2 { },and 1,2,3 h. Express {2, 4} as a unique sum of atoms. Answer: {2, 4} = {2} + {4} i. Express {1, 3, 4} as a unique sum of atoms. Answer: {1, 3, 4} = {2} + {3} + {4} { } = { 4}. j. T F This Boolean algebra is isomorphic to D30. This Boolean algebra is isomorphic to all finite Boolean algebras with 4 atoms, but D30 has only 3 atoms. 36. Let B6 be the set of all bit strings of length six and define the operations product, sum and complement as bitwise conjunction, disjunction and negation, respectively. a. What are the atoms of this Boolean algebra? Answers: 000001, 000010, 000100, 001000, 010000, and 100000. b. What is the zero identity element? Answer: 000000 c. What is the unit identity element? Answer: 111111 d. Find 011001+110111 and 011001 110111. Answers: 011001+110111 = 1 and 011001 110111 = 010001. e. Find 110001+110111 and 110001 110111. Answers: 110001+110111 = 110111 and 110001 110111 =110001. f. Find 010011+100110 and 010011 100110. Answers: 010011+100100 = 110111 and 010011 100100 = 0. g. Find 110010,010000,and101001. Answers: 110010 = 001101,010000 = 101111,and101001 = 010110. h. Express 110010 as a unique sum of atoms. Answer: 110010 = 100000 + 010000 + 000010
i. Express 011011 as a unique sum of atoms. Answer: 011011 = 010000 + 001000 + 000010 + 000001 j. T F This Boolean algebra is isomorphic to 2 6. Every finite Boolean algebra with 6 atoms is isomorphic to 2 6. 37. T F If B is a Boolean algebra such that B > 1, then there is no x such that x = x (that is, no element is its own complement). Proof: Suppose B is a Boolean algebra such that B > 1, and let x be an element such that x = x. According to the Complements Laws, we know that x + x = 1 and x x = 0. But since x = x, this means x + x = 1 and x x = 0. Then from the Idempotent Laws, we have x = 1 and x = 0, so 1 = 0, which is a contradiction. Comment: in the degenerate case where 0=1 in a Boolean algebra, the Boolean algebra has only one element. To see this, suppose y is any element of a Boolean algebra where 0 = 1. We will show that y = 0 = 1: y = y 1 //Identity law = y 0 //Because 1=0 = 0 //Domination law = 1 //Because 0 =1 This shows that in the degenerate or trivial Boolean algebra where 0=1, all elements are equal, hence there is only one element. 38. Let D 16 = { n :n 16}, and define product, sum and complement as follows: x y = gcd(x, y), x+y= lcm(x, y), x = 16 x. The symbols 0 and 1 represent the zero and unit identity elements, respectively (not necessarily the integers 0 and 1). T F D16 is a Boolean algebra. Proof : Note that, if this were a Boolean algebra, then 4 would be its own complement. Exercise #37 above tells us that in a nontrivial Boolean algebra, no element is its own complement. 39. Let D 36 = { n :n 36}, and define product, sum and complement as follows: x y = gcd(x, y),
x+y = lcm(x, y), x = 36 x. The symbols 0 and 1 represent the zero and unit identity elements, respectively (not necessarily the integers 0 and 1). T F D36 is a Boolean algebra. Proof: Note that, if this were a Boolean algebra, then 6 would be its own complement. Exercise #37 above tells us that in a nontrivial Boolean algebra, no element is its own complement. 40. Omit 41. Let D 12 = { n :n 12}= { 1,2,3,4,6,12}, and define product, sum and complement as follows: x y = gcd(x, y), x+y = lcm(x, y), x = 12 x. The symbols 0 and 1 represent the zero and unit identity elements, respectively (not necessarily the integers 0 and 1). Explain why this is not a Boolean algebra. Answer: In this case, no element is its own complement, but still the Complements Law fails. Note that 2= 6, so according to the Complements Law, it must be the case that ( ) 2+2= 1 = 12,because12istheunityidentity But instead, we have 2+2= 1 = 2+6 = 6 Since the Complements Law fails, this structure is not a Boolean algebra.