So, I am in need of an indication of literature or where to start.
I am having a problem consisting of reading a vector of characters (for example, there are n=4 possible characters {A,B,C,D}) using a moving window in the format [1 0 1].
For example:
The vector is:



> 
> ABBCDE
> 
> 
> 


and results in a reading of



> 
> (A,B)(B,C)(B,D)(C,E)
> 
> 
> 


I am having trouble calculating what length of character vector is needed to contain all possible combinations of characters. Considering a random vector.


PS: a difficulty I have is in the overlapping of the patterns.



Probability of getting all pattern combinations in moving window over a vector of characters
The expected length needed to see all patterns of length $k$ in an alphabet of size $a$ is $k \ln(a) a^k (1+o(1))$.
See Propositions 11.9 and 11.10 in [1] for the case $a=2$.


[1] Levin, David A., and Yuval Peres. Markov chains and mixing times. Vol. 107. American Mathematical Soc. second ed., with contributions by E. Wilmer, 2017.
<https://pages.uoregon.edu/dlevin/MARKOV/markovmixing.pdf>


