Generating Necklaces and Strings with Forbidden Substrings

  • Authors:
  • Frank Ruskey;Joe Sawada

  • Affiliations:
  • -;-

  • Venue:
  • COCOON '00 Proceedings of the 6th Annual International Conference on Computing and Combinatorics
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a length m string f over a k-ary alphabet and a positive integer n, we develop effcient 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.