BOOGER
is called awesome, if the string does not contain the substring OO. Thus, GEOROB is awesome, whereas GREOOB is not awesome. What is the number of awesome strings?$X = \bigg\{$ | $1\ $ | if the red coin flip resulted in heads$,$ |
$0\ $ | if the red coin flip resulted in tails$,$ | |
$Y = \bigg\{$ | $1\ $ | if the blue coin flip resulted in heads$,$ |
$0\ $ | if the blue coin flip resulted in tails$,$ |
$\Pr(X = 0)$ | $= \Pr(X = 1) = \Pr(Y = 0)$ $= \Pr(Y = 1) = 1/2.$ |
$\WhoGoesFirst(k):$
$\quad \mathbf{if}\ k \geq 1\ \mathbf{then}$
$\quad \quad \text{Alexa rolls the die, let a be the result}$
$\quad \quad \text{Shelly rolls the die, let s be the result}$
$\quad \quad \mathbf{if}\ a > s\ \mathbf{then}$
$\quad \quad \quad \text{print Alexa goes first}$
$\quad \quad \quad \mathbf{return}\ k$
$\quad \quad \mathbf{endif}$
$\quad \quad \mathbf{if}\ a < s\ \mathbf{then}$
$\quad \quad \quad \text{print Shelly goes first}$
$\quad \quad \quad \mathbf{return}\ k$
$\quad \quad \mathbf{endif}$
$\quad \quad \mathbf{if}\ a = s\ \mathbf{then}$
$\quad \quad \quad \WhoGoesFirst(k + 1)$
$\quad \quad \mathbf{endif}$