Solution

ID: past-exam-of-the-martingales-and-financial-mathematics-course-of-the-university-of-oxford/2011/a/3/d/solution

Let be the first completion time of the word. A fresh gambler arrives before every throw with capital one, betting it all on the successive symbols . Each correct bet multiplies capital by six and each wrong bet loses it, so every bet is fair. A gambler who completes the word keeps the winnings.
At time , the gambler who bet on all four final throws has capital . The gambler who bet on the final two throws has correctly matched the suffix and has capital . There are no other survivors: the only nonempty suffixes of that are also prefixes are and . Thus the total surviving capital is .
To justify the expectation identity, independent blocks of four throws each have probability of equalling the pattern, so and . Total gambling capital minus the number of arriving unit stakes is a martingale with bounded increments before . Optional stopping therefore equates expected terminal capital with expected total stakes:
This is the waiting time for a word in independent uniform symbols. The extra reflects the overlapping occurrence of the prefix at the word's end.

New to topics? Read the docs here!