\documentclass{article}
\usepackage{fullpage,parskip}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\newcommand{\XXX}{{\color{red} \textsf{\textbf{XXX}}}}
\begin{document}
% To run this file, you'll need to have LaTeX installed. All of the
% lab computers have it. You can download a complete LaTeX
% distribution from
% https://www.tug.org/texlive/acquire-netinstall.html.
% Once you have LaTeX, you can either build your PDF on the
% command-line by running 'pdflatex hwXX.tex' to generate hwXX.pdf, or
% you can use an editor like LyX, TeXShop, or ShareLaTeX which
% automates the building of your PDF.
% Please print out your solution double-sided (a/k/a duplex) and bring
% it to class on the Wednesday it's due.
\noindent
% fill in the XXXs below
{\Large CS055 HW02 \qquad Name: \XXX \qquad CAS ID: \XXX} \\[.5em]
% I encourage you to collaborate, but please list any other students
% you talked to about the homework. If you worked alone, please just
% remove the XXXs.
Collaborators: \XXX
% Okay! Solve the problems below. please don't delete the problem
% statement or the ``enumerate'' bracketing which provides the
% numbering.
\begin{enumerate}
\item Write a proposition that is \textit{valid} a/k/a a
\textit{tautology}. You may use the predicate symbols $p$ and $q$
along with the operations $\neg$, $\wedge$, and $\vee$; you may not
use $\top$ and $\bot$ in your proposition.
\textbf{Answer:} \XXX
Prove that your answer is correct by constructing a truth table. Be
sure to include entries for all of the subformulae. (While your
proposition shouldn't have $\top$ or $\bot$ in it, you'll of course
need it in the rows of the truth table itself!)
\textbf{Proof:} \XXX
\item Let our universe of discourse be $S$, the domain of all college
students. Let the predicate $C(x)$ mean that $x$ is a computer
science major; let $D(x)$ mean that $x$ takes discrete mathematics;
$M(x)$ mean that $x$ takes combinatorics.
Express the following propositions, using quantifiers appropriately.
\begin{enumerate}
\item Computer science majors take either discrete math or
combinatorics.
\textbf{Answer:} \XXX
\item All students who take discrete mathematics are computer
science majors.
\textbf{Answer:} \XXX
\item Students who take combinatorics don't take discrete math.
\textbf{Answer:} \XXX
\item Some computer science majors take both discrete math
\textit{and} combinatorics.
\textbf{Answer:} \XXX
\end{enumerate}
\item Let our universe of discouse be $S_{\mathsf{CS55 PO SP17}}$, the
domain of students taking CS55 at Pomona College in Spring
2017. (Hey---you're in there!) Let $C(x)$ denote ``$x$ is a computer
science major'' and $A(x,y)$ denote ``$x$ asked $y$ a question about
HW02''.
Express each of the following propositions, using quantifiers appropriately.
\begin{enumerate}
\item There exists two students who have asked each other questions about HW02.
\textbf{Answer:} \XXX
\item Every student asks themselves a question about HW02.
\textbf{Answer:} \XXX
\item Every computer science major has asked another student a question about HW02.
\textbf{Answer:} \XXX
\item Someone has asked a non-CS major a question about HW02.
\textbf{Answer:} \XXX
\item There's a student whom \textit{everyone} has asked a question
about HW02.
\textbf{Answer:} \XXX
\end{enumerate}
\item For each of the following propositions about numbers, indicate
which universes of discourse make it hold, if any. Choose from the
following standard numerical sets: the naturals, $\mathbb{N}$; the
integers, $\mathbb{Z}$, and the reals, $\mathbb{R}$. Explain your
answer, but there's no need for a proof.
\begin{enumerate}
\item $\forall n \exists m,~ n * m = 0$
\textbf{Answer:} \XXX
\item $\exists n \forall m,~ n \le m$
\textbf{Answer:} \XXX
\item $\forall n, \exists m~ m < n$
\textbf{Answer:} \XXX
\item $\forall n \nexists m,~ n < m \wedge m < n + 1$
\textbf{Answer:} \XXX
\item $\forall n \exists m,~ n < m \wedge m < n + 1$
\textbf{Answer:} \XXX
\item $\forall n \exists m,~ m^2 = n$
\textbf{Answer:} \XXX
\end{enumerate}
\item Construct finite sets of words with the appropriate
property. There may be more than one set with the given property; it
doesn't matter which you choose. Each question builds on the previous ones.
\begin{enumerate}
\item\label{set1} $\textrm{bamboozle} \in X$.
\textbf{Answer:} $X = \{ \textrm{bamboozle}, \textrm{hoodwink} \}$.
\item $X \subseteq Y$ (where $X$ is from Problem (\ref{set1})).
\textbf{Answer:} $Y = \XXX$
\item $Z \subseteq \mathcal{P}(X)$ (where $\mathcal{P}(X)$ is the
\textit{power set} of $X$).
\textbf{Answer:} $Z = \XXX$
\item $\emptyset \subset Q \wedge \forall y, y \in Q \rightarrow y = \textrm{cheese}$
\textbf{Answer:} $Q = \XXX$
\item $\forall x, x \in R \rightarrow x \in Q \wedge x \ne \textrm{cheese}$
\textbf{Answer:} $R = \XXX$
\end{enumerate}
\item \label{element} Prove the following propositions element-wise: to
show $P = Q$, show that $P \subseteq Q$ and vice versa, i.e., show
that $\forall x,~ x \in P \rightarrow x \in Q$ and vice versa.
\begin{enumerate}
\item $A \cap \emptyset = \emptyset$
\textbf{Proof:} \XXX
\item $A \cup A = A$, i.e., $\cup$ is \textit{reflexive}.
\textbf{Proof:} \XXX
\item $A \cap B \subseteq A$
\textbf{Proof:} \XXX
\item $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$, i.e., $\cup$
is \textit{distributive} over $\cap$.
\textbf{Proof:} \XXX
\item $A \cup (B \cup C) = (A \cup B) \cup C$, i.e., $\cup$ is
\textit{associative}.
\textbf{Proof:} \XXX
\end{enumerate}
\item Prove that $A \cup (A \cup B) = A \cup B$
\textit{algebraically}. You may use the propositions proved in
Problem (\ref{element}), but you should not do an element-wise
proof.
\textbf{Proof:} \XXX
\end{enumerate}
\end{document}