39
Dr.House
·2009-10-08 06:01:09
this again is recrusion :P
39
Dr.House
·2009-10-08 06:05:28
edit post:
Let the number of sequences of n tosses of a coin with no consecutive heads f(n)
If there are no consecutive heads in a sequence of tosses, then it must either start with a T or an HT.
If it starts with a T then the remaining n-1 tosses can be any sequence with no consecutive heads.
The number of such sequences is f(n-1).
if the sequence starts with an HT then the remaining n-2 tosses can be anything with no consecutive heads
the number of such sequences is f(n-2)
so otal number of required sequences
f(n)=f(n-1)+f(n-2)
we also have f(1)=2 and f(2)=3 . it is a familiar fibonacci sequence
62
Lokesh Verma
·2009-10-08 06:11:50
Not clear... If we threw a tail?
We need to throw two tails... (To me it is not clear... I mean you may have the idea in ur mind.. but the solution does not reflect it)
39
Dr.House
·2009-10-08 06:21:04
edited it now sir.... thanks
62
Lokesh Verma
·2009-10-08 06:38:03
again hadbadi me gadbadii...
bhargav you have to find probability :P
19
Debotosh..
·2009-10-08 09:05:39
what we require here is the probability of "non appearance" of heads in 2 or more consecutive tosses !
we consider, p= prob of head ; 1-p = prob of tails in one trial
let pn = probability that no 2 or more consecutive heads appear in (n) trials !
from inspection of the elementary events, we deduce that
p1 = 1
p2 = 2p(1-p) +(1-p)2...........( situation: HT TH TT)
=1-p2
so pn= (----pn-2-----)T H
OR pn= (------pn-1---) T
thus the valid sequence for pn =(1-p) pn-1 + p(1-p)pn-2
62
Lokesh Verma
·2009-10-08 09:08:48
debotosh.. to me it seems that you have made a flawed arguement in your recursion...
can it not be that there was no pair of head uptil n-1 tosses but the last one leads to a pair?
39
Dr.House
·2009-10-08 17:41:41
oh!! yes.... anwyays some one carry it forward , i have done some part of the solution..
24
eureka123
·2009-10-20 07:47:15
i dont think debo is wrong..becoz i too am getting same thing..
let probablity of no consecutve heads =Pn
if first throw is heads,
then next throw must be tails..so probablity for thes first 2 throws=1/2 . 1/2 =1/4
and for next consecutive throws,probablity for no heads wil be Pn-2
if first throw tails,
now prob for first move =1/2
then for all the further consecutive throws,probablity for no heads wil be Pn-1
so total probablity=Pn=Pn-12+Pn-24
62
Lokesh Verma
·2009-10-20 09:16:22
Eureka.. Your method is correct..
I could not understand the logiic given by Debotosh....
I think he made some error in the logic..
19
Debotosh..
·2009-12-01 07:53:24
what i meant was that you can get a tail in the last place and thus satisfy pn-1
...if you get a heads in the second last place, then the sequence is lost , so we leave out this case
...if you get a tail in the second last place , then you can satisfy pn-2 !!!
...................what else ? i don't find the flaw !