\documentclass[11pt]{article}

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

\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 5}
% \centerline{\bf My name}
\vskip .7cm

\bf Due: 11:59 p.m., Wednesday, 2/26/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}

\item {[5 points]}  Prove or disprove the following, where the domain consists of all sets: \\
\hspace*{1cm}$\exists S$ $(P(S) = \{S\})$ \\
that is, there exists a set, $S$, whose powerset is equal to $\{S\}$.

\vskip 0.5cm
\item {[12 points]}  State whether each function below is (i) one-to-one and (ii) onto.  Provide reasoning for your answers.  
The domain for each function is the set of students in our CS 243 class.
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item a function that assigns a W\&M ID number to a student  (codomain: W\&M ID numbers)
\item a function that matches students with their HW 1 papers (codomain: HW 1 papers in our CS 243 class with the assumption
that every student submitted the assignment)
\item a function that assigns to a student a final letter grade, assuming an equal distribution of grades across
10-point intervals from 50 to 100 (codomain: \{A, B, C, D, F\}) 
\end{enumerate}


\vskip 0.5cm
\item {[6 points]} Consider the functions below. Assume a domain and codomain of real numbers.\\
\hspace*{1cm} $f(x) = {-x + 5}$ \\
\hspace*{1cm} $g(x) = \pm \sqrt{\mid x \mid}$
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item What is $f^{-1}(x)$?
\item What is $g \circ f$?
\end{enumerate}


\vskip 0.5cm
\item {[8 points]}  Compute the value of each of the following:
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item $\lfloor 1.4 \rfloor$
\item $\lceil 1.4 \rceil$
\item $\lfloor -2.5 \rfloor$
\item $\lceil -2.5 \rceil$
\item $\lfloor 4 \rfloor$
\item $\lceil 4 \rceil$
\item $\lfloor 3/2 + \lceil (1/2) \rceil \rfloor$
\item $\lceil 3/2 + \lfloor (1/2) \rfloor \rceil$
\end{enumerate}


\vskip 0.5cm
\item {[10 points]} What are the first 6 terms ($n = 0, 1, .., 5$) of the following sequences ($n \ge 0$)?
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item {[6 points]} $a_n = (-2)^n$
\item {[4 points]} $a_n = na_{n-1} + (a_{n-2})^2, \ a_0 = 0, \ a_1 = 1$
\end{enumerate}

\newpage

\vskip 0.5cm
\item {[9 points]}   Compute the following:
\begin{enumerate}[label=\alph*.]
\itemsep-0mm
\item $\displaystyle \sum_{i=1}^{4} (3i - 1)$
\item $\displaystyle \sum_{i=1}^{3} \sum_{j=0}^{2}(2i + 3)$
\item $\displaystyle \sum_{i=2}^{5} \sum_{j=1}^{2}j^2$
\end{enumerate}

\end{enumerate}

\end{document}
