earliest string to reprsent 00 ... 99

Joerg Arndt arndt at jjj.de
Thu Feb 14 05:57:45 CET 2008


* N. J. A. Sloane <njas at research.att.com> [Feb 14. 2008 15:43]:
> 
> Dear Seqfans, Patrick A. Kirol submitted a sequence
> which I did not understand.  After reading his reply, 
> I think that the problem can be stated as follows:
> 
> Find the shortest (and lexicographically earliest)
> decimal string which contains all the 2-digit strings 01, 02,
> ..., 98, 99.
> 
> Presumably something like this will be optimal:
> 
> 1 0 1 1 2 1 3 ... 9 9

That would be a 10-ary de Bruijn seq., right?
The lex-min is
0 01 02 03 04 05 06 07 08 09 11 21 31 41 51 61 71 81 92 23 24 25
  26 27 28 29 33 43 53 63 73 83 94 45 46 47 48 49 55 65 75 85 96
  67 68 69 77 87 98 89 9
(omit initial 0 if string "00" is not wanted)


> 
> Here is what he sent me:
> 
> %S A000001 0,01,02,03,04,05,06,07,08,09,1,12,13,14,15,16,17,18,19,2,23,24,25,26,27,28,29,3,34,35,36,37,38,39,4,45,46,47,48,49,5,56,57,58,59,6,67,68,69,7,78,79,8,89,9
> 
> but I think the version in the
> OEIS should be a string of single digits seperated by commas.
> The string /could/ begin with 0, but it's not obvious that that
> is optimal.
> 
> Neil

I suggest to actually have three versions, one with single digits
and two with pairs:
00 10 20 etc (zero included)
01 02 03 etc (zero excluded)
The two-digit versions will prevent (fingers crossed) resubmissions from
people who seach for that version(s).






More information about the SeqFan mailing list