# Ian Segment 1

## To Calculate-2  ## To Think About-2

As in the case of " ", we can first represent as a binary number (maybe infinite number of digits), and then,

For k-th coin flip, encoding "Head" as 1, "Tail" as 0,

if we get a number with > k-th digit of , then we answer "no".

If < k-th digit of , then we answer "yes".

If they are equal, we continue the experiment, until one of the above case happens.

In expectation, we need only 2 times of flips, since every trial we have only chance to get into the "re-try" case. The number of trials we need follows a geometrical distribution with 0.5 success probability, which has E[#trails]=2.

## To Think About-3

We can model the system of "fishes" as a Markov Chain where the state is represented as (#minnows,#trout), which has a absorbing state (3,0) that cannot transit to any other states anymore.

We can construct a transition matrix A using the probability defined in the problem, and initial probability distribution x0 that has state (3,2) with probability 1.

The distribution of states after N trials can be represented as , the probability N-th fish is a trout can be represented as , where x[i,j] means the probability entry in x of the state (i,j).