Computer Science 110
Foundations of Computer Science

Denison

NextClass Assignment 5

Problem 1: Boolean Expression Simplification

In this writeup, we will use the 'v' symbol for OR and the '^' symbol for AND and the ¬ symbol for NOT. The NOT modifies only the term that immediately follows the symbol, and so, if I want the negation of something more complicated than a simple boolean variable, I must use parenthesis to group a larger expression together.

Precedence rules for boolean expressions are (1) negation is always evaluated first, (2) AND is evaluated next, and (3) OR is evaluated last. Parenthesis can change this order.

Simplify the following boolean expressions (labeled as Q) as much as possible.  That is, your task is to find the smallest expression that is equivalent to the stated expression.  You may want to write out a truth table to check your solutions.  The first two solutions are given, along with explanations, but you are not required to provide explanations for your answers.  A good way to solve these problems is to create a truth table, with columns for each of the variables in the boolean expressions (as the "input" side), and columns for subexpressions and the final Q expression (as the "output" side). Then look at the Q column and see if you can spot a simplified expression.

1. Q = A ^ False
Solution: Q = false (regardless of whether A is true or false, Q is false)

2. Q = A v False

Solution: Q = A (if A is true, Q is true, and if A is false, Q is false, and thus A and Q are the same)

3. Q = A v True
Solution: Q =

4. Q = A ^ True
Solution: Q =

5. Q = A^ ¬A
Solution: Q =

6. Q = A v ¬A
Solution: Q =

7. Q = ¬(¬A)
Solution: Q =

8. Q = (A v B) ^ (A v ¬B)
Solution: Q =

9. Q = ¬(¬A v ¬B)
Solution: Q =

10. Q = ¬(¬A ^ ¬B)
Solution: Q =

Problem 2: Boolean Expression Equivalence

Indicate which of the following equations are correct for all truth values of A, B and C, and which are not.  Justify your answer.  To be clear, a justification that two expressions are different simply requires you to specify truth values for the variables such that the two expressions disagree.  A justification that they are the same requires you to create a complete truth table in which all entries for the two expressions match.

1. (A v B) ^ ¬(A ^ B) = (A ^ ¬B) v (¬A ^ B)

2. (A v B) ^ C = A ^ (B v C)