1
$\begingroup$

I need to write a recurrence relation to represent this. I'm not sure how to break it down into subproblems, because, on our list of heads and tails of length $k$, it's not complete at $k-1$...

  • 0
    So you experiment is :"flip 200 coins, count how many heads". Is it that?2017-02-16
  • 0
    @Maczinga I think it is like this: when you flip 200 coins what is the probability that you get 100 heads and 100 tails but you never got equally many heads and tails before the 200th flip (excluding when you have no flips of course)2017-02-16
  • 2
    Relate this to the question you asked previously and [Catalan Numbers](https://en.wikipedia.org/wiki/Catalan_number). This can be described as the number of NE lattice paths which do not touch the diagonal any time except the beginning and the end. The first move will either be an N or an E. The final move will be what wasn't picked for the first move. The inbetween moves will be related to catalan numbers. Can you see how? Note that those paths which start with an E will never pass the subdiagonal except for the first and last move.2017-02-16
  • 0
    I subscribe @JMoravitz2017-02-16
  • 0
    Catalan question was http://math.stackexchange.com/questions/2147793/recurrence-relation-flip-a-coin-2n-times-with-n-heads-and-n-tails-where-at-all2017-02-16
  • 0
    So thinking about this graphically, the first move must be E, to not go over the line. From there on, it's a Catalan problem with a different diagonal, namely $y=x-1$, and it must spike up above the line to reach the point $(2n,2n)$ at the end. Is my handling right? Now if only I was adroit at combinatorics enough to put this in a recurrence relation. Any more tips? @JMoravitz2017-02-17

1 Answers 1

5

I don't see how to write a recurrence, but we can find the answer in closed form. If you start with a head you need to end with a tail. In between you need a lattice path on $n-1 \times n-1$ grid that stays below the diagonal where a heads moves you right and tails moves you up. That gives the Catalan number $C_{n-1}=\frac 1n{2n-2 \choose n-1}$ We have the same number of choices if we start with tails and stay above the diagonal, so the total is $2C_{n-1}=\frac 2n{2n-2 \choose n-1}$enter image description here

  • 0
    The recurrence can be found from $B_n=2C_{n-1}$ and by considering the first return to equality $C_n=\sum_i (\frac12 B_i)C_{n-i}$2017-02-16
  • 0
    Hi! I've added a picture that hopefully makes the grid idea clear. It's not perfect because it should not include touching the x-axis as a possibility. So instead fix the first flip as heads and the last as tails, then consider the same diagram but only until 18 flips. So the answer to the problem with $20$ flips would be $2 \cdot 4862$. Multiplying by two because we counted the sequences in which there are always more heads than tails (until the last flip), but did not count the sequences in which there are always more tails than heads.2017-02-16