# Introductory Discrete Mathematics for Computer Science/Logic Review

## Exercises

 Type classification: this is a quiz resource.

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: ${\displaystyle \urcorner c}$. It is cold and also the water is running. This is the statement: ${\displaystyle c\wedge w}$. I am either wearing shorts or pants, but not both. This is the statement: ${\displaystyle s\oplus p}$. There is food, water or both. This is the statement: ${\displaystyle f\vee w}$.

Problem 2

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

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

${\displaystyle p\,\!}$ ${\displaystyle q\,\!}$ ${\displaystyle \neg p}$ ${\displaystyle \neg p\vee q}$ ${\displaystyle 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.