Today, I was thinking about random stuff like I sometimes do. I thought of an interesting question that I have no clue how to solve.
It started with me thinking about taking all 3 letter strings ("words"), and putting them through a profanity filter, just as a simple way to find out what words are filtered. Then, I realized that there was a (slightly, perhaps) more efficient way to write all letter combinations.
The traditional method would be:
aaa, aab, aac, aad, ... , zzz
But my idea was to allow the 3 letter combinations to be combined with each other. For example,
abcdef = abc, bcd, cde, and def
A reduction of 6 characters.
I wanted to know the shortest total character length required to represent every 3 letter word. I had no clue where to start, so I decided to simplify the problem to numbers (012345 represents 012, 123, 234, and 345): in other words, to represent 000 to 999 in as few digits as possible.
The only way that I can think to do this is to write code and have a computer brute force through every combination, but that would probably take years. Does anyone know anything about how to go about solving this?
[Clarification] In the last paragraph I mentioned brute forcing through every combination. I meant continuously adding digits until all 1000 numbers in the sequence, and doing that for every possible <3000 digit sequence (3000 is the longest that the sequence has to be: simply 000 to 999 in order) to find the shortest sequence that represents all 1000 numbers.