What is the shortest numerical string containing every possible combination of four digits? (0000 - 9999 inclusive)
(To clarify, the string 123456 would contain the combinations 1234, 2345 and 3456.)
In theory, the shortest possible sequence should be 10,003 digits long. But does such a sequence actually exist? Is there a way to prove or disprove it (without writing the whole thing out)?
If it doesn't exist, is there a way to calculate the minimum possible length of our ideal sequence?
Apologies if this is in the wrong forum. Please let me know if I should post elsewhere.
(To clarify, the string 123456 would contain the combinations 1234, 2345 and 3456.)
In theory, the shortest possible sequence should be 10,003 digits long. But does such a sequence actually exist? Is there a way to prove or disprove it (without writing the whole thing out)?
If it doesn't exist, is there a way to calculate the minimum possible length of our ideal sequence?
Apologies if this is in the wrong forum. Please let me know if I should post elsewhere.