We can form a Finite state automata or use markov chains to solve this. Answer = 3/10
I guess the answer is wrong. There is a very easy way to solve this question just by looking only. For any of the event A or B to occur, TH must occur. So the probability that A occurs before B is nothing but the probability that Head occurs before TH rather than Tails, which is 0.5Hence answer = 0.5
This comment has been removed by the author.
sorry i made a calculation mistake...this is the correct argumentThere should be a mistake in your argument. Because if you form the matrix of the markov chain with 5 states, there will be 2 absorbing states A and B. If we keep repeating our experiment our final state would be either A or B eventually. Now from each state x there will a probability of p_x of ending in state A and 1-p_x of ending in state B. You can easily find the probabilities of transition between states. You get sets of linear equation which give you the answer as 0.325In your argument you consider the probability of occurrence of T or H before TH without either TTH or HTH occuring before. I don't think you can consider these events to be dependent on just what occurs before TH. If there is a mistake in my argument please post it
Sorry , I stated the wrong answer aboveThe correct answer is 0.375.Soln-------Let P(C) be the prob of event C that HTH occurs before TTHThenP(C) = P(H)*P(C/H) + P(T)*P(C/T)Now,P(C/H) = P(H)*P(C/HH) + P(T)*P(C/HT)P(C/HH) = P(C/H)P(C/HT) = P(H)*1 + P(T)*P(C/HTT)P(C/HTT) = P(C/TT) = 0Now, putting P(H)= P(T) =0.5we get P(C) = 0.375