0% found this document useful (0 votes)
77 views

Permutations

The document discusses finding the shortest string that contains all permutations of symbols from an alphabet of size n as substrings. It is shown that for n=1,2,3 the minimum lengths are 1, 3, and 9 respectively, following the pattern of summing the first n factorial terms. An inductive argument shows that the upper bound length is the summation of the first n factorial terms. It is conjectured but not proven that this is the exact solution.

Uploaded by

augustuswg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Permutations

The document discusses finding the shortest string that contains all permutations of symbols from an alphabet of size n as substrings. It is shown that for n=1,2,3 the minimum lengths are 1, 3, and 9 respectively, following the pattern of summing the first n factorial terms. An inductive argument shows that the upper bound length is the summation of the first n factorial terms. It is conjectured but not proven that this is the exact solution.

Uploaded by

augustuswg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PERMUTATION STRINGS Jeffrey A.

Barnett1

Problem: What is the length of the shortest string on an alphabet of n


symbols that contains all n! permutations of the alphabet as (contiguous)
substrings?

Partial Solution: Minimum length strings for n = 1, 2, 3 are, respec-


tively, 1, 121, and 123121321. Their lengths are 1 = 1, 3 = 1! + 2!, and
9 = 1!+2!+3!. Given any string that contains all permutations of an alphabet
of n − 1 symbols, a new string containing all permutations of n symbols can
be generated by the following procedure: replace each of the (n − 1)! permu-
tations of the form j1 . . . jn−1 with the string j1 . . . jn−1 nj1 . . . jn−1 . Overlaps
among permutations in the old string are maintained in the replacements and
each of the (n − 1)! replaced strings grows in length by n symbols. Therefore,
the new string is n! = n × (n − 1)! symbols longer than the old string. The
following depicts the construction as discussed for transforming the upper-
bound solution from n = 3 to n = 4. Note, the output substrings, e.g.,
1234123, contain all permutations of their first four characters.

123 1234123
231 2314231
312 3124312
213 2134213
132 1324132
321 3214321
--------- ---------------------------------
123121321 => 123412314231243121342132413214321

A simple induction argument establishes the fact that U (n) = ni=1 i! is


P

an upper bound on the necessary string length. Further, n! is clearly a lower


bound. Note, (U (n) − n!)/n! ≈ 1/n so the order of magnitude is correct. I
conjecture, but cannot prove that U (n) is the solution to the stated problem.

1
jbb@notatt.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy