Abstract :
An n-bit necklace of density m is an equivalence class of binary strings having m 1ʹs and n−m 0ʹs with respect to the equivalence relation of rotation. An n-bit necklace is called prime if it has n distinct elements. Construction of a kind of Gray codes for prime necklaces and for general necklaces is presented here. That is, according to one algorithm, exactly one representative of each prime n-bit necklace of density m appears on the generated list, and successive representatives differ by a single transposition of a 0 and 1. The same is also true for general n-bit necklaces of density m according to a similar algorithm.