\documentclass[11pt]{article}
\usepackage{fullpage}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[linesnumbered,lined]{algorithm2e}
\usepackage{scrextend}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{amsfonts}
\usepackage{enumitem}
\setlist[enumerate]{listparindent=\parindent}
\usepackage{cleveref}
\newcommand{\lxor}{\oplus}
\newcommand{\limplies}{\rightarrow}
\newcommand{\lbicond}{\leftrightarrow}
\newcommand{\universe}{\mathcal{U}}
\newcommand{\implication}{\ensuremath{P \limplies Q}}
\newcommand{\true}{T}
\newcommand{\false}{F}
\usepackage{cleveref}%[nameinlink]
\crefname{lemma}{Lemma}{Lemmas}
\crefname{proposition}{Proposition}{Propositions}
\crefname{definition}{Definition}{Definitions}
\crefname{theorem}{Theorem}{Theorems}
\crefname{conjecture}{Conjecture}{Conjectures}
\crefname{corollary}{Corollary}{Corollaries}
\crefname{section}{Section}{Sections}
\crefname{appendix}{Appendix}{Appendices}
\crefname{figure}{Fig.}{Figs.}
\crefname{equation}{Eq.}{Eqs.}
\crefname{table}{Table}{Tables}
\crefname{algocf}{Algorithm}{Algorithms}
\title{CS200 - Problem Set 3\\\small{Due: Monday, Mar. 5 to Canvas before class}}
\author{}
\date{}
\parindent=.25in
\parskip 7.2pt
\begin{document}
\maketitle
\vspace{-2cm}
Please read the sections of the syllabus on problem sets and honor code before starting this homework.
\begin{enumerate}
\item\textit{Statements} \textbf{[2 point each]}
% (4 points)
Simplify each of the following expressions, where $p$ denotes a statement, and $T$ and $F$ are the
Boolean constants {\em true} and {\em false}. Hint: each answer is one of $p$, $T$, or $F$. No proof needed, no steps need be shown.
\begin{enumerate}
\item
$T \wedge p$
\item
$F \wedge p$
\item
$T \vee p$
\item
$F \vee p$
\item
$p \vee p$
\item
$p \wedge p$
\item
$p \vee \neg p$
\end{enumerate}
{}
\item\textit{Quantifiers}~\\
%(6 points)
Consider the following statement:
$$\forall x, \exists y : (y > x) \wedge (\forall z, ((z \neq y) \wedge (z > x)) \rightarrow (z > y))$$
\begin{enumerate}
\item \textbf{[3 points]}
If the domain of $x$, $y$ and $z$ is $\mathbb{Z}$, state whether the statement is true or false.
Justify your answer.
\item \textbf{[3 points]}
If the domain of $x$, $y$ and $z$ is $\mathbb{R}$, state whether the statement is true or false.
Justify your answer.
\end{enumerate}
Hint: when you see $\forall x$, imagine that your enemy is trying to prove the statement false, and gets to choose any $x$ they want, and you want to show that no matter what they do, the statement is still true. When you see $\exists y$ after $\forall x$, you get to pick $y$ to try to show that you can counter your enemy's choice of $x.$
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textit{Turning English Into Math} \textbf{[6 points each]}~\\
When writing a proof, it is often helpful to use mathematical notation, rather than writing out the equivalent in English. This question will help you to practice this skill.
%(12 points)
Let $S$ be a set of students in a class and $f(s)$ be the score obtained by student $s$ in an exam.
Translate the English description of each predicate or statement below into a logical formula using quantifiers.
When writing a formula for a statement or a predicate, you may use any propositions/predicates that you have previously defined. Use the $\equiv$ symbol in your answer. For example, for part $a$, you should write $H(n)\equiv\dots.$
To get full credit, your answer should only use mathematical notation, and your response should be approximately as concise as mine.
\begin{enumerate}
\item
Predicate $H(n)$ asserts: $n$ is the highest score that any student got on the exam.
\item
Predicate $B(s)$ asserts: student $s$ got the highest score.
\item
Statement $p$ asserts: at least two students got the highest score.
\item Predicate $M(n)$ asserts: if any two students got the same score, that score is at least $n$.
\item
Predicate $R(s)$ asserts: student $s$ got 10 points less than the highest score.
\item
Statement $t$ asserts: the second highest score in the class is 10 points less than the highest score.
\end{enumerate}
{}
\item \textit{Implications} \textbf{[3 points each]}~\\
There are many ways to represent a logical implication ($P\rightarrow Q$) in English. To make proofs more interesting to read, we often take advantage of these different ways of phrasing the same underlying mathematical statement. In the following, I will ask you to rewrite sentences in the form $p\rightarrow q.$ For example, ``I get a brain freeze if I eat ice cream'' should be rewritten ``I eat ice cream $\limplies$ I get a brain freeze.'' Try to reason these out based on the English meaning first. Try thinking about the four possible options (True/False for each of $P$ and $Q$) and think about which make sense. If you are having trouble, check out p. 43 of Book of Proof, or problem 5 in Chapter 0 of \href{http://discretetext.oscarlevin.com/dmoi/sec_intro-statements.html#exercises_intro-statements}{DMOI} (which has solutions).
\begin{enumerate}
\item
{I open my umbrella whenever it rains.}
\item
{I miss class only if I am unwell.}
\item
{You can't invent unless you are curious and knowledgeable.}
\end{enumerate}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textit{Logical Equivalences} \textbf{[3 points each]}
%(8 points)
The following are important logical equivalences. (They are worth memorizing!)
\begin{enumerate}
\item
$p \limplies q \; \equiv \; \neg q \limplies \neg p$ \hspace{0.2in} (a statement is equivalent to its contrapositive)
\item
$\neg(p \wedge q) \; \equiv \; \neg p \vee \neg q$ \hspace{0.2in} (DeMorgan's Law)
\item
$\neg(p \vee q) \; \equiv \; \neg p \wedge \neg q$ \hspace{0.2in} (DeMorgan's Law)
\item
$p \wedge (q \vee r) \; \equiv \; (p \wedge q) \vee (p \wedge r)$ \hspace{0.2in} ($\wedge$ distributes over $\vee$)
\item
$p \vee (q \wedge r) \; \equiv \; (p \vee q) \wedge (p \vee r)$ \hspace{0.2in} ($\vee$ distributes over $\wedge$)
\end{enumerate}
Give an informal justification for each of (a), (b), and (c). That is, explain in a sentence or two why the equivalence is true. Show (d) through truth table.
When writing the truth table, be sure to include columns for subexpressions, such as $p \wedge q$.
The following is an example truth table for (e) showing in the last column the equivalence of output columns 2 and 5.
\begin{center}
\tabcolsep 1.5mm\begin{tabular}{|c| c| c||c|c|c|c|c|c|}
\hline
$p$&$q$&$r$&$q\wedge r$& $p \vee (q \wedge r)$ & $p \vee q$ & $p \vee r$ & $
(p \vee q) \wedge (p \vee r)$ & $ p \vee (q \wedge r) \lbicond (p \vee
q) \wedge (p \vee r)$\\
\hline
\hline
T&T&T & T& T& T&T & T& T\\
\hline
T&T&F &F&T& T& T& T&T\\
\hline
T&F&T &F& T& T& T& T & T\\
\hline
T&F&F & F& T& T& T& T & T\\
\hline
F&T&T & T& T& T& T & T &T \\
\hline
F&T&F & F & F& T& F& F&T\\
\hline
F&F&T &F & F& F& T& F & T\\
\hline
F&F&F & F& F& F & F &F& T\\
\hline
\end{tabular}
\end{center}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item\textbf{[11 points each]} If you did not get full credit for the induction question on the quiz, please re-solve. (The solutions to the quiz are under Files on Canvas; don't look until after the pset is due.) Additionally, solve question 19 in Chapter 10 of BOP. (The solutions to odd numbered problems are at the end of the text; don't look until after the pset is due.)
\item \textbf{[6 points]} \textbf{This problem is not due for this problem set, but will be part of the following problem set.}\\~\\
What can you deduce from the following true statements? Please write the simplest new true statement possible. (Partial credit will be given for more complex statements.)
\begin{align}
P&\rightarrow R\nonumber\\
Q&\rightarrow R\nonumber\\
P&\vee Q\nonumber\\
\rule{1cm}{0.15mm}&\rule{1.5cm}{0.15mm}\nonumber\\
\therefore\qquad&
\end{align}
{}
\item \textbf{[6 points]}\textbf{This problem is not due for this problem set, but will be part of the following problem set.}\\~\\
(Challenge problem) You meet two spiders on the road. Everyone knows that a spider either always tells the truth, or always lies. The first spider says, ``If we are brothers, then we are both liars.'' The second spider says, ``We are cousins or we are both liars.'' Are both spiders telling the truth? (Hint, create a truth table for their statements and consider the possible cases of each spider lying or telling the truth, and use deduction so see if there is a contradiction. Also, can brothers be cousins?)
{}
\item How long did you spend on this homework?
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}