Generating key points…
Answers are grounded in this paper and cite their sources.
A binary necklace is a class of length-\(n\) binary words under cyclic rotation. With \(0<1\), its representative is the lexicographically least word in the class. Sawada's Conjecture 1 asks whether the specific position-gap recursion in Figure 4.5 generates these representatives in constant amortised time when the number \(q\) of zeros satisfies \(1≤ q<n/2\). The answer is yes, with a single absolute constant that also covers \(q=n/2\). The recursion emits the representatives in increasing lexicographic order. Its total generation work, including setup, is bounded by a constant times the number of necklaces when each output exposes the current buffer of zero positions. Copying the buffer or rendering the \(n\)-symbol word carries a separate output cost. Sawada's dissertation, §4.4, Figure 4.5 and Conjecture 1, printed pp. 33–34 Every least representative starts at a zero. The positive distances \(g_1,…,g_q\) between successive zeros, including the wraparound distance, sum to \(n\). Changing the starting zero rotates this gap vector. At the first differing gap, the smaller distance places the next zero earlier, so lexicographic order of the gaps gives lexicographic order of the binary words. For \(q=1\), emit the single zero at position \(a_0=1\). For \(q≥2\), set \(a_0=1\) and try the first gap \(g_1=A\) in increasing order for \(1≤ A≤ n/q\), with \(a_1=1+A\) and initial prefix length parameter \(p=1\). At a call with gaps \(g_1,…,gₜ₋₁\), \(p\) is the length of the longest Lyndon prefix. A Lyndon word is strictly smaller than all its nontrivial cyclic rotations. For \(2≤ t<q\), try the integer zero positions \(a_t\) in increasing order in the interval \[aₜ₋₁+gₜ₋ₚ≤ a_t≤ n-A(q-t)+[p=1], \] where \([p=1]\) is 1 when \(p=1\) and 0 otherwise. Set \(g_t=a_t-aₜ₋₁\). Keep \(p\) if \(g_t=gₜ₋ₚ\), and set \(p=t\) if \(g_t>gₜ₋ₚ\). At \(t=q\), the last gap is forced to be \(g_q=n+1-aq-1\). Reject if \(g_q<gq-p\). Under equality use \(p\) as the candidate period, and under strict inequality use \(q\). Emit the current zero positions exactly when the candidate period divides \(q\). The strict last-gap branch in the printed figure passes \(d=n-q\) to the output routine. The dissertation's prose specifies divisibility by the candidate period in a vector of length \(q\), so the strict branch requires the argument \(q\). Using the printed argument with that divisibility test would reject both necklaces at \(n=5,q=2\), whose least gap vectors are \((1,4)\) and \((2,3)\), because \(3\) does not divide \(2\). The correction affects output acceptance only. Sawada's dissertation, §4.4, Figure 4.5 and accompanying prose The uniform bound comes from counting the prefixes the recursion actually visits. After subtracting \(A\) from every gap in a visited prefix, the entries are nonnegative and sum to at most \(D_A=n-Aq\). At any given length, the normalised prefix is determined by repeating its longest Lyndon prefix and truncating to that length. For \(1≤ l<q\), let \(B_l\) count pairs \((A,β)\), with \(A\) in the range above and \(β\) a nonnegative Lyndon word of length \(l\) that starts with zero and has sum at most \(D_A\). With \(D=n-q\), the bounds are \[B_l≤(1l+1q){D+l}{l}, number of recursive calls≤∑ₗ₌₁q-1(q-l)B_l. \] The \(1/l\) term comes from counting rotations for \(A=1\). For \(A≥2\), retaining the requirement that each rotation contains a zero lets the smaller budgets, spaced \(q\) apart, contribute the \(1/q\) term in aggregate. Since \(D≥ q\), successive binomial terms decrease by at least a factor of two as \(l\) decreases. The weighted sum is therefore \(O(M/q)\) with an absolute implied constant, where \(M={n-1}{q-1}\) counts all ordered positive gap vectors of sum \(n\). Each rotation class contains at most \(q\) such vectors, so there are at least \(M/q\) outputs. Each loop iteration makes one recursive call, and the remaining work per call is constant. Constant amortised generation was already known for other fixed-density and fixed-content algorithms. The bound here applies to the particular lexicographic gap recursion posed in the conjecture. Ruskey and Sawada, *An Efficient Algorithm for Generating Necklaces with Fixed Density*, Sawada, *A fast algorithm to generate necklaces with fixed content*
No takes yet. Share an insight, caveat, or question.
Zixuan He (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: