假设投掷n次才第一次出现连续三次正面。问n的期望值是多少?
这题以前争论过很长时间,答案是14。(Oops!说漏了)现在问更一般的问题:
难度:+++
任给一个正反面的序列,问第一次出现这个序列时投掷次数的期望值是多少?
I think what matters is the length of the sequence, not the specific string of heads or tails. We can just assume the sequence in question is 1,1,...,1, with n 1's. At any time, we can count the number K of consecutive 1's, going back from the lastest toss. For example, after 5 tosses, the sequcence of head/tails is 1 -1 1 1 1, then K=3. Specifically, if the lastest toss is a -1, then K = 0. Let A_K be the expected number of more tosses needed to end the game. We have the following system of equations: A_0 = 1/2(A_0+A_1)+1 A_1= 1/2(A_0+A_2) +1 .... A_{n-2} = 1/2(A_0+A_{n-1})+1, A_{n-1} = 1/2(A_0+A_n) +1 A_n=0 n+1 unkowns, n+1 equations, and the final answer is 1/2(A_0+A_1)+1 本贴由[QL]最后编辑于:2006-3-8 22:45:14 |
为什么是14? |
"I think what matters is the length of the sequence, not the specific string of heads or tails. We can just assume the sequence in question is 1,1,...,1, with n 1's." Oops, wrong. So the previous solution is only for 1,1,...,1 case. For general case, the transition between states can be more complicated. 本贴由[QL]最后编辑于:2006-3-9 8:27:52 |
sean gave 14 using Markov method. Anyway it can be solved through simple reasoning similar to that of QL. |
欢迎光临 珍珠湾ART (http://66.160.158.134/) | Powered by Discuz! X3 |