1 problem found
I have a sliced loaf which initially contains \(n\) slices of bread. Each time I finish setting a STEP question, I make myself a snack: either toast, using one slice of bread; or a sandwich, using two slices of bread. I make toast with probability \(p\) and I make a sandwich with probability \(q\), where \(p+q=1\), unless there is only one slice left in which case I must, of course, make toast. Let \(s_r\) (\(1 \le r \le n\)) be the probability that the \(r\)th slice of bread is the second of two slices used to make a sandwich and let \(t_r\) (\(1 \le r \le n\)) be the probability that the \(r\)th slice of bread is used to make toast. What is the value of \(s_1\)? Explain why the following equations hold: \begin{align*} \phantom{\hspace{2cm} (2\le r \le n-1)} t_r &= (s_{r-1}+ t_{r-1})\,p \hspace{2cm} (2\le r \le n-1)\,; \\ \phantom{\hspace{1.53cm} (2\le r \le n) } s_r &= 1- (s_{r-1} + t_{r-1}) \hspace{1.53cm} ( 2\le r \le n )\,. \end{align*} Hence, or otherwise, show that \(s_{r} = q(1-s_{r-1})\) for \(2\le r\le n-1\). Show further that \[ \phantom{\hspace{2.7cm} (1\le r\le n)\,,} s_r = \frac{q+(-q)^r}{1+q} \hspace{2.7cm} (1\le r\le n-1)\,, \, \hspace{0.14cm} \] and find the corresponding expression for \(t_r\). Find also expressions for \(s_n\) and \(t_n\) in terms of \(q\).
Solution: The \(1\)st slice of bread can only be the first slice in a sandwich or a slice of toast. Therefore \(s_1 = 0\) \begin{align*} && t_r &= \underbrace{s_{r-1}}_{r-1\text{th is the end of a sandwich}} \cdot \underbrace{p}_{\text{and we make toast}} + \underbrace{t_{r-1}}_{r-1\text{th is toast}} \cdot \underbrace{p}_{\text{and we make toast}} \\ &&&= (s_{r-1}+t_{r-1})p \\ \\ && s_r &= 1-\mathbb{P}(\text{previous slice is not the first of a sandwich}) \\ &&&= 1-(s_{r-1} + t_{r-1}) \\ \\ \Rightarrow && s_r &= 1 - \frac{t_r}{p} \\ \Rightarrow && t_r &= p - ps_r \\ \Rightarrow && s_r &= 1 - s_{r-1} - (p-ps_{r-1}) \\ &&&= 1 -p -(1-p)s_{r-1} \\ &&&= q(1-s_{r-1}) \end{align*} Therefore since \(s_r + qs_{r-1} = q\) we should look for a solution of the form \(s_r = A(-q)^r + B\). The particular solution will have \((1+q)B = q \Rightarrow B = \frac{q}{1+q}\), the initial condition will have \(s_1 = \frac{q}{1+q} +A(-q) = 0 \Rightarrow q = \frac{1}{1+q}\), so we must have \begin{align*} && s_r &= \frac{q+(-q)^r}{1+q}\\ \Rightarrow && t_r &= p(1-s_r) \\ &&&= p \frac{1+q-q-(-q)^r}{1+q} \\ &&&= \frac{(1-q)(1-(-q)^r)}{1+q} \\ && s_n &= 1-\frac{q+(-q)^{n-1}}{1+q} - \frac{p(1-(-q)^{n-1})}{1+q} \\ &&&= 1-\frac{1+(1-p)(-q)^{n-1}}{1+q}\\ &&&= 1-\frac{1-(-q)^n}{1+q}\\ &&&= \frac{q+(-q)^n}{1+q}\\ && t_n &=1-s_n \\ &&&=\frac{1-(-q)^n}{1+q} \end{align*}