\documentclass[12pt]{article}

\usepackage{amsmath,amscd,amsbsy,amssymb,latexsym,url}
\usepackage{epsfig,graphicx,subfigure}
\usepackage{enumitem,balance,mathtools}
%\usepackage[labelsep=period, justification=justified, bf, width=1.3\linewidth, format=plain]{caption}
\usepackage{wrapfig}
\usepackage{tikz} \setlength\oddsidemargin{-0.05in}
\usetikzlibrary{calc} \setlength\evensidemargin{-0.05in}
%\usepackage{natbib}
\setlength\textheight{8.7in} \setlength\topmargin{-0.1in}
\setlength\textwidth{6.3in}
\usepackage{mathrsfs, euscript}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{exercise}{Exercise}[section]
%\newtheorem{solution}{section}

\setcounter{section}{1} \numberwithin{equation}{section}
\numberwithin{figure}{section}

\newenvironment{proof}[1][Proof:]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{definition}[1][Definition:]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{example}[1][Example:]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark:]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{solution}[1][Solution:]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\newcommand{\qed}{\nobreak \ifvmode \relax \else
      \ifdim\lastskip<1.5em \hskip-\lastskip
      \hskip1.5em plus0em minus0.5em \fi \nobreak
      \vrule height0.4em width0.5em depth0.25em\fi}
\newcommand{\hw}[1]{#1}%includes solutions
%\newcommand{\hw}[1]{}
\newcommand{\indt}[1]{\begin{list}{\setlength\leftmargin{0.5in}}\item{}#1\end{list}\noindent}
\def\Prob{\text{Prob}}
\def\prob{\text{Prob}}
\begin{document}
\noindent

%========================================================================
\begin{center}
\textbf{\Large{Homework 7}} \vspace{2mm}

Mathematics in Computer Science
%John E. Hopcroft
\end{center}
\vspace{1mm}

\begin{enumerate}
  \item Prove that
    \[{{m+n}\choose k}=\sum_{i=0}^k{m\choose{k-i}}{n\choose i}\]
  \item Use the principle of inclusion and exclusion to determine the number of
  integers between 1 and 1000 not divisible by 2,3, 5, or 7.
  \item  If there are 13,000 undergraduate students at
    Cornell, how many must have the same birthday?
  \item How many Boolean functions of $n$ variables? 
 \item Prove that
   \[
    {{m+n}\choose k}=\sum_{i=0}^k{m\choose{k-i}}{n\choose i}
    \]
   \item How many ways can one write seven as the sum of four
    nonnegative integers?
    \item
  \begin{enumerate}
  \item Role a $k$-sided dice three times.  How many possible
  outcomes are there?
  \item What is the
  probability of the same face (number) of the $k$-sided dice appearing exactly two times in the three roles?
  \item If it were a 6-sided dice what is the probability of the
  same face appearing exactly two times?
  \item What is the probability of the
  same face appearing three times?
  \item What is the probability of the no face ever appearing twice?
  \item What is the sum of the above three probabilities?
  \end{enumerate}
  \item  Given 100 boxes some of which have paint spots as listed
below how many boxes have not paint spots?
  \begin{enumerate}
  \item 40 with some red paint
  \item 60 with some blue paint
  \item 10 with some black paint
  \item 30 with some red and some blue
  \item 5 with some red and some black
  \item 5 with some blue and some black
  \item 2 with some of all three colors
  \end{enumerate}
\end{enumerate}

\underline{Think about the following question (Optional)}

\begin{enumerate}
  \item  Let $n$ be a positive integer. How many ways can one assign positive integers to
$i_1,i_2,\ldots,i_k$ such that $\sum\limits_{j=1}^ki_j=n.$
\end{enumerate}
%========================================================================
\end{document}
