\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 8} \\
\smallskip
{ Due Date: 05/24/2022}\\
\smallskip
{Name:  }\\
{\large  }
\end{center}
\vspace{1cm}



\begin{enumerate}

\item[21.4] Let $S$ be the set consisting of all infinite sequences of 0s and 1s. Use Cantor's diagonal argument to prove that $S$ is uncountable. 
\newpage

\item[21.5]
\begin{enumerate}
    \item Let $S$ be the set consisting of all the finite subsets of $N$. Prove that $S$ is countable. 
    
     \item Let $T$ be the set consisting of all the infinite subsets of $N$. Prove that $T$ is uncountable. 
\end{enumerate}
\newpage 
\item[21.6]

Every Tuesday, critic Ivor Smallbrain drinks a little too much, staggers out of the pub, and performs a kind of random walk towards his home. At each step of this walk, he stumbles either forwards or backwards, and the walk ends either when he collapses in a heap or when he reaches his front door (one of these always happens after a finite [possibly very large] number of steps). Ivor’s Irish friend Gerry O’Laughing always accompanies him and records each random walk as a sequence of 0s and1s: backwards: at each step he writes 1 if the step is forwards and 0 if it is backwards.
Prove that the set of all possible random walks is countable.

\newpage 
\item[(1)] Suppose that $A$ and $B$ are sets, and that there exists an injection $f:A\rightarrow B$ and surjection $g:B\rightarrow A$. Either prove that there exists a bijection $h:A\rightarrow B$, or give an example to show that such a bijection need to exist. 
\newpage 

\item[(2)] Suppose that $A$ and $B$ are sets, and that there exists surjections $f:A\rightarrow B$ and $g:B\rightarrow A$. Use the Schorder-Bernstein Theorem to show that there exists a bijection between $A$ and $B$.

\end{enumerate}




\label{VeryLastPage}
\end{document}
