     
\documentclass[addpoints]{exam}
    


\usepackage{amsfonts}
\usepackage{tikz}
\usepackage{amsmath}

\usetikzlibrary{arrows,shapes}

\sloppy


\begin{document}

  \pagestyle{headandfoot}
  \runningheadrule
  \firstpageheader{ Math 184A }{ Homework 4 }{ May 12, 2019 }
  \runningheader{ Math 184A }{ Homework 4, Page \thepage\ of \numpages}{ May 12, 2019 }

  \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 $k$ be a positive integer.
			Find an explicit formula for the generating function for the sequence
			$\{\binom{n}{k}\}_{n \ge 0}$.

      \begin{solution}[\stretch{1}]
      \end{solution}
      \newpage
    \question
      All $n$ soldiers of a military squadron stand in a line. The officer in charge
			splits the line at several places, forming squads. Then she names
			one person in each unit to be the commander of that unit and a group of other
			solders to work in the kitchen. Find the number of different ways to do this.

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