# Homework 5

## Table of Contents

## Task 1 (25 pts)

Build truth tables for the following formulas:

- \(A \vee B \vee \neg C\)
- \((A \wedge \neg B) \vee C\)
- \((\neg A \leftrightarrow B) \vee B\)

## Task 2 (25 pts)

Express the following statements in propositional logic:

- \(B\) and \(C\) are both true should \(A\) be true.
- \(B\) is known to be true when \(A\) is true and not otherwise.
- At most one of \(R\), \(S\), and \(T\) can be true.
- The grass is wet if either it rained or the sprinkler was on. (Create propositional symbols, and give their definitions.)

## Task 3 (25 pts)

We have a knowledge base that contains:

a. \((R \rightarrow S) \wedge Q\)

b. \((J \wedge Q) \rightarrow P\)

c. \(Q \rightarrow Z\)

d. \(P \rightarrow \neg Q\)

e. \((R \rightarrow S) \rightarrow (\neg H \rightarrow J)\)

f. \((\neg Q \vee T) \rightarrow J\)

Derive each of the following using inference rules for propositional logic. Indicate the rule used (i.e., MP for modus ponens) and the propositions used with the rule. You can use propositions you have already proved but were not in the initial knowledge base.

- \(Z\)
- \(\neg P\)
- \(\neg (J \wedge Q)\)
- \(\neg J\)
- \(\neg T\)

## Task 4 (25 pts)

Rewrite the following statements in first-order logic, stating definitions for the predicates you use. (Note, one of these is exceedingly hard, yet still possible; make an attempt…)

- James is a dolphin.
- Dolphins are mammals.
- Mammals have hair and three middle ear bones.
- Not all dolphins live in the ocean.
- Some mammals have sweat glands and specialized teeth.
- Every US President lives in the White House.
- No US President is the same person as the US Vice President.
- This sentence cannot be proved.