You are on page 1of 3

The University of Western Australia SCHOOL OF MATHEMATICS & STATISTICS UWA ACADEMY FOR YOUNG MATHEMATICIANS

Set Theory, Logic and Boolean Algebra: Problems with Solutions


We say below that we try to nd regions that cover 2-powers of s. The shapes of these regions cant be arbitrary; they must be regular such that they correspond to intersections of variables, e.g. for three variables A, B, C , ABC covers 1 square, AB covers 2 squares, and A covers 4 squares. In practice it is easy to recognise which 2-power regions are the appropriate ones. 1. Prove that B + A(B + C ) + BC = B + AC .
Solution. The essential idea here is that by the absorption property (p4 of the Notes ), B + BX = B, for any X. A With regard to the Karnaugh map, we nd BX is already covered by B . So, algebraically, B + A(B + C ) + BC = B + AB + AC + BC A B

Karnaugh Map C B B C

= B + AB + BC + AC, by commutativity (and associativity) of + (= ) = B + AC, by absorption (twice). By Karnaugh map, we use the lefthand side to determine which squares are covered (placing a in those that are). Then each is covered by at least one oval that covers a 2-power of s. The most ecient way we can do this yields the regions of the righthand side.

2. Prove that C + A(C + B ) + BC = C + AB .


Solution. This problem is not very dierent from the last one. Again, it follows via the absorption property. This time, our algebraic solution is as follows: C + A(C + B ) + BC = C + AC + AB + BC Karnaugh Map C C

A A

B B B = C + AC + BC + AB, by commutativity (and associativity) of + (= ) = C + AB, by absorption (twice).

By Karnaugh map, we use the lefthand side to determine which squares are covered (placing a in those that are). Then each is covered by at least one oval that covers a 2-power of s. The most ecient way we can do this yields the regions of the righthand side.

3. Prove that A + BC = (A + B )(A + C ).


Solution. The algebraic way is to expand the righthand side by the appropriate distribution rule (see p4. of the Notes ), and the use the absorption property, to show that it reduces to the lefthand side. We also use idempotence (see the same table on p4. of the Notes ), which in this case means A intersected (or union-ed) with itself is A: AA = A = A + A. (A + B )(A + C ) = AA + BA + AC + BC, = A + BA + AC + BC, = A + BC, by the distribution property (twice) by the idempotence property by absorption (twice).

Karnaugh Map C C B B

A B

By Karnaugh map, we use the lefthand side to determine which squares are covered (placing a in those that are). Then each is covered by at least one oval that covers a 2-power of s. The most ecient way we can do this yields the regions of the righthand side.

4. Prove that A + AB = A.
Solution. This is immediate from the absorption property. Essentially, AB is a sub-region of A. The Karnaugh map approach is just as trivial. Only A is covered and so the appropriate 2-power region encircles A. Thus, A + AB = A.

Karnaugh Map A A B B

5. Prove that (A + C )A + AC + C = A + C .
Solution. We have been talking about the absorption property, when, in fact, there are two, the second being that (A + X )A = A, for any X. So, (A + C )A reduces to A by the second absorption property, and AC + C reduces to C by the rstmentioned absorption property. In fact, AC also absorbs into A. Thus, we have: (A + C )A + AC + C = A + AC + C = A + C. By Karnaugh map, there is only one way to cover with 2-ovals all the squares covered by the lefthand side, and these immediately give the righthand side.

Karnaugh Map A A C C

6. Prove that BC + A(B + C ) = AB + BC + AC .


Solution. Expanding (applying a distribution rule) and rearranging (using an associative and commutative rule), gives the result immediately. The Karnaugh map shows you cant really do better. BC + A(B + C ) = BC + AB + AC = AB + BC + AC.

A A

Karnaugh Map C C B B B

7. Let A, B, C, D represent the binary digits of a decimal number in the range 0 to 15. Construct a simplied expression that is a prime number checker, i.e. if f (A, B, C, D) is the expression then f (A, B, C, D) should return 1 exactly when (ABCD)two is the binary representation of a prime number less than 16.
Solution. Let n be the number (as a decimal), and (ABCD)two be its binary representation, then the truth table with 1 representing T (true) and 0 representing F (false), together with the value of the function f (A, B, C, D). In the Karnaugh map, the squares for which f (A, B, C, D) = 1, are identied by a . Then each is covered by at least one oval that covers a 2-power of s (in this case, only two s could be covered at a time). n A B C D f 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 1 3 0 0 1 1 1 4 0 1 0 0 5 0 1 0 1 1 6 0 1 1 0 7 0 1 1 1 1 8 1 0 0 0 9 1 0 0 1 10 1 0 1 0 11 1 0 1 1 1 12 1 1 0 0 13 1 1 0 1 1 14 1 1 1 0 15 1 1 1 1

Karnaugh Map C C CD AB 00 01 11 10 B 00 A 01 B 11 A 10 B D D D

Thus we see that f (A, B, C, D) = A B C + A BD + BC D + B CD is an optimal way of writing f as a union of regions (there are other ways just as good).

You might also like