Generating key points…
Answers are grounded in this paper and cite their sources.
A length-\(n\) window in an orientable binary sequence identifies both its position and its reading direction. The forward windows and their reversals are all distinct, with starts taken cyclically in a periodic sequence and only where a full window fits in a linear sequence. Gabrić and Sawada asked how to find the position efficiently in a long orientable sequence. The answer for the two Mitchell–Wild binary Lempel constructions is a deterministic algorithm that returns the zero-based forward start and the reading direction for every present window, and rejects an input absent in both directions. Gabrić and Sawada, §9, item 3, PDF p. 14 Mitchell and Wild also asked for efficient conversion in both directions between positions and windows in their recursive periodic and aperiodic sequences. For the two constructions below, the same representation returns the forward window at any valid start. Preprocessing takes \(O(n^6)\) bit operations, either query takes \(O(n^5)\) bit operations, and the caches and working storage together take \(O(n^2)\) bits. Preprocessing uses short prefixes in polynomial form and small sets of windows at the joins, so it can handle exponentially many positions without expanding a period or a linear word. The cycle-joined family in the Gabrić–Sawada paper poses a separate addressing problem. Mitchell and Wild, §6, PDF p. 18 The addressing algorithms use the orientability and length results of Mitchell and Wild's Theorems 4.7 and 5.4. The periodic construction, with Sawada's 80-bit seed, has period at least \((5/8)2ⁿ⁻¹\) for every \(n≥8\). The linear construction has exactly \( 2^n/3\) forward windows for every \(n≥2\). The seed and the starting phase fix the indexing. Sawada's implementation, array `O8` and linear seed `01` The two algorithms share a lift that turns adjacent XORs back into bits. For a binary word \(A=(a_j)\), use its periodic extension in the cyclic case and its available bits in the linear case. Over the binary field \( F_2\), put \(x=1+y\) and define the prefix polynomial \(P_A(k)=∑ⱼ₌₀ᵏ⁻¹a_jx^j\), with \(P_A(0)=0\). Write \(ε_A(k)=P_A(k)|y=0\) for the parity of the first \(k\) bits. The lift has \(T_0=0\) and \(Tⱼ₊₁=T_j+a_j\). For every available nonempty lift prefix, \[yP_T(k)=xP_A(k-1)+x^kε_A(k-1). \] To obtain \(P_T(k)\) modulo \(y^r\), evaluate the right-hand side modulo \(yʳ⁺¹\) and divide by \(y\). This requires one parent prefix. For a periodic parent of period \(m\), a request of length \(m<k≤ 2m\) uses \(P_A(k)=P_A(m)+x^mP_A(k-m)\), with the full-period term cached. At final order \(n\), cache each full word or period at level \(i\) modulo \(yⁿ⁻ⁱ⁺¹\), and keep the fixed-cut prefixes below at the corresponding precision. An inverse query reads consecutive bits using \(a_j=ε_A(j+1)+ε_A(j)\), reducing each index modulo the period in the cyclic case. The periodic construction starts at order eight with `00001000101001001100010011100010110001111010011010101001111101110011011010111011`, indexed from its first bit. At a step from order \(i-1\) to \(i\), let \(m\) be the parent period. The raw lift \(T\) has length \(2m\) and \(Tₘ₊ⱼ=1+T_j\) for \(0≤ j<m\). If \(m\) is odd, use the raw lift. If \(m\) is even, insert a 1 at \(q=m+i-4\), immediately after the run of \(i-4\) ones beginning at \(m\). The new period is respectively \(2m\) or \(2m+1\). In the insertion case, prefixes of length \(k≤ q\) are unchanged, and for \(q<k≤ 2m+1\) use \[Pnew(k)=yP_T(q)+xP_T(k-1)+x^q, \] with \(P_T(q)\) cached. To locate an \(i\)-bit word \(w\) in the forward direction, first check the \(i\) windows with starts \(q-i+1,…,q\) if there was an insertion. A cached band of \(2i-1\) bits gives all of them. If the band gives no match, look for the adjacent-XOR word \((Dw)_t=w_t+wₜ₊₁\), \(0≤ t<i-1\), as a forward window in the parent. Absence there rules out a match away from the insertion. A parent hit at \(j\) allows two raw starts, \(j\) and \(j+m\), with first bits \(ε_A(j)\) and \(1+ε_A(j)\). Choose the one matching \(w_0\). If there was an insertion, shift the chosen start by one when it is at or after \(q\), and discard it if the resulting cyclic window contains \(q\). The forward search ends at the fixed seed. Search the reversal of \(w\) if the first forward search fails, and report the direction of the successful search. The linear construction starts with \(S_2=01\). For a parent of length \(m\), take the lift \(T\) of length \(=m+1\). Let \(U\) be its bitwise complement read in reverse. At new order \(i\), use an overlap of \(g=i-1\) bits for odd \(i\) and \(g=i-2\) for even \(i\). Append the part of \(U\) from index \(g\) onwards to \(T\), giving a word of length \(2-g\). Put \(u=-g\) and cache \(P_T()\) and \(P_T(u)\). Prefixes of length at most \(\) use the lift formula. For \(1≤ b≤ u\), put \(H(x)=P_T(u)+P_T(u-b)\), the polynomial of the interval \([u-b,u)\) in its original positions. Then \[Pnew(+b)=P_T()+x^1+x^b/y+x⁺ᵘ⁻¹H(x⁻¹). \] The middle term adds the complement bits and the last term puts the interval in reverse order. The reciprocal substitution sends \(y\) to \(y/x\), so it can be evaluated at the retained precision. Only \(P_T(u-b)\) is a variable prefix request in this formula. For linear location, compare both directions of the window at \(-i+1\) when \(g=i-2\). This is the only window spanning the join that lies wholly in neither copy. For the remaining inputs, decode \(Dw\) once in the parent in either direction. If it is absent, reject the input. If it gives start \(j\) and direction \(d\), where \(+1\) means forward and \(-1\) means reversed, test the following two candidates. The start in \(T\) is \(j\), with direction \(d\) and forward first bit \(ε_A(j)\). The start in the embedded \(U\) is \(2-g-i-j\), with direction \(-d\) and forward first bit \(1+ε_A(j+i-1)\). Compare each forward first bit with \(w_0\) for direction \(+1\) or \(wᵢ₋₁\) for direction \(-1\). The first bit and adjacent XORs determine the full word, so the unique successful test gives the address. If neither passes, the input is absent. At order two the decoder accepts \(01\) forward and \(10\) in reverse, both at start zero.
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: