TITLE: Expected length of a sequence that contains all words of a given length.
QUESTION [8 upvotes]: Fix some alphabet $\Sigma$ and a positive integer $n$.  What is the expected number of random letters drawn from $\Sigma$ until all length-$n$ words are present?
For example, let $\Sigma = \{0,1\}.$  Then the string "10" contains all possible 1-letter words, ie "0" and "1".  The expected length for a random string is simply the coupon-collector problem with 2 cards... so the expected length is 3.
But it's more complicated when words can overlap.  For the same alphabet and $n=2$ we can see that the string "00110" has all 2-letter words, and I claim that's the shortest string that does. But what's the expected length of a random string that contains all four strings "00", "01", "10", and "11"?  The usual coupon-collector approach doesn't seem to work.

REPLY [4 votes]: Well, here's a solution, but it's not pretty. 
As noted in my answer to
Cover time chess board (king),
 there is in principle no difficulty in answering this question.
Calculating the expected cover 
time of the set of patterns $\cal S$ reduces to calculating the expected hitting time 
 of every possible non-empty subset $A$ of $\cal S$:
$$\mathbb{E}(\text{cover time})=\sum_A (-1)^{|A|-1} \mathbb{E}(T_A)\tag1$$
These hitting times are defined by $T_A=\inf(n\geq 0: X_n\in A)$.
These, in turn, can be found using a technique from Section 14.3 (Patterns III) 
of Problems and Snapshots from the World of Probability by Blom, Holst, and Sandell.
For instance with strings of length two we find
$$\mathbb{E}(T_{00,01,10,11})=2$$
$$\mathbb{E}(T_{00,01,10})=\mathbb{E}(T_{01,10,11})=5/2,\quad \mathbb{E}(T_{00,10,11})= \mathbb{E}(T_{00,01,11})=9/4$$
$$\mathbb{E}(T_{00,01})=\mathbb{E}(T_{00,10})=\mathbb{E}(T_{00,11})=\mathbb{E}(T_{01,10})=\mathbb{E}(T_{01,11})=\mathbb{E}(T_{10,11})=3$$
$$\mathbb{E}(T_{00})=\mathbb{E}(T_{11})=6,\quad \mathbb{E}(T_{01})=\mathbb{E}(T_{10})=4$$
Plugging all this information into (1), we find that the expected time 
to see all four patterns $00,01,10$, and $11$ is $19/2=9.5$.
Just for fun, I've calculated the expected time to see all eight patterns of length three to be ${89259/ 3640}= 24.5217$.