# Introductory Discrete Mathematics for Computer Science/Logic Review

## Exercises

Here are some exercises to practice your fluency with logical operators.

Problem 1

 Write statements using logical operators and different letters for the following conditions:
 It is not cold. This is the statement: $\urcorner c$ . It is cold and also the water is running. This is the statement: $c\wedge w$ . I am either wearing shorts or pants, but not both. This is the statement: $s\oplus p$ . There is food, water or both. This is the statement: $f\vee w$ .

Problem 2

Draw the relevant truth tables, to show that $\neg p\vee q$ is or is not logically equivalent to $p\to q$ .

ANSWER: These statements are logically equivalent. Here is the truth table for both:

$p\,\!$ $q\,\!$ $\neg p$ $\neg p\vee q$ $p\to q$ T T F T T
T F F F F
F T T T T
F F T T T

Problem 3

Show that a conditional statement is logically equivalent to its contrapositive.

Problem 4

This problem also requires you to draw the relevant truth tables.

 Which two statements are logically equivalent?
 The converse of a conditional statement and the statement itself. WRONG! Try again. The converse and inverse of a conditional statement. Correct! A conditional statement and its inverse. WRONG! Try again. The converse and contrapositive of a conditional statement. WRONG! Try again.