\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{7, Wed}

%S02 cp6W

\begin{problem}
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}

\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?
\end{problemparts}

\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{problem}

\begin{problem}
Using the method described in lecture, a truck can travel across any size
desert if there is a large enough supply of gas at the border of the
desert.  Show that if there is a large enough supply of gas at the border,
a truck can also make a \emph{round trip} across any size desert.

\solution{
Let $R_n$ be the distance a truck can travel into the desert \emph{and
return} on $n$ tanks of gas.  Clearly, $R_1 = 1/2$.

On $n+1$ tanks, the truck will travel distance $x$ and back $n$ times,
leaving $1-2x$ tanks of gas at distance $x$ into the desert on each trip.
It then makes one more one-way trip to $x$.  This leaves it with $n(1-2x)
+ 1-x$ tank of gas at position $x$.  Leaving an $x$th of a tank so it can
get back, if the remaining $(n(1-2x) + 1-x) -x = (n+1)(1-2x)$ tanks equal
$n$, it can execute the $n$-tank round trip strategy from position $x$ and
still return to the desert border.  So
\begin{eqnarray}
(n+1)(1-2x) & = & n\\
x & = & 1/2(n+1)\\
R_{n+1} & = & R_n + x = R_n + 1/2(n+1).
\end{eqnarray}
So
\[
R_n = 1/2 (1 + 1/2 + 1/3 + \cdots + 1/n) = H_{n}/2.
\]
}
\end{problem}

\iffalse
\begin{problem}
Regrouping or reordering the terms of an infinite series is ok for
\emph{absolutely convergent} series, namely, series for which the sum of
the absolute values of their terms converges.

In other cases, rearranging terms is not ok.
An extreme example is
\[
S \eqdef \sum_{i=0}^{\infty} (-1)^i = 1 + (-1) + 1 + (-1) + \cdots
\]
because by regrouping the terms we can deduce:
\begin{eqnarray*}
S & = & [ 1 + (-1) ] + [ 1 + (-1) ] + \cdots = 0 + 0 + \cdots = 0,\\
S & = & 1 + [(-1) + 1] + [(-1) + 1] + \cdots = 1 + 0 + 0 + \cdots = 1.
\end{eqnarray*}

To see the problem here, let $S_n \eqdef \sum_{i=0}^{n}(-1)^i$.  Then $S_n
= 1$ for odd $n$ and $S_n = 0$ for even $n$.  Hence $S_n$ does not have a
well-defined limit as $n$ tends to infinity, implying that $S$ is not a
convergent series.

Even for convergent, but not absolutely convergent, series, rearranging
terms can cause big changes.  For example, the series
\[
1 - 1/2 + 1/3 - 1/4 \dots
\]
converges, but is not absolutely convergent.

Explain how to reorder terms in $1 - 1/2 + 1/3 - 1/4 \dots$, so that the
resulting series converges to 3.  \dots so it converges to 4.  \dots so it
doesn't converge.

\solution{
Note that the sum of the negative terms goes to negative infinity, because
the sum
\[
-1/2 - 1/4 - 1/6 -  \dots - 1/2n = -H_n/2 \sim (-\ln n)/ 2
\]
and $\ln n$ goes to infinity with $n$.  Similarly, the sum of the positive
terms goes to positive infinity.

To reorder the terms to converge to 3, begin by taking the positive terms
in decreasing order until their sum first exceeds 3.  Next, take the
negative terms in order of decreasing magnitude until the sum of all the
terms taken---positive and negative---first goes below 3.  Now take the
remaining positive terms in decreasing order until the sum again exceeds 3,
then the negative terms till the sum goes below 3, and so on.  It is always
possible to move the sum above or below 3 by taking enough of the remaining
positive or negative terms, because the remaining positive terms sum to
positive infinity and the remaining negative terms sum to negative
infinity.  Also, the running sum of the positive and negative terms taken
in this way goes above and below 3 at most by the magnitude of the last
term taken.  Since the magnitude of the terms goes to zero, this implies
that the sum goes above and below 3 by an amount that decreases to zero.
But this is exactly what it means to say the sum converges to 3.

Replacing ``3'' by ``4'' above yields an ordering in which the sum
converges to 4.

Finally, alternately taking enough positive terms to increase the sum by 1
and then taking one negative term, yields an ordering in which the sum
diverges to positive infinity.

This argument applies to \emph{any} convergent series that is not
absolutely convergent to show that it can be reordered to converge to
\emph{any} desired number, or to diverge.  The moral: when reordering terms
in a series, be sure to check for absolute convergence.

}
\end{problem}
\fi


\end{document}
