% This is a LaTex file.
% Homework for the course "Discrete Modeling",
% Autumn quarter, 1997, Anne Greenbaum.
% A latex format for making homework assignments.
\documentstyle[12pt]{article}
% The page format, somewhat wider and taller page than in art12.sty.
\topmargin -0.1in \headsep 0in \textheight 8.9in \footskip 0.6in
\oddsidemargin 0in \evensidemargin 0in \textwidth 6.5in
\begin{document}
% Definitions of commonly used symbols.
% The title and header.
\noindent
{\scriptsize Discrete Modeling, Winter 1998} \hfill
\begin{center}
\large
Assignment 3.
\normalsize
\end{center}
\noindent
Given Mon., Jan. 26, due Fri., Jan. 30.
\vspace{.3in}
% The questions!
\noindent
{\bf Objectives:} To practice using Markov chains in a fun application.
\begin{description}
\item[(1)]
Consider a very simplified game of baseball. There is only
one base (in addition to home plate), a team gets only two outs, and
the team wins if it
scores two runs. The team has two hitters, A and B, and over the
years their statistics show the following likelihood of their
hitting a homerun, making a base hit, or making an out:
\begin{tabular}{lccc}
Player & homerun & base hit & out \\ \hline
A & .1 & .3 & .6 \\
B & .2 & .1 & .7
\end{tabular}
There are $11$ possible states for the system, if we list
runs, outs, and number of players on base:
\begin{tabular}{rc}
states & (runs,outs,onbase) \\ \hline
1 & (0,0,0) \\
2 & (0,0,1) \\
3 & (0,1,0) \\
4 & (0,1,1) \\
5 & (0,2,*) \\
6 & (1,0,0) \\
7 & (1,0,1) \\
8 & (1,1,0) \\
9 & (1,1,1) \\
10 & (1,2,*) \\
11 & (2,*,*)
\end{tabular}
\noindent
If the team scores 2 outs before it scores 2 runs, then it loses,
while if it scores 2 runs, it wins. Thus states 5, 10, and 11
are absorbing states --- once the game is in one of these states
it stays in that state. The game starts in state 1. If player A
hits first, for example, then the probability of going from state 1
(no runs, no outs, no one on base) to state 2 (no runs, no outs, 1 on base)
is $.3$, while the probability of going from state 1 to state 3 (no
runs, 1 out, no one on base) is $.6$, and the probability of going
from state 1 to state 6 is $.1$. The probability of going from state 1
to any other state is $0$.
\begin{description}
\item{(a)}
Write down the transition matrix for each player.
\item{(b)}
What is the probability of winning if player A bats first and then B
(followed by A again, then B again, etc., until the game ends). What
is the probability of winning if player B bats first and then A?
You will need to use MATLAB or another programming language to do
the necessary computations. Turn in a listing of your code along
with your answers.
\end{description}
\end{description}
\end{document}