If you flip a fair coin times, what is the probability that the only consecutive tail flips are flips and ?
A misunderstanding of a recent daily problem had me trying to figure our a general formula for flips, but as I started to look for that pattern, a clear approach escaped me.
The sequence of flips would have to end in regardless of the sequence length.
So as far as I can tell, I need to figure out the number of ways to fill the remaining 's with 's and 's such that no 's are adjacent.
I ended up doing this by hand up to 7 flips, finding 8 sequences.
My attempt was to eliminate from all possible adjoining strings those with adjacent 's.
Start with 's in the adjoining sequence ( ever single sequence passes the filter ).
there are adjoining sequences
Trying to remove the grouped 's I imagine the following:
We can only fill the boxes with so we only have 4 possible strings with them grouped.
Thus there are , sequences that pass the filter.
However, my methods seems to get confusing pretty quickly as the length of the sequence grows and we add 's to the sequence.
With 's , I have to not only worry about groupings, but also the sub groupings of 's. Overlaps seem to be everywhere in my started method of counting...and its all rather messy.
While I might be able to keep going for a bit , this continuation seems certainly seems like a failure for generalizing. That most likely is a result of my own limitations, but I'm still interested!
Any help leading me to water on this will be appreciated!
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Perhaps approaching this problem from the opposite direction will be easier. Instead of counting how many adjoining strings won't work, we'll count how many do work. Here's how:
We have 4 options for how many Ts we can put in this adjoining string without creating any pairs: 0 Ts, 1 T, 2 Ts, and 3 Ts. Any more, and we won't be able to keep them separated (since we only have 5 spots to work with).
There's 1 way to use 0 Ts: HHHHH
There's 5 ways to use 1 T: THHHH, HTHHH, HHTHH, HHHTH, and HHHHT.
There's 6 ways to use 2 Ts: THTHH, THHTH, THHHT, HTHTH, HTHHT, and HHTHT.
(You can manual check this by placing one T in each spot and counting how many places you can put the other T in. Then, divide by 2, technically 2!, since the two Ts are not considered distinct, and we'll have counted duplicates)
And there's 1 way to use 3 Ts: THTHT.
So in total, we have 13 ways to fill in this adjoining string. Since we're interested in the probability of rolling one of these sequences, our final answer is 25613.
I must confess that I was off by 3 until I checked myself with some code. :) I'll post it in a reply to this comment.
Hope this made sense!
Log in to reply
Log in to reply
Thank you for all this David! I did end up verifying 13 as well with my method. I saw on here someone posted about the Fibonacci numbers, but the comment is now removed.. So far...that holds. Can you verify 9 flips with your program is 21? If it is the Fibonacci numbers then I guess a closed form generalization for n flips is out of the question... Its still seems pretty out there that this question leads to them, and that I stumbled upon it.
Log in to reply
9 flips results in 21 valid sequences. I tried 10 and 11 as well, and they yielded 34 and 55, so it does indeed seem that the Fibonacci numbers have once again popped up! :)
Yes, I can verifyLog in to reply
k−3 that have no TT subsequences. Say this is Sk−3. Then S1=2,S2=3, and now let's try to get a formula for Sn. Think about how we start out the sequences. There are two types: either they start with H, or they start with TH. There are Sn−1 of the former and Sn−2 of the latter. So Sn=Sn−1+Sn−2, and there you go. In particular, S5=13, which is what you got.
It's not too hard to see, actually. Taking out the HTT tail, you're looking for the number of sequences of lengthAnd there is a closed-form formula for the Fibonacci numbers, if you're willing to put up with 5 floating around in various places!
If you just want to verify the case of flipping a fair coin 8 times have TT at the last two flips, then it is rather easy.
As the last three flips must be HTT, it's probability =1/8.
For the first 5 flips, there are total 25=32 scenarios. Count how many of them fulfill the requirements, that is no TT occurs.
Clearly, it cannot have 4 or 5 tails in these 5 flips.
No. of case for having 3 T =THTHT=1
No. of case for having 2 T = (25) −4=6
No. of case for having 1 T = (15) =5
No. of case for having 0T=1
So, for the first 5 flips, the probability that no TT occurs =321+6+5+1=3213
And the required probability =3213×81=25613
here for general case, refer to Mark Hennings solution.
Log in to reply
Thank You! Mark is a bit to brilliant for my level of understanding. I'm in awe, but for me his solutions suffer because of the "it is obvious that" methodology (my limitations obviously - not his ). It looks like he used the closed form equation for the nth Fibonacci number in some "massaged" way ( Which I honestly forgot even existed ). Surely proving the sequence is Fibonacci is not trivial. Its one thing to say, this looks like the Fibonacci, and a different thing to say this IS the Fibonacci sequence.
I was going to try to calculate the expected value using the series ( as one you have shown in one of your methods ), but its a good thing I failed to find a formula so early on! I didn't even realize that is what Mark had done in his solution...
😜
Log in to reply
Mark is all round brilliant.
This problem I have done it several times before by renewal process method. This is my first time try to figure out the prob. density function. It is interesting to know that it is related to Fibonacci sequence.