Colorado State University

Recitation R12 - Propositional Logic (Review)
Spring 2015

CS160: Foundations in Programming


The purpose of this lab is to:
Create a file called R12.txt and write your solution in it to each of the following problems, one at a time. When everyone has had a chance to go through the problems, your TA will show you how to work each problem correctly.
  1. Translate the given statement into propositional logic using the propositions provided:

    You can use the wireless network in the airport if you pay the daily fee or you are a subscriber to the service. Express your answer in terms of w: "You can use the wireless network in the airport," d: "You pay the daily fee," and s: "You are a subscriber to the service."

  2. Use truth tables to prove these equivalences, and state the name:

    1. p ∧ T is equivalent to p
    2. p ∧ F is equivalent to F
    3. p ∧ p is equivalent to p
    4. p ∨ (p ∧ q) is equivalent to p

  3. Use De Morgan's law to find the negation of each of the following conditions in Java, and shown the resulting condition in Java:

    1. (i < 1 || i > 9)
    2. (p != false && q == false)

  4. Show that the following conditional statement is a tautology by using truth tables.

    1. ¬p → (p → q)

  5. Define tautology, contradiction, and contingency.

  6. Show the converse, contrapositive, and inverse of p → q.

  7. Prove the following logical equivalence using only the logical equivalences and laws on the Logic Sheet.

    p ∨ (¬p ∧ q) ≡ (p ∨ q)

  8. Prove the logical equivalence above using a truth table.

The TA will check off your answers, also please submit your R12.txt to RamCT to verify your attendance.

© 2015 CS160 Colorado State University. All Rights Reserved.