Constant-delay word enumeration on tapes and deques

A single-head tape and a deque can each enumerate all length-\(n\) words over any fixed nonempty finite alphabet, with a bound on the number of steps before the first output, between outputs and from the final output to halting. One finite controller per alphabet works for every positive length \(n\), using only the \(n\) writable symbols and its finite state. Requiring every successive output to be a shift in the same direction changes the answer for the deque. On the tape, the initial head position determines whether a particular binary Gray order can be emitted in its literal coordinate order. The first tape question asks for Sac Himelfarb and Schwartz's binary Construction B on the tape defined by Amarilli and colleagues. The tape starts at \(0^n\), with the head on the leftmost writable cell and an immutable marker at either end. An elementary transition reads one symbol, can rewrite the current writable cell and moves the head by at most one cell. An output gives the entire current tape word. In the literal order \(C_n\) of Construction B, the first two words for \(n\ge4\) are \(0^n\) and \(e_{n-2}\), where \(e_i\) is the word with its sole 1 at position \(i\). With positions counted from the physical left, reaching and writing cell \(n-2\) takes at least \(n-2\) steps from the prescribed start. A bound \(B\) on each of the first two waiting intervals would require \(n-2\le 2B\). The literal order is therefore impossible with uniform delay from the leftmost start. Reversing the coordinates of every output word makes the order implementable from that start, with at most 256 elementary steps per gap. The same machine rules, with head motions and marker roles exchanged, give the literal order from a rightmost start. Coordinate reversal preserves the previously established cyclic Gray property and the bound of two on the distance between consecutive changed positions, including at the closing edge. ICALP 2026, §5 first tape-machine question and §2 tape model · Sac Himelfarb and Schwartz, §III-B, Construction B and Theorem 6 The binary order can be generated from the auxiliary list \(A_3=(000,001,011,111,110,100,101)\). For \(j\ge4\), write \(A_{j-1}=(a^0,\ldots,a^L)\), with indices starting at zero and \(L=|A_{j-1}|-1\). In logical coordinates, \((a,d)\) appends digit \(d\) to word \(a\). The two lists at length \(j\) are \[\begin{aligned} A_j&=\bigl(0^j,(a^0,1),\ldots,(a^L,1),(a^L,0),\ldots,(a^2,0),e_{j-2},e_{j-2}+e_j\bigr),\\ C_j&=\bigl(0^j,e_{j-2},e_{j-2}+e_j,(a^0,1),\ldots,(a^L,1),(a^L,0),\ldots,(a^1,0)\bigr). \end{aligned} \] The sums here set the two indicated bits. Read the lists from left to right and reverse the coordinates of each word for the prescribed leftmost start. The tape implementation traverses an auxiliary block from its first, second or third entry to its last, or backwards from its last entry to its third. These four traversal types suffice for the finite control. The appended bit records the continuation needed on a return from the backwards traversal, so there is no auxiliary stack. Each bit flip emits immediately. The transition rules allow at most two consecutive descents without an output, and a receiving return emits before another return. Lengths one to three use fixed binary Gray lists. The larger-alphabet question has an affirmative answer in the same tape model. Identify the alphabet with \(\mathbb Z_m\), the digits \(0,\ldots,m-1\) with arithmetic modulo \(m\). For each \(m\ge2\), the machine emits every word once and halts within a delay bound of 512 elementary transitions per gap, independent of both \(m\) and \(n\) in the one-symbol transition model. The size of the transition table may depend on \(m\). Each step in the cyclic output order adds or subtracts 1 in one coordinate. Successive update sites, including the sites adjacent to the closing edge, differ by at most one for \(m\ge3\) and at most two for \(m=2\). The cyclic and coordinate-distance properties come from the underlying Gray codes. The new construction realises their schedules with one head and no additional writable cells. For \(m=1\), the machine emits its sole word and halts. Author version, §5, p. 20, larger-alphabet question for the tape · Sac Himelfarb and Schwartz, §IV, Constructions F–I and Theorems 12–15 The tape schedules can be used to compute the output orders as follows. Number logical positions from the physical right so that the head starts at logical position \(n\). For \(m\ge5\), set \(X_1=(0,1,\ldots,m-1)\) and \(r=m-3\). To form \(X_j\) for \(j\ge2\), let \(c\) be the first word of \(X_{j-1}\). Begin with \((c,r),(c,r-1),\ldots,(c,0)\). For each \(d=0,1,\ldots,m-1\) in order, append digit \(d\) to the list \(X_{j-1}\) with its first word removed, reading the list forwards for even \(d\) and backwards for odd \(d\). End with \((c,m-1),(c,m-2)\). Subtract the first word of \(X_n\) coordinatewise modulo \(m\) to obtain the stored digits, so that the first output is \(0^n\). The parent digit's parity and the child's completion direction determine the next traversal. At a block boundary the endpoint corrections take unit steps in the parent or child header cell. For \(m=3\), start the auxiliary lists with \(X_2=(00,01,02,22,20,21,11,12,10)\). For \(j\ge3\), let \(Y=X_{j-1}\), with first word \(z=0^{j-1}\) and last word \(u=e_1\). Form \(X_j\) from \((z,0),(z,2)\), followed by three blocks: \(Y\) without its last word with digit 1 appended, the interior of \(Y\) in reverse with digit 0 appended, and \(Y\) without its first word with digit 2 appended. Finish with \((u,1),(u,0)\). Here the interior omits both endpoints. For the output at length \(n\ge3\), concatenate three full forward traversals of \(X_{n-1}\). In block \(d=0,1,2\), add \(d\) to logical coordinate 1 modulo 3 and append \(d\). Lengths one and two use \((0,1,2)\) and \(X_2\). The local traversals use forward and reverse interior states, with the first and last edges of each auxiliary list changing only its header digit. For \(m=2\), use the binary tape schedule above. For \(m=4\), run the binary schedule on \(2n\) virtual bits and pack adjacent logical pairs into actual cells via \(00\mapsto0\), \(01\mapsto1\), \(11\mapsto2\), \(10\mapsto3\). The controller stores the virtual binary state and which bit of the current pair the virtual head occupies. Each virtual transition takes one actual transition. A flip becomes a unit step modulo four, and binary update sites at distance at most two occupy the same or neighbouring actual cells. The larger-alphabet question also has an affirmative answer for the deque. Each elementary operation reads the two end symbols, removes one end symbol and inserts a chosen symbol at either end, preserving length. For every \(m\ge1\), one controller starts on \(0^n\), emits every length-\(n\) word once and halts, with at most 32 elementary steps per gap for all positive \(n\) and all \(m\). For \(m\ge2\) and \(n\ge3\), write the word as \(vh\), with a core \(v\) of length \(N=n-1\) and a final tag \(h\in\{0,\ldots,m-1\}\). Every nonzero core has the unique form \(v=0^k a u\), where \(1\le a\le m-1\) and \(|u|=N-k-1\). It denotes the node with path \(u\) and height \(k\) in tree \(a\) of a forest of full ordered \(m\)-ary trees of depth \(N-1\). The zero core is an auxiliary vertex. A down or up state determines the next move, with all tag updates taken modulo \(m\). Author version, §5, p. 20, larger-alphabet question for the deque · §3, p. 10, deque model State and testCore operationNext state and tagDown, first digit is 0Remove that 0 and append a 0 to the coreDown, \(h-1\)Down, first digit is nonzeroKeep the coreUp, \(h\)Up, last core digit \(b<m-1\)Replace \(b\) by \(b+1\)Down, \(h\)Up, last core digit \(b=m-1\)Remove \(b\) and prepend 0Up, \(h+1\) First emit the zero core with each even tag in ascending order. Then start the down phase at \(10^{N-1}\) with tag 0. To count a lap, wait for a down visit whose first two core digits are \(11\), then for a down visit whose first two core digits are \(10\). On the \(m\)-th such return, halt before emitting. During the walk emit a nonzero core on a down visit with even tag or an up visit with odd tag. Emit the auxiliary zero core on its up visits with odd tag. Each lap increases the tag of each fixed visit by one modulo \(m\), so the emission rule selects each word exactly once. To expose the last core digit, temporarily remove the tag and insert a scratch 0 at the left end. A temporary rotation exposes the second core digit for the lap test. The scratch symbol is restored or discarded before output. Each visit uses a bounded number of deque operations. At most two consecutive visits are silent, including when an odd alphabet size makes the tag wrap from \(m-1\) to 0. A one-symbol alphabet emits once. At length one, count through the digits. At length two, increase the first digit and traverse the second digit in ascending order for even first digits and descending order for odd ones. The directed binary deque question has a negative answer. It asks for a single deterministic machine that visits every binary word of every positive length exactly once, halts with uniformly bounded delay and satisfies \(wa\mapsto bw\) at each successive output, where \(w\) is a binary word of length \(n-1\) and \(a,b\) are bits. The order itself is known to exist at each fixed length. The impossibility applies even when the machine uses both ends and same-end replacements between outputs. It requires the same direction at every output transition and applies to a linear list with no closing edge required. Allowing the output direction to vary or allowing endpoint substitutions as output edges gives a different question. Author version, §5, p. 20, directed 1-push-pop question · Appendix C.1, p. 27, directed adjacency and fixed-length existence A delay bound \(D\) determines exactly how much of the deque can affect its next output. Set \(\rho=D+2\). For \(n>2\rho\),

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24797087
Primary Topic
semigroups and automata theory
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Constant-delay word enumeration on tapes and deques

Zixuan He
Zenodo (CERN European Organization for Nuclear Research)
semigroups and automata theory
preprint

Constant-delay word enumeration on tapes and deques

Zixuan He
preprint en

Abstract

A single-head tape and a deque can each enumerate all length-\(n\) words over any fixed nonempty finite alphabet, with a bound on the number of steps before the first output, between outputs and from the final output to halting. One finite controller per alphabet works for every positive length \(n\), using only the \(n\) writable symbols and its finite state. Requiring every successive output to be a shift in the same direction changes the answer for the deque. On the tape, the initial head position determines whether a particular binary Gray order can be emitted in its literal coordinate order. The first tape question asks for Sac Himelfarb and Schwartz's binary Construction B on the tape defined by Amarilli and colleagues. The tape starts at \(0^n\), with the head on the leftmost writable cell and an immutable marker at either end. An elementary transition reads one symbol, can rewrite the current writable cell and moves the head by at most one cell. An output gives the entire current tape word. In the literal order \(C_n\) of Construction B, the first two words for \(n\ge4\) are \(0^n\) and \(e_{n-2}\), where \(e_i\) is the word with its sole 1 at position \(i\). With positions counted from the physical left, reaching and writing cell \(n-2\) takes at least \(n-2\) steps from the prescribed start. A bound \(B\) on each of the first two waiting intervals would require \(n-2\le 2B\). The literal order is therefore impossible with uniform delay from the leftmost start. Reversing the coordinates of every output word makes the order implementable from that start, with at most 256 elementary steps per gap. The same machine rules, with head motions and marker roles exchanged, give the literal order from a rightmost start. Coordinate reversal preserves the previously established cyclic Gray property and the bound of two on the distance between consecutive changed positions, including at the closing edge. ICALP 2026, §5 first tape-machine question and §2 tape model · Sac Himelfarb and Schwartz, §III-B, Construction B and Theorem 6 The binary order can be generated from the auxiliary list \(A_3=(000,001,011,111,110,100,101)\). For \(j\ge4\), write \(A_{j-1}=(a^0,\ldots,a^L)\), with indices starting at zero and \(L=|A_{j-1}|-1\). In logical coordinates, \((a,d)\) appends digit \(d\) to word \(a\). The two lists at length \(j\) are \[\begin{aligned} A_j&=\bigl(0^j,(a^0,1),\ldots,(a^L,1),(a^L,0),\ldots,(a^2,0),e_{j-2},e_{j-2}+e_j\bigr),\\ C_j&=\bigl(0^j,e_{j-2},e_{j-2}+e_j,(a^0,1),\ldots,(a^L,1),(a^L,0),\ldots,(a^1,0)\bigr). \end{aligned} \] The sums here set the two indicated bits. Read the lists from left to right and reverse the coordinates of each word for the prescribed leftmost start. The tape implementation traverses an auxiliary block from its first, second or third entry to its last, or backwards from its last entry to its third. These four traversal types suffice for the finite control. The appended bit records the continuation needed on a return from the backwards traversal, so there is no auxiliary stack. Each bit flip emits immediately. The transition rules allow at most two consecutive descents without an output, and a receiving return emits before another return. Lengths one to three use fixed binary Gray lists. The larger-alphabet question has an affirmative answer in the same tape model. Identify the alphabet with \(\mathbb Z_m\), the digits \(0,\ldots,m-1\) with arithmetic modulo \(m\). For each \(m\ge2\), the machine emits every word once and halts within a delay bound of 512 elementary transitions per gap, independent of both \(m\) and \(n\) in the one-symbol transition model. The size of the transition table may depend on \(m\). Each step in the cyclic output order adds or subtracts 1 in one coordinate. Successive update sites, including the sites adjacent to the closing edge, differ by at most one for \(m\ge3\) and at most two for \(m=2\). The cyclic and coordinate-distance properties come from the underlying Gray codes. The new construction realises their schedules with one head and no additional writable cells. For \(m=1\), the machine emits its sole word and halts. Author version, §5, p. 20, larger-alphabet question for the tape · Sac Himelfarb and Schwartz, §IV, Constructions F–I and Theorems 12–15 The tape schedules can be used to compute the output orders as follows. Number logical positions from the physical right so that the head starts at logical position \(n\). For \(m\ge5\), set \(X_1=(0,1,\ldots,m-1)\) and \(r=m-3\). To form \(X_j\) for \(j\ge2\), let \(c\) be the first word of \(X_{j-1}\). Begin with \((c,r),(c,r-1),\ldots,(c,0)\). For each \(d=0,1,\ldots,m-1\) in order, append digit \(d\) to the list \(X_{j-1}\) with its first word removed, reading the list forwards for even \(d\) and backwards for odd \(d\). End with \((c,m-1),(c,m-2)\). Subtract the first word of \(X_n\) coordinatewise modulo \(m\) to obtain the stored digits, so that the first output is \(0^n\). The parent digit's parity and the child's completion direction determine the next traversal. At a block boundary the endpoint corrections take unit steps in the parent or child header cell. For \(m=3\), start the auxiliary lists with \(X_2=(00,01,02,22,20,21,11,12,10)\). For \(j\ge3\), let \(Y=X_{j-1}\), with first word \(z=0^{j-1}\) and last word \(u=e_1\). Form \(X_j\) from \((z,0),(z,2)\), followed by three blocks: \(Y\) without its last word with digit 1 appended, the interior of \(Y\) in reverse with digit 0 appended, and \(Y\) without its first word with digit 2 appended. Finish with \((u,1),(u,0)\). Here the interior omits both endpoints. For the output at length \(n\ge3\), concatenate three full forward traversals of \(X_{n-1}\). In block \(d=0,1,2\), add \(d\) to logical coordinate 1 modulo 3 and append \(d\). Lengths one and two use \((0,1,2)\) and \(X_2\). The local traversals use forward and reverse interior states, with the first and last edges of each auxiliary list changing only its header digit. For \(m=2\), use the binary tape schedule above. For \(m=4\), run the binary schedule on \(2n\) virtual bits and pack adjacent logical pairs into actual cells via \(00\mapsto0\), \(01\mapsto1\), \(11\mapsto2\), \(10\mapsto3\). The controller stores the virtual binary state and which bit of the current pair the virtual head occupies. Each virtual transition takes one actual transition. A flip becomes a unit step modulo four, and binary update sites at distance at most two occupy the same or neighbouring actual cells. The larger-alphabet question also has an affirmative answer for the deque. Each elementary operation reads the two end symbols, removes one end symbol and inserts a chosen symbol at either end, preserving length. For every \(m\ge1\), one controller starts on \(0^n\), emits every length-\(n\) word once and halts, with at most 32 elementary steps per gap for all positive \(n\) and all \(m\). For \(m\ge2\) and \(n\ge3\), write the word as \(vh\), with a core \(v\) of length \(N=n-1\) and a final tag \(h\in\{0,\ldots,m-1\}\). Every nonzero core has the unique form \(v=0^k a u\), where \(1\le a\le m-1\) and \(|u|=N-k-1\). It denotes the node with path \(u\) and height \(k\) in tree \(a\) of a forest of full ordered \(m\)-ary trees of depth \(N-1\). The zero core is an auxiliary vertex. A down or up state determines the next move, with all tag updates taken modulo \(m\). Author version, §5, p. 20, larger-alphabet question for the deque · §3, p. 10, deque model State and testCore operationNext state and tagDown, first digit is 0Remove that 0 and append a 0 to the coreDown, \(h-1\)Down, first digit is nonzeroKeep the coreUp, \(h\)Up, last core digit \(b<m-1\)Replace \(b\) by \(b+1\)Down, \(h\)Up, last core digit \(b=m-1\)Remove \(b\) and prepend 0Up, \(h+1\) First emit the zero core with each even tag in ascending order. Then start the down phase at \(10^{N-1}\) with tag 0. To count a lap, wait for a down visit whose first two core digits are \(11\), then for a down visit whose first two core digits are \(10\). On the \(m\)-th such return, halt before emitting. During the walk emit a nonzero core on a down visit with even tag or an up visit with odd tag. Emit the auxiliary zero core on its up visits with odd tag. Each lap increases the tag of each fixed visit by one modulo \(m\), so the emission rule selects each word exactly once. To expose the last core digit, temporarily remove the tag and insert a scratch 0 at the left end. A temporary rotation exposes the second core digit for the lap test. The scratch symbol is restored or discarded before output. Each visit uses a bounded number of deque operations. At most two consecutive visits are silent, including when an odd alphabet size makes the tag wrap from \(m-1\) to 0. A one-symbol alphabet emits once. At length one, count through the digits. At length two, increase the first digit and traverse the second digit in ascending order for even first digits and descending order for odd ones. The directed binary deque question has a negative answer. It asks for a single deterministic machine that visits every binary word of every positive length exactly once, halts with uniformly bounded delay and satisfies \(wa\mapsto bw\) at each successive output, where \(w\) is a binary word of length \(n-1\) and \(a,b\) are bits. The order itself is known to exist at each fixed length. The impossibility applies even when the machine uses both ends and same-end replacements between outputs. It requires the same direction at every output transition and applies to a linear list with no closing edge required. Allowing the output direction to vary or allowing endpoint substitutions as output edges gives a different question. Author version, §5, p. 20, directed 1-push-pop question · Appendix C.1, p. 27, directed adjacency and fixed-length existence A delay bound \(D\) determines exactly how much of the deque can affect its next output. Set \(\rho=D+2\). For \(n>2\rho\),

Zenodo (CERN European Organization for Nuclear Research)
University of Glasgow (GB)
semigroups and automata theory
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon