Download Problem 1. Given a coin with probability p of landing on heads after

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Problem 1.
Given a coin with probability p of landing on heads after a flip, what is the probability that the number of heads will ever equal the number of tails assuming an infinite
number of flips?
Soln.
Part 1) Notice that the number of heads cannot equal the number of tails after an
odd number of flips. In this part, we wish to find the probability P (2n) of the number
of heads equaling the number of tails, for theP
first time, after 2n flips. This will allow
us to find the total probability by summing ∞
n=1 P (2n).
Label a vertical axis as T for tails and a horizontal one as H for heads. Then, start
at the origin recording each flip by a unit horizontal or vertical segment, in the corresponding direction. Call a path successful if T = H for the first time at (n, n). Dyck
paths, which are staircase walks from (0, 0) to (n, n) that don’t cross the line T = H,
are almost exactly the paths we want. The only difference between a Dyck path and
a successful path is that Dyck paths can touch the line T = H, but a successful path
can’t. To remedy this situation, assume the first flip is heads, which means the 2n
flip is tails if we are to intersect (n, n) without crossing T = H. Now, if the path is to
be successful, it must start at (1, 0), never cross the line T = H − 1, and eventually
reach (n, n − 1). These are Dyck paths of length 2(n − 1) translated to the right once.
Therefore, there are Cn−1 of them. Likewise, Cn−1 successful paths start with tails.
Each path has likelihood pn q n , so our sought probability is P (2n) = 2Cn−1 pn q n .
P
P∞
P
n n
n n
Part 2) From part 1, the answer is ∞
n=1 2Cn−1 p q = 2pq
n=0 Cn p q .
n=1 P (2n) =
Here we use the generating function for Catalan numbers:
√
X
1 − 1 − 4x
n
Cn x =
2x
n=0
where x = pq = p(1 − p),
p
p
1 − 1 − 4p(1 − p)
2x
= 1 − 1 − 4p(1 − p) = 1 − |2p − 1|
2x
If p ≤ 0.5, we get 2p and if p ≥ 0.5, we get 2q .
1
Problem 2.
Consider an infinite chessboard, with numbers in each square. Initially all of the
numbers are 0, except for a single 1 on a black square. Go through a series of steps:
at every step, replace each number with the sum of its four neighbors (all numbers
get replaced simultaneously).
(a) After n steps, what is the sum of all the numbers on the board? What number is
in the position of the original 1?
(b) Give as precise a description as you can of the arrangement of numbers on the
board after n steps. (Even if you know the answer, you may find it hard to state
clearly. Do your best: this is part of the challenge of the problem.)
Soln.
(a1) Shown above are the first two steps. Each number spawns into four adjacent
boxes, so the total quadruples with each step. Since we start with a total of 1, the
total after n steps is 4n .
(a2) Consider the paths of length n that start from the ”original 1” and use only right,
left, up, or down. There are 4 paths of length 1 that each end on squares containing
1’s after the first step. On the second step, these paths may overlap (take LD and
DL or U L and LU ) on a square containing a 2. Or, they could each bounce back to
the middle square, which has now rought 4.
As suggested, one can easily show inductively that on the nth step, the number
in a box coincides with the number of paths of length n from the middle square.
Therefore, the number in the middle square after n steps is the number of n-words
2
from the alphabet {R, L, D, U } with just as many R’s as L’s and D’s as U ’s (the
letters were chosen to indicate direction). Now, consider the expansion of
n
1
1
R+ +U +
R
U
Let 1 ≤ i ≤ n. Choosing R or U from the ith factor is the same as moving right or up
on the ith step. Similarly, choosing R1 or U1 on the ith factor is the same as moving
left or down on the ith step. Thus, to find the number of paths of length n that end
on the middle square, we must find the constant term. Notice
n
n
1
R+U
n
= R+U +
= (R + U ) 1 +
RU
RU
1 n
Each term in the expansion of 1 + RU
will have the same power in R as in U , but
n
(R + U )n will have no such terms unless n is even, in which case n/2
Rn U n is the
only one. In looking for the constant term when n is even, we multiply the central
terms together,
1
1
R+ +U +
R
U
n
2
n
n
n
1 1
n n
=
R U
n/2
n/2
n/2 Rn U n
If n is odd, the constant term is 0 .
(b) Actually, the method used in (a2) extends naturally to (b). Instead of finding the
constant, find the coefficient of Rx U y , where (x, y) are the coordinates of the sought
and b = n−x−y
. If a and b aren’t integers, the square (x, y) holds
box. Let a = n−y+x
2
2
a 0 . If they are integers, the square holds
n n
a
b
creating a multiplication table of the nth row in Pascal’s triangle.
3