Abstract
Given a length m string f over a k-ary alphabet and a positive integer n, we develop efficient algorithms to generate
-
(a)
all k-ary strings of length n that have no substring equal to f,
-
(b)
all k-ary circular strings of length n that have no substring equal to f, and
-
(c)
all k-ary necklaces of length n that have no substring equal to f, where f is an aperiodic necklace.
Each of the algorithms runs in amortized time O(1) per string generated, independent of k, m, and n.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. Aho, J. Hopcroft, and J. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, 1974.
D. Gusfield, Algorithms on Strings, Trees, and Sequences, Cambridge University Press, 1997.
F. Ruskey, J. Sawada, An efficient algorithm for generating necklaces of fixed density, SIAM Journal on Computing, 29 (1999) 671–684.
F. Ruskey, J. Sawada, A fast algorithm to generate unlabeled necklaces, 11th Annual ACM-SIGACT Symposium on Discrete Algorithms (SODA), 2000, 256–262.
R.P. Stanley, Enumerative Combinatorics, Volume I, Wadsworth & Brooks/Cole, 1986.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ruskey, F., Sawada, J. (2000). Generating Necklaces and Strings with Forbidden Substrings. In: Du, DZ., Eades, P., Estivill-Castro, V., Lin, X., Sharma, A. (eds) Computing and Combinatorics. COCOON 2000. Lecture Notes in Computer Science, vol 1858. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44968-X_33
Download citation
DOI: https://doi.org/10.1007/3-540-44968-X_33
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67787-1
Online ISBN: 978-3-540-44968-3
eBook Packages: Springer Book Archive