Colorado State University

Recitation R10 - Propositional Logic
Spring 2014

CS160: Foundations in Programming


The purpose of this lab is to learn propositional logic:

1. Problems involving propositional logic

Solve the following problems in a text file called R10.txt, using an editor such as gedit. Your TA will go over them when everyone has completed the problems.

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

    1. Do not drive too fast.
    2. What time is it in New York?
    3. 3 * x = 15
    4. The capital of Utah is Moab.
    5. The moon is made of green cheese.
    6. 6 * 3 = 18

  2. Let p and q be the propositions:

    p: The midterm has been graded.
    q: The scores have been posted.

    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. Create a complete truth table for the following statements:

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

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

© 2014 CS160 Colorado State University. All Rights Reserved.