\documentclass[10pt]{exam}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[most]{tcolorbox}
\usepackage{datetime}
\usepackage{enumerate}
\usepackage{enumitem}
\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}

\setlength{\topmargin}{-0.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.8in}

\usepackage{amsthm} %needed for \theoremstyle below
\theoremstyle{definition}
\newtheorem{exercise}{Exercise}[section]
\setcounter{section}{3}

% compact itemized and then enumerated
\setlist{leftmargin=*,
  noitemsep,
  topsep=5pt,
  parsep=0pt,
  partopsep=0pt,
}

\setlist[enumerate]{leftmargin=*,
  itemsep=2pt,
  topsep=0pt,
  parsep=0pt,
  partopsep=0pt,
}


\usepackage{fontspec}
\setmainfont{Gentium Basic}
\setmonofont{Comic Code}[
  Scale          = 0.80,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = *-Bold Italic
]

\lstset{
  basicstyle=\ttfamily,
}

\DeclareMathOperator{\limplies}{\Rightarrow}
\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)}

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

% classname
\newcommand\examNumber{gPascal - Playing with the Triangle}
\newcommand\semester{Fall 2023}
\newcommand\className{Foundations of Computer Science}
\newcommand\classNumber{CIS~300}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname

\title{\examNumber}


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

\begin{document}
\maketitle{}
\section*{Introduction}
This group assignment continues our class work with the
\textbf{Pascal's Triangle} project. You will work, in your
group, on some of the properties.

\section*{Assignment Goals}
\paragraph{Learning Outcomes} After completing this group assignment,
each student is expected to be able to
\begin{itemize}
\item Write a \emph{recursive} function for $T_{r, c}$ in the triangle.
\item Do some induction proofs
\end{itemize}

\section*{Procedure}

\noindent
\textbf{Assign Roles.} Students should take roles they
have not held recently (or, perhaps, ever):

\begin{quote}
\begin{description}
\item[Manager] Move discussion forward.
\item[Recorder] Writes the report that will be turned in.
\item[Reflector] Monitor that everyone gets heard and is caught
  up. (This is a \textbf{group} obligation, really.)
\item[Speaker] (Combine w/ \textbf{Reflector} if there are not four
  group members.) Asks the facilitator questions and communicates what
  the team has done.
\end{description}
\end{quote}
\noindent
\textbf{Answer these questions.}

\begin{questions}
\question{} Draw the upper-left portion of Pascal's triangle, for rows
  0 through 5 (and the same columns).
  \begin{parts}
  \part{} Label the \emph{rows} and \emph{columns}.
  \part{} Put the \emph{generator}, 1, in $T_{0,0}$.
  \part{} Use the rules of filling the triangle to fill the rest of
    the squares.
  \part{} What is the value in $T_{5,5}$?
  \part{} What are the vaules of $base_4$? In what order did you list
    them? (Give the triangle coordinates of the elements in the order
    you wrote them.)
  \part{} List the reciprocal pairs in $base_4$
  \end{parts}

\question{} Pascal's Seventh Consequence is \emph{In every
    arithmetical triangle the sum of the cells of each base is double
    that of the preceding base.} \textbf{Prove} this by
  \emph{induction} (use modern notation).

\question{} You know how to fill a given cell, $T_{r, c}$, in the
  triangle in terms of cells that have lower row or column
  coordinates. Turn this knowledge into a \emph{recursive} Java
  function. The \textbf{only} base case you can use is that $T_{0, 0}$
  contains 1 (the generator).
\end{questions}
\end{document}

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