Generating Unlabelled Necklaces and Irreducible Polynomials over GF(2)

Kevin Cattell, Department of Computer Science, University of Victoria, Canada.
Frank Ruskey, Department of Computer Science, University of Victoria, Canada.
Joe Sawada, Department of Computer Science, University of Victoria, Canada.
C. Robert Miers, Department of Mathematics and Statistics, University of Victoria, Canada.
Micaela Serra, Department of Computer Science, University of Victoria, Canada.

Abstract:

Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an equivalence class of k-ary strings under rotation (the cyclic group). A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algorithms for generating (i.e., listing) all necklaces and binary unlabeled necklaces. Generalization is made to the case where no substring 0t occurs, for fixed t. All these algorithms have optimal running times in the sense that their running times are proportional to the number of necklaces produced. As an application, we describe the implementation of a fast algorithm for listing all degree n irreducible and primitive polynomials over GF(2).



Back to list of publications.