Let $S$ be a length $L$ string, where each character in the string is chosen with uniform random probability over an alphabet with $q$ characters. For example, a binary string would imply $q = 2$, a ternary string would imply $q = 3$, and so forth.
What is the probability of having all possible instances of a length $r < L$ subword (for example "DEF" would be an $r = 3$ subword of "ABCDEFG") in the string $L$ under conditions where: (1) partially overlapping subwords (for example "BCD" and "CDE" in "ABCDEFG") are allowed to count as two separate independent instances of subwords, (2) only one of two or more overlapping subwords are allowed to count as an independent instance of a subword?
To clarify a possible point of confusion for (2), we need to address the case where we have a chain of subwords - for example "ABC", "CDE", "EFG", "FGH" for the string "ABCDEFGH". Here, we are allowed to discard any subword or set of subwords we choose until no two subwords overlap. The remaining instances can then be counted as independent subwords. So, perhaps more reasonably, for (2) we can ask for the "existence" of a decision-based pruning procedure such that, after pruning, we have all possible instances of length $r$ subwords in the string $S$ of length $L$ over a $q$-ary alphabet.