\documentclass{article}
\usepackage{fullpage,parskip}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{xcolor}
\usepackage{xfrac}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
\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 HW10 \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 Prove that $\le$ is not an equivalence relation.
\textbf{Proof:} \XXX
\item Let $T = \{ (a,b) \mid a, b \in A \}$ be the total relation on
an arbitrary non-empty set $A$.
\begin{enumerate}
\item Prove that $T$ is an equivalence relation.
\textbf{Proof:} \XXX
\item How many equivalence classes does $T$ have? Explain why.
\textbf{Answer:} \XXX
\end{enumerate}
\item Let $S$ be the set of bit-strings of length 4. We define the
relation $\equiv$ on two bit-strings $s_1, s_2 \in S$ as follows:
$s_1 \equiv s_2$ iff the number of ones in $s_1$ is equal to the
number of ones in $s_2$.
\begin{enumerate}
\item How many equivalence classes does $\equiv$ have? Write them
down.
\textbf{Answer:} \XXX
\item Write down a different equivalence relation, $E$, that has a
different definition but the same equivalence classes. There's
no need to prove anything: just give the definition.
\textbf{Answer:} \XXX
\end{enumerate}
\item Let the set $Q = \{ PO, HM, CM, SC, PZ \}$; we define the
relation: \[ W = \{ (PO, CM), (CM, SC), (CM, PZ), (PZ, SC), (SC, HM)
\}. \] (Looking at a map, our $W$ corresponds to ``can walk to
directly from south to north''.)
\begin{enumerate}
\item Draw a directed graph representing the relation $W$. To get
full credit, there should be no overlapping edges, i.e., no edge
should cross another one.
% you might want to leave the \vspace (vertical space) command
% in and then draw by hand.
%
% you can also use \includegraphics to include a PDF, if you like
% if you want to do something ``pro-level'', try using TikZ!
%
% if you _do_ actually draw the graph as a PDF or in TikZ,
% please delete the vspace command
\vspace{3in}
\item Write down the symmetric closure of $W$; no need to draw a
graph.
\textbf{Answer:} \XXX
\end{enumerate}
\item Suppose that a relation $R \subseteq A \times A$ is
reflexive. Prove that $R^*$ is reflexive.
\textbf{Proof:} \XXX
\item Suppose $R \subseteq B \times B$ is \textit{irreflexive},
i.e., for all $b \in B$, $(b,b) \not\in R$. Either prove that
$R^*$ is irreflexive or give a counterexample, i.e., a specific
$B$ and $R \subseteq B \times B$ where $R$ is irreflexive but
$R^*$ is not irreflexive.
\textbf{Answer:} \XXX
\item Suppose that $E_1$ and $E_2$ are equivalence relations on a
set $S$.
\begin{enumerate}
\item Either prove that $E_1 \cup E_2$ is an equivalence relation
or provide a counterexample (giving specific examples of $S$,
$E_1$, and $E_2$).
\textbf{Answer:} \XXX
\item Either prove that $E_1 \cap E_2$ is an equivalence relation
or provide a counterexample (giving specific examples of $S$,
$E_1$, and $E_2$).
\textbf{Answer:} \XXX
\end{enumerate}
\end{enumerate}
\end{document}