直到出现 HTHT 的期望抛掷次数
HTHT
题目详情
一枚公平的 coin is 到ssed until the sequence HTHT is obtained. 的期望次数是多少 到sses?
英文原题
A fair coin is tossed until the sequence HTHT is obtained. What is the expected number of tosses?
解析
设 为首次出现模式 HTHT 的抛掷次数。
用状态递推(按当前前缀匹配长度分状态)或用经典“博彩鞅 + 可选停止”方法,都可得到