     
\documentclass[addpoints]{exam}
    


\usepackage{amsfonts}
\usepackage{amsmath}
\sloppy


\begin{document}

  \pagestyle{headandfoot}
  \runningheadrule
  \firstpageheader{ Math 109 }{ Homework 5 }{ November 2, 2018 }
  \runningheader{ Math 109 }{ Homework 5, Page \thepage\ of \numpages}{ November 2, 2018 }

  \firstpagefooter{}{}{}
  \runningfooter{}{}{}
  \begin{flushright}
    \makebox[0.4\textwidth]{Name: \enspace\hrulefill}

    \vspace{0.2in}
    \makebox[0.4\textwidth]{Pid:\enspace\hrulefill}
  \end{flushright}

  \begin{questions}
    \question[10]
      Let $A_1$, \dots, $A_\ell$ be different subsets of $[n]$ such that $A_i \cap A_j
			\neq \emptyset$ for all $i \neq j \in [\ell]$. Prove that $\ell \le 2^{n - 1}$.

      \begin{solution}[\stretch{1}]
      \end{solution}
      \newpage
    \question[10]
      How many pairs of subsets $A, B \subseteq [n]$ are there such that $A \cap B
			\neq \emptyset$.

      \begin{solution}[\stretch{1}]
      \end{solution}
      \newpage
  \end{questions}
\end{document}