Colorado State University

Recitation R10 - Topic
Fall 2013

CS160: Foundations in Programming


The purpose of this lab is to learn propositional logic:

1. Problems involving propositional logic

Solve 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 correctly.

  1. Which of these are propositions? What are the truth values of those that are propositions?

    1. Do not pass go.
    2. What time is it?
    3. 4 + x = 5
    4. The capital of Colorado is Denver.
    5. The moon is made of green cheese.
    6. 6*2=13

  2. Let p and q be the propositions
    p: The election is decided.
    q: The votes have been counted

    Express each of these compound propositions as an English sentence.

    1. ¬p
    2. ¬p ∧ q
    3. p ∨ q
    4. q → p
    5. ¬q → ¬p
    6. ¬p → ¬q
    7. p ↔ q
    8. ¬q ∨ (¬p ∧ q)

  3. Let p and q be the propositions

    p: You drive over 65 miles per hour.
    q: You get a speeding ticket.

    Write these propositions using p and q and logical connectives.
    1. You do not drive over 65 mph.
    2. You drive over 65 mph, but you do not get a speeding ticket.
    3. You will get a speeding ticket if you drive over 65 mph.
    4. If you do not drive over 65 mph, then you will not get a speeding ticket.
    5. Driving over 65 mph is necessary and sufficient for getting a speeding ticket.
    6. You get a speeding ticket, but you do not drive over 65 mph.
    7. Whenever you get a speeding ticket, you are driving over 65 mph.
  4. Complete truth table for the following statements:

    1. (p ∧ q)
    2. (q ∨ r)
    3. (¬r ⊕ s)
    4. (p ∧ q) ∨ (¬q ∧ r)

Show your work to the TA for grading and to get credit for this lab.


© 2013 CS160 Colorado State University. All Rights Reserved.