CS 2603 Homework 2 — WFFs and Truth Tables

Due Tuesday, Jan 27, 2015

NOTE: This assignment is due at the beginning of the class period. This means that if you are even a minute late, you lose 20%. If you are worried about potentially being late, turn in your assignments ahead of time. Do this by submitting them to me during office hours or by sliding them under my office door. Do not send assignments to me through email or leave them in my departmental mail box.

1. Motivation

Well-formed formulas (WFFs) and truth tables are fundamental tools of formal logic and circuit diagrams are fundamental tools of electrical engineering. To understand these tools and their relationship to one another, it is import to gain experience with them.

2. Goal

The goal of this assignment is to give you experience with WFFs, truth tables, circuit diagrams, and their relationship to one another.

3. Assignment

  1. For each of the following expressions, attempt to match each of its components with one of the WFF syntax rules, starting with the whole expression and working your way down to atomic formulas. The result should be a tree similar to those shown in Lecture 2. If you successfully reach an atomic formula for each component, declare that the expression is a WFF. If some component cannot be matched with a WFF syntax rule, declare that the expression is not a WFF.

    1. ((P ∧ Q) → P)
    2. ((A ∨ B) → B)
    3. (((¬ P) ∨ Q) → ((¬ Q) ∨ P))
    4. (B ∨ B (A ∨ A))
    5. ((A ∧ (A ∧ B)) ∨ (¬ (¬ B)))
    6. ((¬ (Q ∧ P)) ↔ (P P))
    7. (Q ↔ False)
    8. (((A ∨ B) ∧ C) ∨ ((C ∨ B) ∧ A))
    9. ((P ∨ Q) ∨ (P ¬ Q))
    10. A ∧ A ∧ ¬ B

  2. For each WFF above, give a truth table. Each truth table should have the minimum number of rows to show all possible combinations of truth values of its atomic formulas. It should have columns on the left for these atomic formulas and a column on the right for the WFF itself. In between, it should have columns for all subformulas of the WFF ordered by working bottom to top and left to right up the tree you constructed for this WFF in Part 1 of this assignment.

    At the end of each truth table, say whether the corresponding WFF is tautological, contradictory, or satisfiable but not tautological.

  3. Convert the truth tables for WFF (a), (e), and (h) above into EE notation and draw their circuit diagrams.

  4. Convert the circuit diagram for (e), which you constructed in Part 3 of this assignment, into a circuit diagram that uses NAND gates only.

4. What to Turn In

You will turn in a typed or neatly written hard copy of your homework that answers the questions above.