Problem 70: Dense Binary Words |
A word is called dense if it has the largest number of (distinct) factors among words of the same length on the same alphabet.
Over an alphabet with at least three letters, generating dense words for any given length is solved by the generation of perfect words (see Problem 69). But the solution does not apply to binary words and the present problem shows how to deal efficiently with this case.