\documentclass[answers,addpoints,11pt]{exam}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[most]{tcolorbox}
\usepackage{datetime}
\usepackage{enumerate}
\usepackage{xltxtra}
\usepackage{listings}

\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{makecell}
\usepackage{multicol}
\usepackage{multirow}

\usepackage{tabularx}
\usepackage{textcomp}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,decorations.pathmorphing,backgrounds,positioning,fit}
\usepackage{pgf-umlcd}

\usepackage{fontspec}
\IfFontExistsTF{Gentium Book Basic}{
  \setmainfont{Gentium Book Basic}
}{
  \setmainfont{Times New Roman}
}
\IfFontExistsTF{Comic Code}{
  \setmonofont{Comic Code}[
  Scale = 0.85,
  ]
}{
}

\lstset{
  basicstyle=\ttfamily,
  language={},
}
\DeclareMathOperator{\limplies}{\Rightarrow}
\DeclareMathOperator{\lbiconditional}{\Leftrightarrow}
\DeclareMathOperator{\liff}{\iff}
\DeclareMathOperator{\lxor}{\oplus}
\DeclareMathOperator{\qeq}{\overset{?}{=}}
\DeclareMathOperator{\modulus}{\mathbf{mod}}
\DeclareMathOperator{\even}{even}
\DeclareMathOperator{\odd}{odd}
\DeclareMathOperator{\ddiv}{|}
\DeclareMathOperator{\ndiv}{\not|}
\DeclareMathOperator{\contra}{\Rightarrow\mskip-\thinmuskip\Leftarrow}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\P}[1]{\mathbb{P}(#1)}
\newcommand{\mathcheckmark}{\text{ \ding{51}}}

\DeclareMathOperator{\vowel}{vowel}
\DeclareMathOperator{\consonant}{consonant}
\DeclareMathOperator{\isprime}{prime}
\DeclareMathOperator{\equals}{equals}
\DeclareMathOperator{\divides}{divides}

\newcommand{\checkpoint}{{\Large $\checkmark$} }

% classname
\newcommand\labTitle{Sets and Logic Homework}
\newcommand\semester{Spring 2024}
\newcommand\className{Foundations of Computer Science}
\newcommand\classNumber{CIS~300}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname

\pagestyle{headandfoot}
\firstpageheader{\classNumber\\\semester}{\labTitle\\~}{\today\\~}
\runningheader{\labTitle}{}{\today}

\newenvironment{showExample}[1]{
  \begingroup
  \renewcommand{\solutiontitle}{\noindent\textbf{Example:}\enspace}
  \printanswers
  \begin{solution}[#1]
  }{
  \end{solution}
  \endgroup
}

\definecolor{outputgray}{gray}{0.95}
\definecolor{lsting}{rgb}{0.95, 0.9, 1.0}


\begin{document}
\pointsinrightmargin{}

\noindent
This lab has \textbf{six (6)} checkpoints.

\section*{Learning Outcomes}
Upon completing this lab, students should be able to

\begin{itemize}
\item Work with \emph{sets}, \emph{set operators}, \emph{set
    relations}, and \emph{power sets}.
\end{itemize}

\subsection*{Introduction}

Use these definitions while answering the following questions.

  \begin{tabular}{lll}
    $A$&$=$&$\{x | x \in $ the English alphabet$\}$\\
    $2\Z$&$=$&$\{x \in \Z \ni 2 \ddiv x\}$\\
    $\Z_7$&$=$&$\{0, 1, 2, 3, 4, 5, 6\}$\\
    $\Z_5$&$=$&$\{0, 1, 2, 3, 4\}$\\
    $V$&$=$&$\{a, e, i, o, u\}$\\
    $11\Z$&$=$&$\{y \in \Z \ni 11 \ddiv y\}$\\
    $R$&$=$&$\{red, orange, yellow, green, blue, indigo, violet\}$\\
    $CYMK$&$=$&$\{cyan, yellow, magenta, black\}$\\
    $C$&$=$&$\{\clubsuit, \heartsuit, \spadesuit\}$\\
  \end{tabular}

\begin{questions}
  \question{} Answer the following:
  \begin{parts}
  \part{} Which sets above are \emph{infinite}?
  \part{} $A - V = $ ?
  \part{} $\Z_7 \cap \{z \in \Z^+ \ni even(z)\}$ = ?
  \part{} $CYMK \cup R$ = ?
  \part{} True or false: $\emptyset \in \P{R}$?
  \part{} True or false: $R \subseteq \P{R}$?
  \part{} $V - A = $ ?
  \part{} $\P{ C } = $ ?
  \part{} $|\P{A}| = $ ?
  \end{parts}

  \question{} Use the \emph{set builder} notation to describe each of
    the following
  \begin{parts}
  \part $T = \{$all multiples of three$\}$
  \part $F = \{$all multiples of five$\}$
  \part $T \cap F$
  \end{parts}

\question{} Given two \emph{non-empty}, \emph{disjoint} sets, $Y$ and $B$,
  \begin{parts}
  \part What is the cardinality of $Y \cap B$?
  \part What is the cardinality of $Y \cup B$?
  \end{parts}

\question{} If there exists two \emph{finite} sets, $X$ and $M$, such
that  $M = \P{X}$, what do you know about $|M|$, $|X|$, and the
relationship between them?

\question{} Remainders:
  \begin{parts}
  \part Write one line in Java using two \lstinline|int| variables,
    \lstinline|remainder| and \lstinline|value|. Your line should
    assign the \emph{remainer} left when \lstinline|value| is divided
    by 7 to the variable \lstinline|remainder|.
  \part What is the \emph{set} of possible values that
    \lstinline|remainder| might be set to by your line?
  \end{parts}

\question{} Consider $A$.
  \begin{parts}
  \part Explain how you know how many subsets of $A$ have zero elements.
  \part Explain how you would determine how many subsets of $A$ have
    exactly 25 elements.
  \part What is the \emph{compliment} of $V = \{$English vowels$\}$ if
    $A$ is the universe?
  \end{parts}

\question{} Consider an arbitrary set $G$ and its relationship to $\P{G}$:
  \begin{parts}
  \part When (if ever) is $G \in \P{G}$? Explain your answer, in
    particular explaining how you know you have \emph{all} of the cases.
  \part When (if ever) is $G \subseteq \P{G}$? Explain your answer, in
    particular explaining how you know you have \emph{all} of the cases.
  \end{parts}
\end{questions}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
