\documentclass[11pt]{article}
\usepackage{fullpage}
\usepackage{amssymb,amsfonts,amsmath,amsthm} 
\usepackage[margin= 1in]{geometry}
\usepackage{url}

\usepackage{enumerate}
\usepackage{color}
\usepackage[pdftex]{graphicx}
\usepackage{lastpage}
\usepackage{mathptmx}

\newtheorem{thm}{THEOREM}[]
\newtheorem{lem}[thm]{LEMMA}
\newtheorem{cor}[thm]{COROLLARY}
\newtheorem{prop}[thm]{PROPOSITION}
\newtheorem{as}[thm]{ASSUMPTION}
\newtheorem{conjecture}[thm]{Conjecture}
\newtheorem{claim}[thm]{CLAIM}
\theoremstyle{definition}
\newtheorem{defi}[]{DEFINITION}
\theoremstyle{definition}
\newtheorem{remark}[thm]{REMARK}
\newtheorem{fact}[thm]{Fact}
\newtheorem{ex}[thm]{Example}

\setlength{\parindent}{0cm}

\newcommand{\tab}{\hspace{3ex}}
\newcommand{\R}{\mathbb{R}}

\usepackage{titlesec}
\usepackage{sectsty}
\hyphenchar\font=-1

\sectionfont{  \normalsize	\sectionrule{0pt}{0pt}{-5pt}{0.05pt}
	}

\titleformat*{\section}{ \Large  \center}
\titleformat{\subsection}[runin]
               {\normalfont\bfseries }
               {}{0em}{}[.]
               
\titlespacing{\section}
               {\parindent}{0pt}{5pt}
\titlespacing{\subsection}
               {0pt}{2ex plus .1ex minus .2ex}{5pt} 
               
               
               \makeatletter
 \renewcommand{\@evenfoot}{%
   Page \thepage{} of \pageref{VeryLastPage} \hfil
    
 }
 \renewcommand{\@oddfoot}{\@evenfoot}
 \makeatother

               
\begin{document}

\begin{center}
{\huge  \sc   Homework 7} \\
\smallskip
{ Due Date: 05/17/2022}\\
\smallskip
{Name:  }\\
{\large  }
\end{center}
\vspace{1cm}



\begin{enumerate}

\item[19.2] The functions $f,g:\mathbb{R}\rightarrow \mathbb{R}$ are defined as follows:
\[
f(x) = \begin{cases}
  2x,  & x\in [0,1] \\
  1, &  \text{ otherwise}
\end{cases}
\]

\[
g(x) = \begin{cases}
  x^2,  & x\in [0,1] \\
  0, &  \text{ otherwise}
\end{cases}
\]

Give formulae describing the functions $g\circ f$ and $f\circ g$. Draw the graphs of these functions. 
\newpage

\item[19.4] Let $X,Y,Z$ be sets, and let $f:X\rightarrow Y$ and $g:Y\rightarrow Z$ be functions.
\begin{enumerate}
    \item Given that $g\circ f$ is onto, can you deduce that $f$ is onto? Give a proof or a counterexample. 
    
    \item Given that $g\circ f$ is onto, can you deduce that $g$ is onto? 
    
    \item Given that $g\circ f$ is 1-1, can you deduce that $f$ is 1-1?
    
    \item Given that $g\circ f$ is 1-1, can you deduce that $g$ is 1-1?
    
    
\end{enumerate}

\newpage 


    \item[19.5] Use the Pigeonhole Principle to prove the following statements involving a positive integer $n$:
    
    \begin{enumerate}
        \item In any set of 6 integers, there must be two whose difference is divisible by 5.
        
        \item In any set of $n+1$ integers, there must be two whose difference is divisible by $n$.
        
        \item Given any $n$ integers $a_1, a_2,\ldots, a_n$, there is a non-empty subset of these whose sum is divisible by $n$.
        
        \item Given any set $S$ consisting of ten distinct integers between 1 and 50, there are two different 5-element subsets of $S$ with the same sum. 
        
        \item Given any set $T$ consisting of nine distinct integers between 1 and 50, there are two disjoint subsets of $T$ with the same sum. 
        
        \item If any set of 101 integers chosen from the set $\{1,2\ldots,200\}$, there must be two integers such that one divides the other. 
    \end{enumerate}
    
   
\newpage


\item [21.1] 

\begin{enumerate}
    \item Show that if $A$ is a countable st and $B$ is a finite set, then $A\cup B$ is countable. 
    
    \item Show that if $A$ and $B$ are both countable sets, then $A\cup B$ is countable. 
\end{enumerate}

\newpage 
\item[21.2] 

\begin{enumerate}
    \item Show that if each of the sets $S_n$ ( where $n$ is a natural number) is countable, then the union $S=\cup_{n=1}^{\infty}S_n$ is also countable. 
    
    
    \item Show that if $S$ and $T$ are countable sets, then the Cartesian product $S\times T$ is also countable. Hence show that $S=\cup_{n=1}^{\infty}S_n$ is countable, where $S^n=S\times S\times \ldots \times S$ ($n$ times).
\end{enumerate}

\newpage

\item[21.3] 

Write down a sequence $z_1,z_2,\ldots $ of complex numbers with the following property: for any complex number $w$ and any positive real number $\epsilon$, there exists $N$ such that $|w-z_n|<\epsilon$. 




\end{enumerate}




\label{VeryLastPage}
\end{document}
