\documentclass[11pt]{article}

\usepackage{exscale}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{times,mathptm}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{mathpazo}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{wrapfig}

\graphicspath{ {.} }

\textwidth 6.5truein          
\textheight 9.5truein
\oddsidemargin 0.0in
\topmargin -0.5in
\thispagestyle{empty} 

\parindent 0pt          
\parskip 0pt

\begin{document}

{\bf Name: }
\hspace{13cm}
{\bf Section: }

\begin{large}
\centerline {\bf Computer Science 243}
\centerline {\bf Spring 2025}
\centerline {\bf Homework 11}
% \centerline{\bf My name}
\vskip .7cm

\bf Due: 11:59 p.m., Wednesday, 4/23/25 \hfill Points: 50
\end{large}
\vskip 0.5cm
Answer the following questions and show your work.  Your final submission must be completely your own work.

\begin{enumerate}

\vskip 0.5cm
\item {[6 points]}  List the ordered pairs in the relations below on A = $\{1, 2, 3, 4, 6\}$:
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item $R_1 = \{(a, b) \in R_1 \ | \  a \ | \ b\}$
\item $R_2 = \{(a, b) \in R_2 \ | \ a \cdot b$ is a power of 2$\}$
\item $R_3 = \{(a, b) \in R_3 \ | \ a$ and $b$ have the same number of letters$\}$
\end{enumerate}

\vskip 0.5cm
\item {[4 points]}  List the relations in problem 1 that are
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item reflexive
\item symmetric
\item antisymmetric
\item transitive
\end{enumerate}


\vskip 0.5cm
\item {[3 points]}  Find the following on the relations in problem 1: 
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item $R_1 \cap R_2$
\item $R_1 - R_3$
\item $R_2 \circ R_3$
\end{enumerate}


\vskip 0.5cm
\item {[5 points]} For the relation $R = \{(0, 0), (0, 2), (1, 1), (1, 3), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)\}$ on the set $\{0, 1, 2, 3\}$,
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[1 point]} write the matrix representing $R$ 
\item {[1 point]} draw the digraph of $R$
\item {[3 points]} list any needed closures (type of closure and closure itself) for $R$ to make it an equivalence relation
\end{enumerate}


\vskip 0.5cm
\item {[6 points]}  Which of the following are equivalence relations?  
For those that are not, list all missing properties along with an example that demonstrates each missing property. 
For parts (b) and (c), assume relations on the set of all people.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item $R_3$ from problem 1(c)
\item $R_4 = \{(a, b) \in R_4 \ | \ a$ and $b$ share a common parent$\}$
\item $R_5 = \{(a, b) \in R_5 \ | \ a$ and $b$ live in different towns$\}$
\end{enumerate}

\newpage

\vskip 0.5cm
\item {[4 points]}  Which of the following relations are posets?  For those that are not, state any missing properties.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[2 points]} $\{(0, 0), (1, 1), (1, 2), (1, 3), (2, 2), (3, 1), (3, 3)\}$ on the set $\{0, 1, 2, 3\}$
\item {[1 point]} $\{(0, 0), (1, 1), (2, 2), (3, 3)\}$ on the set $\{0, 1, 2, 3\}$
\item {[1 point]} $(a, b) \in R$ if $a$ is taller than $b$ on the set of all people
\end{enumerate}


\vskip 0.5cm
\item {[8 points]}  Which of the following relations are posets on the set $\{$a, b, c, d$\}$?  For those that are not, state any missing properties.  
For those that are, draw Hasse diagrams for each.\\

\begin{minipage}[h]{.5\textwidth}
\hspace{.4cm}
{\text a.} 
$\begin{bmatrix*}[l]
1 & 1 & 1 & 0 \\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0 \\
1 & 1 & 1 & 1 \\
\end{bmatrix*}
\hspace{6cm}
{\text b.} 
\begin{bmatrix*}[l]
1 & 0 & 1 & 0 \\
0 & 1 & 1 & 0\\
1 & 0 & 1 & 1 \\
1 & 1 & 0 & 1 \\
\end{bmatrix*} 
$
\end{minipage} \\

\begin{enumerate}[label=\alph*.]
\itemsep-0mm

\item[c.]
\begin{minipage}[h]{.5\textwidth}
\includegraphics[width=.4\linewidth]{hw11posetdigraph1.png}
\end{minipage}
d. \begin{minipage}[h]{.5\textwidth}
\includegraphics[width=.4\linewidth]{hw11posetdigraph2.png}
\end{minipage} \\
\end{enumerate}


\vskip .5cm
\item {[14 points]}  Answer the following questions for the poset represented by the following Hasse diagram:
\begin{center}
\begin{minipage}[h]{.5\textwidth}
\includegraphics[width=.5\linewidth]{hw11poset.png}
\end{minipage}
\end{center}

\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item Find the maximal elements. Find the minimal elements.
\item What, if any, is the greatest element?  The least element?
\item Find all upper bounds of $\{$a, b, c$\}$.
\item Find the least upper bound of $\{$a, b, c$\}$ if it exists.
\item Find all lower bounds of $\{$f, g, h$\}$.
\item Find the greatest lower bound of $\{$f, g, h$\}$, if it exists.
\item Find the least upper bound of $\{$c, e, j$\}$ if it exists.
\end{enumerate}


\end{enumerate}

\end{document}
