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

%\backwardscompatibility        % !! use for backwards compatibility
%\showsolutions                 % !! use to force solutions & skip query
%\hidesolutions                 % !! use to force no solutions & skip query
\renewcommand{\coursecopyrightnames}{Prof.~Albert~R.~Meyer}

\def\bparts{\begin{problemparts}}
\def\eparts{\end{problemparts}}
\def\ppart{\problempart}

\begin{document}
\inclassproblems{6W}

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

\end{document}
