\documentclass[11pt,twoside]{article}    
\usepackage{latex-macros/course}% !! use the macros 

\renewcommand{\coursecopyrightnames}
{\href{http://theory.lcs.mit.edu/~meyer}{Prof.~Albert~R.~Meyer}}

\begin{document} 
\inclassproblems{10, Mon.}


\begin{problem}
We begin with two large glasses.  The first glass contains a pint of
water, and the second contains a pint of wine.  We pour 1/3 of a pint
from the first glass into the second, stir up the wine/water mixture in
the second glass, and then pour 1/3 of a pint of the mix back into the
first glass and repeat this pouring back-and-forth process a total of
$n$ times.
\begin{problemparts}
\problempart
Describe a closed form formula for the amount of wine in the first glass
after $n$ back-and-forth pourings.

\solution{The state of the system of glasses/wine/water at the beginning
of a round of pouring and pouring back is determined by the total amount
of wine in the first glass.  Suppose at the beginning of some round, the
first glass contains $w$ pints of wine, $0\leq w \leq 1$ and $1-w$ pints
of water.  The second glass contains the rest of the wine and water.

Pouring 1/3 pint from first glass to second leaves 2/3 pints of liquid and
$(2/3)w$ wine in the first glass, and 4/3 pints of liquid and 
$1 - (2/3)w$ wine 
in the second glass.  Pouring 1/3 pint back from second into first
transfers a proportion of (1/3)/(4/3) of the wine in the second glass into
the first.  So the round completes with both glasses containing a pint of
liquid, and the first glass containing
\[
(2/3)w + (1/4)(1- (2/3)w) = 1/4 + w/2
\]
pints of wine.  After one more round, the first glass contains
\[1/4 + (1/4 + w/2)/2 = 1/4 + 1/8 + w/2^2\]
pints of wine, and after $n$ more rounds
\[
\begin{array}{lll}
w/2^n + \Sigma_{i=1}^n (1/2)^{i+1} &=  w/2^n + (1/2)\Sigma_{i=1}^n
(1/2)^{i}\\
& = w/2^n + (1/2)(-1 + \Sigma_{i=0}^n (1/2)^{i})\\
& = w/2^n + (1/2)(-1 + (1 - (1/2)^{n+1})/(1 - 1/2))\\
& = w/2^n - 1/2 + 1 - (1/2)^{n+1}\\
& = w/2^n + 1/2 - (1/2)^{n+1}.
\end{array}
\]
Since $w=0$ initially, the pints of wine in the first glass
after $n$ rounds is
\[
1/2 - (1/2)^{n+1}.
\]
}

\problempart What is the limit of the amount of wine in each glass as $n$
approaches infinity?

\solution{
The limiting amount of wine in the first glass approaches 1/2 from below
as $n$ approaches infinity.  In fact, it approaches 1/2 no matter how the
wine was initially distributed.  This of course is what you would expect:
after a thorough mixing the glasses should contain essentially the same
amount of wine.
}

\end{problemparts}

\end{problem}


\begin{problem}  %F02 cp7w

Suppose you were about to enter college today and a college loan
officer offered you the following deal: \$25,000 at the start of each
year for four years to pay for your college tuition and an option of
choosing one of the following repayment plans:
\begin{description}
\item[Plan A:] 
Wait four years, then repay \$20,000 at the start of
each year for the next ten years.
\item[Plan B:] 
Wait five years, then repay \$30,000 at the start of
each year for the next five years.
\end{description}
Suppose the annual interest rate paid by banks is 7\% and does not change
in the future.
\begin{problemparts}

\problempart
Assuming that it's no hardship for you to meet the terms of either payback
plan, which one is a better deal?  (You will need a calculator.)

\solution{  
\$1 today will be worth $\$1.07$ next year, and $\$1.07^2$ the
year after, \etc
So set $r = \frac{1}{1.07}$.  Then:
\begin{eqnarray*}
\lefteqn{\text{current value of Plan A}}\\
  & = & \sum_{y=4}^{13} 20000 \cdot r^{y}  \\
  & = & \sum_{y=0}^{9} 20000 \cdot r^{y+4}  \\
  & = & r^4 \cdot \sum_{y=0}^{9} 20000 \cdot r^y  \\
  & = & 20000r^4 \cdot \sum_{y=0}^{9} r^y \\
  & = & 20000r^4 \cdot \frac{1 - r^{10}}{1 - r} \\
  & = & \$114,66.69
\end{eqnarray*}
\begin{eqnarray*}
\lefteqn{\text{current value of Plan B}}\\
  & = & \sum_{y=5}^{9} 30000 \cdot r^{y}  \\
  & = & \sum_{y=0}^{4} 30000 \cdot r^{y+5}  \\
  & = & r^5 \cdot \sum_{y=0}^{4} 30000 \cdot r^y  \\
  & = & 30000r^5 \cdot \sum_{y=0}^{4} r^y \\
  & = & 30000r^5 \cdot \frac{1 - r^{5}}{1 - r} \\
  & = & \$93,840.63
\end{eqnarray*}
You should clearly take Plan B. You will be paying back much less in
today's dollars.
}

\problempart
What is the loan officer's effective profit (in today's
dollars) on the loan?

\solution{
The value of the money you are given is:
\begin{eqnarray*}
Loan & = & \sum_{y=0}^{3} 25000 \cdot r^{y}  \\
  & = & 25000 \cdot \sum_{y=0}^{3} r^y \\
  & = & 25000 \cdot \frac{1 - r^{4}}{1 - r} \\
  & = & \$90,607.90
\end{eqnarray*}

Therefore, the loan officer's profit is effectively $\$3,233$. (Or 
$\$24,059$ if we are not on the ball).
}
\end{problemparts}
\end{problem}


\instatements{\newpage}

\begin{problem}
Riemann's Zeta Function $\zeta(k)$ is defined to be the infinite
summation:
\[
1+\frac1{2^k}+\frac1{3^k} \cdots = \sum_{j \ge 1} \frac1{j^k}
\]

Below is a proof that 
\[
\sum_{k \ge 2} (\zeta(k)-1) = 1
\]
Justify each line of the proof.  (P.S.  The purpose of this exercise is to
highlight some of the rules for manipulating series.  Don't worry about the
significance of this identity.)

\begin{eqnarray}
\sum_{k \ge 2} (\zeta(k)-1) %
& = & \sum_{k \ge 2} \left[ \left( \sum_{j \ge 1} \frac{1}{j^k} \right) - 1 \right] \label{eq:1} \\
& = & \sum_{k \ge 2} \sum_{j \ge 2} \frac{1}{j^k} \label{eq:2} \\
& = & \sum_{j \ge 2} \sum_{k \ge 2} \frac{1}{j^k} \label{eq:3} \\
& = & \sum_{j \ge 2} \frac{1}{j^2} \sum_{k \geq 0} \frac{1}{j^k} \label{eq:4} \\
& = & \sum_{j \ge 2} \frac{1}{j^2} \cdot \frac{1}{1 - 1/j} \label{eq:5} \\
& = & \sum_{j \ge 2} \frac{1}{j (j - 1)} \label{eq:6} \\
& = & \lim_{n \rightarrow \infty} \sum_{j = 2}^{n} \frac{1}{j (j - 1)} \label{eq:7} \\
& = & \lim_{n \rightarrow \infty} \sum_{j = 2}^{n} \frac{1}{j-1} -\frac{1}{j} \label{eq:8} \\
& = & \lim_{n \rightarrow \infty} (1 - \frac{1}{n}) \label{eq:9} \\
& = & 1 \label{eq:10} 
\end{eqnarray}

\solution{
\eqref{eq:1}~Definition of $\zeta(k)$.

\eqref{eq:2}~Because ${\displaystyle \sum_{j \ge 1} \cfrac{1}{j^k} = 1 +
\sum_{j \ge 2} \cfrac{1}{j^k}}$.

\eqref{eq:3}~Reordering; this is ok because at this point all terms are
positive.

\eqref{eq:4}~Because 
$\displaystyle
\sum_{k \ge 2} \cfrac{1}{j^k} = 
\sum_{k \ge 0} \cfrac{1}{j^{k+2}} = 
\sum_{k \ge 0} \cfrac{1}{j^k\cdot j^2} =
\cfrac{1}{j^2} \sum_{k \ge 0} \cfrac{1}{j^k}.
$

\eqref{eq:5}~Sum of a geometric series.

\eqref{eq:6}~Algebra inside every summand.

\eqref{eq:7}~Definition of infinite summation.

\eqref{eq:8}~Algebra inside every summand.

\eqref{eq:9}~The sum telescopes: 1 is added once; every one of
$\cfrac{1}{2}, \cfrac{1}{3}, \dots, \cfrac{1}{n-1}$ is subtracted once and
then added once; $\cfrac{1}{n}$ is subtracted once.

\eqref{eq:10}~Simple limits.
}
\end{problem}

\end{document}


\iffalse

\begin{problem}  %F03 final

A couple wants to borrow $d$ dollars so that they can purchase a 
new condo.  At the end of each year for the next $n$ years, one of them
will drop by the bank to make a payment on the loan.  The banker will
immediately invest this returned money at an $r$\% annual rate of
return.  The banker wants to wind up with at least as much money as a result
of the couple's payments as he would if he had invested the whole $d$
dollars at $r$\% for $n$ years starting today.

Write a closed form formula in $d,n$ and $r$ for the least annual payment
the banker might ask from the couple.

\solution{Let $R \eqdef (1+r/100)$, so that after 1 year, a
one dollar investment is worth $R$ dollars.  The banker will require that
\begin{equation*}
p \geq \frac{dR^{n}(R-1)}{R^n - 1}.
\end{equation*}
We derive this bound as follows:

Suppose that the couple pays $p$ dollars at the end of each year.  The
banker can invest the first payment for $n-1$ years, the second payment
for $n-2$ years, etc., so that after $n$ years his total cash is:

\begin{eqnarray*}
\sum_{i=1}^{n} p \cdot R^{i-1}
& = & \sum_{i=0}^{n-1} p \cdot R^i\\
& = & p \frac{R^n - 1}{R - 1}.
\end{eqnarray*}

On the other hand, if the banker could invested the $d$ dollars today, then
after $n$ years his total cash is $d R^{n}$.  The first amount must
be at least as large as this, so

\begin{eqnarray*}
p \frac{R^n - 1}{R - 1} & \geq & dR^{n}\\
p &\geq& \frac{dR^{n}(R-1)}{R^n - 1}.
\end{eqnarray*}
}

\end{problem}
\fi
