OFFSET
1,5
COMMENTS
Comments from Max Alekseyev, Feb 14 2008: (Start) It is easy to prove that such a string exists and, moreover, it can be closed into a circle of length 100.
Namely, let us construct a (directed) de Bruijn graph G on vertices V={0,1,2,3,4,5,6,7,8,9}, where every vertex is connected to every other vertex (including itself - so there is a self-loop at every vertex) by a directed arc. The arcs in G "encode" all possible 2-digit strings.
Any string over the alphabet V can be viewed as a path in G. If the string contains all 2-digit strings as substrings, then the corresponding path passes through every arc in G. The shortest such path is an Eulerian one (if it exists) and it indeed exists in G.
The indegree of every vertex in G equals its outdegree, implying that there exists an Eulerian cycle. Such a cycle has length 100 and visit every vertex 10 times.
So we want to find an Eulerian cycle resulting in the lexicographically earliest string. Such a cycle can be easily found by traversing G in a greedy manner. (End)
CROSSREFS
KEYWORD
nonn,fini,full,base,nice
AUTHOR
Patrick A. Kirol (sunwukong(AT)povn.com), Feb 08 2008
EXTENSIONS
Edited by N. J. A. Sloane, Feb 18 2008
STATUS
approved