Generating key points…
Answers are grounded in this paper and cite their sources.
A binary de Bruijn cycle of order \(n\) contains each binary word of length \(n\) exactly once as a cyclic window. Can a window's position be found directly, and can the window at a given position be recovered, for a construction based on the complemented cycling register (CCR)? The published CCR3/J2 cycle supplies an answer to both parts of the question. For every integer \(n≥ 1\), the new algorithms rank and unrank all its windows, using \(0^n\) as the window at position zero. Each query takes \(O(n^7)\) bit operations and polynomial working space, without generating the full cycle. Sawada's open problems, item 10, 'Any CCR-based construction' The order being decoded is the one specified by Gabrić, Sawada, Williams and Wong. Write \( w\) for the bitwise complement of a word \(w\) and let \[F(w_1⋯ w_n)=w_2⋯ w_n w_1. \] The raw orbit consists of the distinct states reached by iterating \(F\), equivalently the distinct length-\(n\) windows of the circular word \(w w\). Its canonical representative is its lexicographically least window, with \(0<1\). The root is the orbit of \(0^n\). Traverse each orbit in raw phase order from its representative, inserting children as follows. Immediately after a raw state \(0β\), insert the child orbit starting at \(β0\) if \(β0\) is a canonical representative other than \(0^n\), where \(β\) has length \(n-1\). The parent resumes at \(F(0β)\) after the child exits at \(1β\). Scanning until the representative recurs gives the phase order in at most \(2n\) steps, including when the raw period is a proper divisor of \(2n\). CCR3, §4.2, Theorem 4.7, p. 8 · Zero-start convention, Table 1, p. 2 The direct queries use a run-length rule to find parents and count the windows in whole subtrees. A representative begins and ends with a zero run. Write its successive run lengths as \(A=(a_1,…,a_r)\), where the entries are positive, sum to \(n\), and \(r\) is odd. For a non-root orbit, the parent's canonical run lengths are \[{cases} (a_1+1,a_2,…,aᵣ₋₁,a_r-1), & a_r>1,\\ (a_1+aᵣ₋₁+1,a_2,…,aᵣ₋₂), & a_r=1. {cases} \] The first run grows at each parent step, so there are at most \(n\) such steps. For a non-root representative \(B=(b,G,L)\), where \(G\) lists the inner run lengths and \(L\) is the final zero-run length, the descendants including \(B\) are exactly the canonical compositions \((a,G,m,…)\) with \(1≤ a≤ b\), \(m≥ L\), and an even number of runs after \(m\). This condition gives disjoint binary prefixes \(P_a=0^aW(G)0^L\) for \(1≤ a≤ b\), where \(W(G)\) expands the inner runs starting and ending with ones. The subtree size counts every raw window whose representative has one of those prefixes. Thus each orbit contributes its actual period, and the root has size \(2^n\). To compute these sizes, let \(H_n(z)\) count length-\(n\) words whose canonical representative is at most the binary word \(z\) of length \(n\). A prefix \(P\) contributes \(H_n(v)-H_n(u^-)\), where \(u=P0n-|P|\), \(v=P1n-|P|\), \(|P|\) is the prefix length and \(u^-\) is the immediate predecessor of \(u\) in binary lexicographic order. At the virtual predecessor of \(0^n\), use count zero. Sum these differences over the prefixes of the subtree. For the threshold count, forbid \(z\) and, for each position where \(z\) has a 1, the prefix ending at that position with its last bit changed to 0. Also forbid the bitwise complements of all these words, since shifting the periodic repetition of \(w w\) by \(n\) positions complements every bit. Build a deterministic automaton whose states are proper prefixes of the forbidden words, including the empty string, that contain no forbidden factor. After reading a bit, reject if a forbidden word is completed and otherwise retain the longest suffix that is a state. Let \(Mq,q'\) be the number of bit labels taking state \(q\) to state \(q'\) on a permitted transition, and let \(τ(q)\) be the state obtained by complementing the stored string. Then \[H_n(z)=2^n-∑_q (M^n)q,τ(q). \] The sum counts the words that avoid the forbidden factors around the entire circle. The endpoint \(τ(q)\) incorporates the complement after \(n\) bits. The state stores fewer than \(n\) bits, so a counted word determines its endpoint and hence its starting state uniquely, even for a word with a shorter raw period. The automaton has \(O(n)\) states, and each threshold count takes \(O(n^4)\) bit operations using sparse path counting. To rank a window, find its representative and its zero-based raw phase \(j\). Start with \(j\) plus the sizes of the child subtrees attached at phases strictly before \(j\). At each step towards the root, add \(t+1\) and the sizes of the parent's child subtrees attached strictly before phase \(t\), where \(t\) is the phase attaching the current subtree to that parent. The resulting integer is the window's position. To unrank any integer from \(0\) to \(2^n-1\), start at the root and scan its phases. Each phase occupies one position, followed by a block of the size of its child subtree if it has one. Subtract the sizes of blocks that precede the address and descend only into the child block that contains it. When the residual address selects a raw phase, return that phase's window. Each query visits \(O(n)\) orbits and inspects \(O(n)\) phases per orbit. Each child size uses at most two threshold counts per prefix and \(O(n)\) prefixes, giving the stated bit bound without a table of all orbits.
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: