% LaTex2e
\documentclass[12pt]{article}
%\usepackage{amssymb,latexsym}

%  \oddsidemargin 5pt \evensidemargin 5pt \marginparwidth 68pt
%  \marginparsep 10pt \topmargin 10pt \headheight 10pt
%  \headsep 15pt \footskip 35pt
%  \textheight = 625pt  \textwidth 440pt \columnsep 10pt \columnseprule 5pt

\usepackage{anysize}
%\marginsize{left}{right}{top}{bottom}
%\marginsize{1.25cm}{1.25cm}{1.75cm}{2.5cm} % this cuts off page numbers
\marginsize{2cm}{2cm}{1cm}{3cm} 


\pagestyle{myheadings}
\def\la{\langle}  \def\ra{\rangle}
\def\header{{\hfill Final \hfill A. Miller \hfill Fall 2004
                                       \hfill Math 210\hfill}}
\markboth\header\header
\newcount\probno
\newcount\total
\newwrite\examTBLFile

\probno=0

\def\prob#1{\advance\probno by 1  \vfill \newpage % \par
    \noindent\the\probno . (#1 pts)\advance\total by #1
    \immediate\write\examTBLFile{\the\probno
       \string& #1 \string&
       \string\qquad \string\\ \string\hline}}

\def\finishtbl{
    \immediate\write\examTBLFile{Total \string& \the\total
    \string& \qquad \string\\ \string\hline}
     }

%%% \outer\def\answer{ {\par\bigskip Circle your answer.} \par\medbreak

\newwrite\ans
\immediate\openout\ans=answers
\outer\def\answer{\par\medbreak
  \immediate\write\ans{}
  \immediate\write\ans{\string\bigskip \the\probno . }
  \copytoblankline}
\outer\def\answerx{ \par\medbreak
  \immediate\write\ans{}
  \immediate\write\ans{\string\bigskip \the\probno . }
  \copytoblankline}
\outer\def\putanswer{\par\medbreak
  \immediate\write\ans{}
  \copytoblankline}
\def\copytoblankline{\begingroup\setupcopy\copyans}
\def\setupcopy{\def\do##1{\catcode`##1=12}\dospecials
     \catcode`\|=12\obeylines}
{\obeylines \gdef\copyans#1
  {\def\next{#1}%
  \ifx\next\empty\let\next=\endgroup%
  \else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}
\def\printanswers{\newpage\begin{center} Answers \end{center}
    \immediate\closeout\ans\input answers}

%\def\answer{\par\bigskip\bigskip\bigskip\noindent Answer: \par}


\begin{document}

\bigskip

Show all work.  

Simplify your answers.  

Circle your answer.

\bigskip

Cheat sheet OK, but no books, no calculator, no cell phones, no pagers, no
electronic devices. 


\par\vskip .25in
\begin{center}
Name\makebox[3in]{\hrulefill} \\
\end{center}

\bigskip
Circle your Discussion Section:
\begin{verbatim}
     DIS 343 12:05p T B329 VAN VLECK 
     DIS 344 12:05p R B321 VAN VLECK 
     DIS 345  1:20p T  595 VAN HISE  
     DIS 346  1:20p R 3401 STERLING  
\end{verbatim}
\bigskip

\begin{center} \Large
 \begin{tabular}{||c|c|c||} \hline\hline
  Problem & Points & Score \\  \hline\hline
   \input{exam.tbl}
  \hline \hline
 \end{tabular}
\end{center}

\immediate\openout\examTBLFile=exam.tbl

\bigskip
 
Solutions will be posted shortly after the exam:
www.math.wisc.edu/$\sim$miller/m210

\setcounter{page}{0}

\newpage 

\prob{12} Your sock drawer contains 2 blue socks, 4 green socks, and
6 red socks.  In the dark you reach into the drawer and randomly
choose two of the socks.  What is the probability that both socks
have the same color? 
\answer $1/3$

\prob{10}
Draw a Venn diagram for the set $(A\cap B)\cup C$.

\prob{10} % 4.1 - 15
A box contains 2 red and 3 green balls.  A ball is selected at random and
its color is noted.
If it is red it is replaced by a green ball.  If it is green, it is 
replaced by a red ball.  Then a second ball is randomly drawn from the
box.  A random variable $X$ is defined to be the total number of red balls
selected.  Find the { probability density function} of $X$ and
the { expected value} of $X$, $\mu=E(X)$.
\answer $E(X)=21/25$

\prob{10}
Bubba-Billy-Bob (BBB) buys a house in Wilmood Neighborhood in Austin, TX.  The
developer  Big-Bill-Wilmood (BBW) offers BBB a special deal on a 30 year
mortgage.  For the first 5 years of BBB's mortgage the monthly payments will be
interest only.  After 5 years  BBB will still owe exactly the same amount that
he originally borrowed.  His  monthly payment will then increase so as to 
amortize the loan over the remaining 25 years.  


\bigskip
(a) BBB buys his house for \$55,000.  He
is required to make a 20\% down payment.  How much does he borrow?  


\vspace{2in}
(b)  For the first five years the effective monthly interest rate 
that BBW offers is $1\%$.  
What is the amount of each monthly payment $p$ 
for the first 5 years?

\answer (a) $44000$ (b) $440$

\prob{10} % 5R - 30 -- did in class wed before thanksgiving
A system of equations is given by
\begin{eqnarray*}
3x + y - z  & = & 6 \\
2x - z & = & 2 \\
y + kz  & = & 3 \\
\end{eqnarray*}
where $k$ is a number.  For what values of $k$ (if any) does the system
have infinitely many solutions?

\answer $k=1/2$

\prob{10} % 6
Find the inverse of the matrix $A$ or determine that it does not
have an inverse.
$$A=\left[
\begin{array}{rrrr}
-1 &  1 &  0 &  0 \\
 0 & -1 &  0 &  0 \\
 0 &  1 & -1 &  1 \\
 0 &  0 &  0 & -1 \\
\end{array}\right]
\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
A^{-1}=\left[
\begin{array}{rrrr}
 \phantom{AA} &  \phantom{AA} &  \phantom{AA} &  \phantom{AA} \\
 \phantom{AA} &  \phantom{AA} &  \phantom{AA} &  \phantom{AA} \\
 \phantom{AA} &  \phantom{AA} &  \phantom{AA} &  \phantom{AA} \\
 \phantom{AA} &  \phantom{AA} &  \phantom{AA} &  \phantom{AA} \\
\end{array}\right]
$$

\answer $$A^{-1}=\left[
\begin{array}{rrrr}
-1 &  -1 &  0 &  0 \\
 0 & -1 &  0 &  0 \\
 0 &  -1 & -1 &  -1 \\
 0 &  0 &  0 & -1 \\
\end{array}\right]$$


\prob{10}
Set up but do {\bf not} solve the following linear optimization problem:

Bob wants to design a weekly exercise schedule in order to
lose weight by burning the optimal number of calories.
This will involve jogging, swimming, and walking 
a certain number of hours each week. These activities burn the following
number of calories per hour:

\bigskip
\begin{tabular}{|l|l|}
\hline
activity   & calories per hour \\
\hline
jogging    &  700\\
swimming   &  600\\
walking    &  300\\
\hline
\end{tabular}

\bigskip
Each weekday he walks to and from work for a total of 5 hours each week.
Bob counts this as part of his exercise time.  

He wishes to jog at most 3 hours a week.  

He wants the time spent swimming
to be less than or equal to the time spent on each of the other exercises.

He wants that his total exercise time each week to be at
most 15 hours.  

If Bob wishes to burn the maximum number of
calories each week how much time should he spend doing each exercise?

\bigskip
Set up this problem but do not solve it.  

\answer maximize $C=700j+600s+300w$ subject to:
\par $w\geq 5$
\par $s\geq 0$
\par $j\geq 0$
\par $j\leq 3$
\par $s\leq j$
\par $s\leq w$
\par and $j+s+w\leq 15$.
  
\prob{12}
Find the maximum of $z=2x-y$ subject to the constraints:
$$x\leq 3$$
$$y\geq 0$$
$$2y\leq x+3$$
$$y\leq 2x$$
\answer $6$


\finishtbl
\printanswers
\end{document}


