Back

Question: 2018 Fall Final - 22

Author: Michiel Smid
Zoltan's Noodle House is a popular restaurant in downtown Ottawa. When you order the surprise dish, you get Mi Quang with probability 1/4, Bun Cha Ca with probability 1/3, and Banh Xeo with probability 5/12.
Tri enjoys going to this restaurant, because the food reminds him of his mommy's food back home in Da Nang.
Tri runs the following recursive algorithm:
$\mathbf{Algorithm}\ \TriIsHungry\mathrm{:}$
$//$ $\text{the results of all}$ $\text{orders are independent}$
$\text{Tri orders the surprise dish;}$
$\mathbf{if}\ \mathrm{Tri}\ \mathrm{gets}\ \mathit{Mi}\ \mathit{Quang}$
$\mathbf{then}\ \text{Tri eats the dish;}$
$\qquad\ \ \TriIsHungry$
$\mathbf{else}\ \mathbf{if}\ \mathrm{Tri}\ \mathrm{gets}\ \mathit{Bun}\ \mathit{Cha}\ \mathit{Ca}$
$\qquad\, \mathbf{then}\ \text{Tri eats the dish;}$
$\qquad \qquad\ \ \, \TriIsHungry$
$\qquad\, \mathbf{else}\ \text{Tri eats the dish;}$
$\hspace{4.05em}$ $\text{Tri pays the bill}$ $\text{and goes home}$
$\qquad\, \mathbf{endif}$
$\mathbf{endif}$
Define the random variable $X$ to be the number of dishes that Tri eats when running algorithm $\TriIsHungry$.
What is the expected value $\mathbb{E}(X)$ of the random variable $X$?
(a)
5/12
(b)
12/5
(c)
7/5
(d)
5/7