Deterministic Bandwidth of Finite Languages

Da-Jung Cho Email: dajungcho@ajou.ac.kr Affiliation: Ajou University Affiliation: Akita University Affiliation: Kiel University    Szilárd Zsolt Fazekas Email: szilard.fazekas@ie.akita-u.ac.jp    Max Wiedenhöft Email: maw@informatik.uni-kiel.de
Abstract

Bandwidth restricts how far transitions can move under an ordering of the states in an automaton. While every finite language admits a bandwidth-22 NFA representation, the deterministic setting is substantially more restrictive. We investigate the bandwidth of partial DFAs accepting finite languages. We show that bounded bandwidth imposes strong structural restrictions on deterministic representations. We prove that there is an infinite hierarchy of classes of finite languages defined by deterministic bandwidth. As a special case of interest, we consider finite languages accepted by bandwidth-11 partial DFAs, and show that they admit a positional characterization, which yields a polynomial-time decision algorithm. We further study how the minimum DFA bandwidth can be estimated from the structure of the minimal DFA. We derive computable upper and lower bounds based on position-unfolding, and local growth of reachable residual states. These bounds can be computed efficiently and differ by at most a linear factor in the maximum word length. We also present a simple language family where the bounds match exactly.

1 Introduction

Representing finite languages by finite automata is a central problem in automata theory [9]. In many applications, however, the goal is not only to recognize a language, but also to obtain a compact and well-structured representation of it. Recently, finite automata encodings of finite languages were studied in the context of template construction problems for sequential generation systems [6]. The main goal was to construct a single template that generates a desired set of target sequences while avoiding unintended ones. To achieve this, target sequence sets were represented by finite automata and encoded onto circular template structures. In particular, arbitrary regular languages were realized by encoding NFAs into circular DNA templates and simulating their computations through co-transcriptional splicing mechanisms [5, 6]. The size and structure of the encoded automaton directly affect the complexity of the resulting template construction. This naturally leads to the study of automata with local transition behavior. Related structural restrictions on deterministic finite automata have been studied for subregular language classes, including ordered automata [8, 12, 13], although they impose different constraints from bandwidth.

One natural structural restriction is bandwidth [3, 7]. For an ordering of the states, the bandwidth determines the maximum distance that can be traversed by a single transition [6]. Small bandwidth restricts transitions to nearby states and enforces local transition behavior. Our previous work studied k-bandwidth NFAs [4]. In these automata, transitions can skip only a bounded number of states under a suitable ordering of the automaton. We showed that k-bandwidth NFAs form a strict hierarchy of language classes, where increasing the bandwidth strictly increases expressive power. We also proved that every finite language admits a bandwidth-22 NFA representation.

This naturally raises the deterministic counterpart of the problem. Unlike NFAs, DFAs cannot merge computational paths through nondeterminism [9, 11]. All branching behavior must therefore appear explicitly in the automaton structure. Because of this, bandwidth becomes a more restrictive structural property in deterministic automata. Moreover, minimizing the number of states does not necessarily lead to representations with small bandwidth. A minimal DFA may require substantially larger bandwidth than another equivalent deterministic automaton. This suggests that DFA bandwidth captures a structural aspect of deterministic representations that differs fundamentally from classical state complexity measures.

The deterministic case raises several new questions. Does there exist a constant kk such that every finite language can be represented by a k-bandwidth DFA? If not, how does the required bandwidth grow with the structure of the language? Can the minimum bandwidth be estimated from the minimal DFA? More generally, what kinds of finite languages admit low-bandwidth deterministic representations? These questions are fundamentally different from the nondeterministic setting. For NFAs, bandwidth 22 already suffices for all finite languages. In DFAs, however, as we will see, we get an infinite hierarchy of language classes defined by their bandwidth, even if we restrict consideration to finite languages. Similar infinite hierarchies over finite languages have been established for other automata complexity measures, such as union-complexity [10].

In this paper, we study the bandwidth of partial DFAs accepting finite languages. We first investigate the special case of bandwidth 11. We show that finite languages accepted by bandwidth-11 partial DFAs have a positional structure. This characterization leads to a polynomial-time decision algorithm. We then study upper and lower bounds on DFA bandwidth. For the upper bound, we introduce a construction based on unfolding the minimal partial DFA along word positions. For the lower bounds, we analyze the local growth of reachable residual states in the minimal DFA [2]. These bounds can be computed efficiently from the minimal DFA of the language. Together, they provide structural estimates for the minimum DFA bandwidth. We further show that the gap between the upper and lower bounds is bounded linearly by the maximum word length. Finally, we present an infinite language family where the bounds match exactly, albeit using an unbounded alphabet.

These results highlight a clear difference between nondeterministic and deterministic automata. For DFAs, bandwidth becomes closely connected to the structural organization of the language and its residual states.

2 Preliminaries

Let ℕ\N denote the set of positive integers. For some m∈ℕm\in\N, denote by [m][m] the set {1,2,…,m}\{1,2,...,m\}. With Σ\Sigma, we denote a finite set of symbols, called an alphabet. The elements of Σ\Sigma are called letters. A word over Σ\Sigma is a finite sequence of letters from Σ\Sigma. With ε\varepsilon, we denote the empty word. The set of all words over Σ\Sigma is denoted by Σ∗\Sigma^{*}. The length of a word w∈Σ∗w\in\Sigma^{*}, i.e., the number of letters in ww, is denoted by |w||w|; hence, |ε|=0|\varepsilon|=0. For some w∈Σ∗w\in\Sigma^{*}, if w=x​y​zw=xyz for some x,y,z∈Σ∗x,y,z\in\Sigma^{*}, then xx is a prefix, yy is a factor, and zz is a suffix of ww. A nondeterministic finite automaton (NFA) is a tuple A=(Σ,Q,q0,δ,F)A=(\Sigma,Q,q_{0},\delta,F) where Σ\Sigma is the input alphabet, QQ is the finite set of states, δ:Q×Σ→2Q\delta\colon Q\times\Sigma\rightarrow 2^{Q} is the multivalued transition function, q0∈Qq_{0}\in Q is the initial state, and F⊆QF\subseteq Q is the set of final states. In the usual way, δ\delta is extended as a function Q×Σ∗→2QQ\times\Sigma^{*}\rightarrow 2^{Q} and the language accepted by AA is L⁡(A)={w∈Σ∗∣δ⁡(q0,w)∩F≠∅}L(A)=\{w\in\Sigma^{*}\mid\delta(q_{0},w)\cap F\neq\emptyset\}. The automaton AA is a deterministic finite automaton (DFA) if δ\delta is a single valued partial function. It is well known that deterministic and nondeterministic finite automata recognize the class of regular languages [9]. In a previous paper [4], the authors were concerned with the notion of kk-bandwidth NFA.

Definition 1 (kk-bandwidth NFA).

Given k∈ℕk\in\N, an NFA A=(Q,Σ,δ,q0,F)A=(Q,\Sigma,\delta,q_{0},F) is kk-bandwidth (kk-BW-NFA) if the states can be indexed as Q={q0,…,qn−1}Q=\{q_{0},...,q_{n-1}\} such that for all qi,qj∈Qq_{i},q_{j}\in Q and 𝚊∈Σ∪{ε}\ta\in\Sigma\cup\{\varepsilon\}, qj∈δ⁡(qi,𝚊)q_{j}\in\delta(q_{i},\ta) implies 0<(j−i)modn≤k0<(j-i)\bmod n\leq k.

In this paper, we extend the view to the deterministic setting. For practical reasons, in this extension, we ignore sink states and therefore focus on partial DFAs. This goes hand in hand with the practical motivation of using this model in the context of encoding sets of words on DNA templates in the context of co-transcriptional splicing (see Introduction and references therein). We obtain the following definition.

Definition 2 (kk-bandwidth DFA).

Given k∈ℕk\in\N, we say that a partial DFA A=(Q,Σ,δ,q0,F)A=(Q,\Sigma,\delta,q_{0},F) is kk-bandwidth (kk-BW-DFA) if it is also a kk-bandwidth NFA.

2.1 Problems Regarding the Deterministic Bandwidth of Finite Languages

Similarly to the NFA setting, based on the motivation provided in the introduction, we can ask the following practically motivated questions. First, we know that for all finite languages LfL_{f}, there exists a 22-BW-NFA AA such that L⁡(A)=LfL(A)=L_{f}. As such a small constant bound promises a higher practical feasibility, it would be interesting to know whether such a bound also exists in the deterministic setting.

Question 1.

Does there exist a k∈ℕk\in\mathbb{N} such that for all finite languages LfL_{f}, there is a kk-BW-DFA AA with L⁡(A)=LfL(A)=L_{f}?

As we will see later in the paper, the answer to this question is no. Hence, determining the bandwidth necessary to model a given finite language LfL_{f} in a kk-BW-DFA emerges as a relevant problem.

Problem 1.

Given a finite language LfL_{f} and a number k>0k>0, does there exists a kk-BW-DFA AA with L⁡(A)=LfL(A)=L_{f}?

As this problem is likely intractable, given that the bandwidth problem for graphs is NP-hard, even for very restricted graph classes, such as directed acyclic graphs, trees, etc. [3], and even hard to approximate in many cases, here we focus on efficiently computable lower and upper bounds for input finite languages presented as DFA.

Question 2.

Let LfL_{f} be some finite language and let k∈ℕk\in\N be the minimal bandwidth necessary to construct a kk-BW-DFA AA with L⁡(A)=LfL(A)=L_{f}. Can we give efficiently computable nontrivial upper and lower bounds for kk?

Also, similarly to the NFA setting, we could ask whether there exists a strict hierarchy of classes of languages that can be accepted by kk-BW-DFA for all k>0k>0. As mentioned before, we will see that even for finite languages, no constant kk exists that can be used to model all finite languages with kk-BW-DFA. Hence, we can extend the question of the existence of such a hierarchy even to the finite setting.

Question 3.

For every k∈ℕk\in\N, does there exist a finite language LfL_{f} with a minimum DFA bandwidth of exactly kk?

3 The Hierarchy of kk-Bandwidth DFAs

In this section, we are concerned with the last question given in the last section, i.e., the question of whether there exists a strict hierarchy of languages recognized by kk-BW-DFA, based on the selection of kk. For kk-BW-NFA, the existence of such a hierarchy has been shown in [4]. Indeed, the construction given there utilizes partial DFAs already. Hence, in general over all regular languages, we immediately obtain the following result. Let ℒd,k\mathcal{L}_{d,k} be the class of languages recognizable by kk-BW-DFA.

Corollary 1.

[4] The proper inclusion ℒd,k−1⊊ℒd,k\mathcal{L}_{d,k-1}\subsetneq\mathcal{L}_{d,k} holds, for any k≥2k\geq 2, even for binary alphabets Σ\Sigma.

That leaves us with the question whether such a strict hierarchy also exists among the set of finite languages. Let ℒf,k\mathcal{L}_{f,k} be the class of finite languages recognizable by kk-BW-DFA. In [4], we have seen that a bandwidth of 22 suffices to obtain all finite languages. As the following result shows, this does not hold for kk-BW-DFA. Indeed, we obtain the following.

Proposition 2 (Infinite hierarchy).

The proper inclusion ℒf,k−1⊊ℒf,k\mathcal{L}_{f,k-1}\subsetneq\mathcal{L}_{f,k} holds, for any k≥2k\geq 2, even for binary alphabets Σ\Sigma.

Proof.

To show this, for each k≥2k\geq 2, we construct a specific finite language Lf,kL_{f,k}, show that there exists a kk-BW-DFA AA with L⁡(A)=Lf,kL(A)=L_{f,k}, and then show that there cannot exist any (k−1)(k-1)-BW-DFA BB with L⁡(B)=Lf,kL(B)=L_{f,k}. Let Σ={a,b}\Sigma=\{a,b\} be a binary alphabet. We set

Lf,k={ai​bk2​ai∣i∈[k]}L_{f,k}=\{\ a^{i}b^{k^{2}}a^{i}\mid i\in[k]\ \}

as the set of all palindromes with aa-prefixes of lengths 11 to kk and bb-paths of length k2k^{2} in the middle.

First, we observe that we can construct a kk-BW-DFA A=(Q,Σ,δ,q0,F)A=(Q,\Sigma,\delta,q_{0},F) that accepts Lf,kL_{f,k}. Let Q={q0,…,qn}Q=\{q_{0},...,q_{n}\} where n+1=1+k+k⁡(k2+k)n+1=1+k+k(k^{2}+k). We obtain that number by the following intuition of the construction: Starting from the initial state (the 11 in nn), we use the first kk additional states to read the aia^{i} prefixes of each word (the +k+k component in nn). Then, we use kk alternating distinct paths in the automaton that read the bk2​aib^{k^{2}}a^{i} suffixes, respectively (the k⁡(k2+k)k(k^{2}+k) component in kk, where k2+kk^{2}+k is the upper bound of the length |bk2​ai||b^{k^{2}}a^{i}|). Each of these paths utilizes the bandwidth kk fully and starts in the state reached after reading the respective aia^{i} prefix.11 1 Clearly, all but one suffix aia^{i} does not have length kk, hence, this number merely represents an upper bound and could be optimized slightly Figure 1 illustrates this construction.

q0q_{0}q1q_{1}⋯\cdotsqkq_{k}qk+1q_{k+1}⋯\cdotsq2​kq_{2k}q2​k+1q_{2k+1}⋯\cdotsq2​k+2q_{2k+2}aaaaaabbbbbbbb
Figure 1: Illustration of construction of kk-BW-DFA for the prefixes Lf,kL_{f,k}. The remaining suffixes are added by extending the parallel bb-paths until the end of each word and setting the last states to be final, respectively.

Now, suppose towards contradiction that there exists a (k−1)(k-1)-BW-DFA B=(Q,Σ,δ,q0,F)B=(Q,\Sigma,\delta,q_{0},F) with L⁡(B)=Lf,kL(B)=L_{f,k}. Let h=k−1h=k-1. Fix an ordering of the states of BB witnessing bandwidth hh, and let the initial state be the first state in the ordering. We can write the states in this circular order as q0,q1,…,qn−1.q_{0},q_{1},\ldots,q_{n-1}. Thus every defined transition moves forward, modulo nn, by a distance between 11 and hh. The contradiction will be obtained by identifying a cut in this ordering that is crossed by kk distinct bb-transitions, one from each of the kk relevant bb-paths, even though bandwidth h=k−1h=k-1 allows at most hh distinct bb-transitions to cross any fixed cut.

For i∈[k]i\in[k] and 0≤t≤k20\leq t\leq k^{2}, let

si,t=δ⁡(q0,ai​bt).s_{i,t}=\delta(q_{0},a^{i}b^{t}).

These states are all defined, since ai​bk2​ai∈Lf,ka^{i}b^{k^{2}}a^{i}\in L_{f,k}. We first observe that the states si,ts_{i,t} are pairwise distinct. Indeed, suppose that si,t=sj,us_{i,t}=s_{j,u} for some i,j∈[k]i,j\in[k] and 0≤t,u≤k20\leq t,u\leq k^{2}. Since

δ⁡(si,t,bk2−t​ai)∈F,\delta(s_{i,t},b^{k^{2}-t}a^{i})\in F,

we also have

δ⁡(sj,u,bk2−t​ai)∈F.\delta(s_{j,u},b^{k^{2}-t}a^{i})\in F.

Hence

aj​bu+k2−t​ai∈L⁡(B)=Lf,k.a^{j}b^{u+k^{2}-t}a^{i}\in L(B)=L_{f,k}.

By the definition of Lf,kL_{f,k}, this is possible only if i=ji=j and u=tu=t. Thus all states si,ts_{i,t} are pairwise distinct. In particular,

n≥k⁡(k2+1).n\geq k(k^{2}+1).

Consider now the states si,0=δ⁡(q0,ai)s_{i,0}=\delta(q_{0},a^{i}), for i∈[k]i\in[k]. Since each transition has circular distance at most hh, the state si,0s_{i,0} is reached from q0q_{0} by moving forward by total distance at most i​hih. Moreover,

i​h≤k​h=k⁡(k−1)<k⁡(k2+1)≤n,ih\leq kh=k(k-1)<k(k^{2}+1)\leq n,

so no wrap-around (going from qjq_{j} to qj′q_{j}^{\prime}, for some j′≤jj^{\prime}\leq j) can occur while reading any of the prefixes aia^{i}. Therefore all states si,0s_{i,0} lie in the interval

P={q0,q1,…,qk​h}P=\{q_{0},q_{1},\ldots,q_{kh}\}

of the circular ordering. Now let CC be the (graph) cut immediately after qk​hq_{kh}. We claim that, for every i∈[k]i\in[k], the path

si,0,si,1,…,si,k2s_{i,0},s_{i,1},\ldots,s_{i,k^{2}}

labelled by bk2b^{k^{2}} contains a bb-transition crossing the cut CC. Indeed, if this path did not cross CC, then, starting in PP, it would remain entirely inside PP. But the path contains k2+1k^{2}+1 pairwise distinct states, whereas

|P|=k​h+1=k⁡(k−1)+1=k2−k+1<k2+1.|P|=kh+1=k(k-1)+1=k^{2}-k+1<k^{2}+1.

This is impossible, so each of the kk paths labelled by bk2b^{k^{2}} contains a first bb-transition crossing the cut CC.

These kk crossing transitions are distinct, because all states si,ts_{i,t} are pairwise distinct. On the other hand, in a circular bandwidth-hh ordering, at most hh distinct bb-transitions can cross a fixed cut. Indeed, the source state of any transition crossing CC must lie among the hh states immediately preceding the cut, and by determinism each such state has at most one outgoing bb-transition. Therefore at most h=k−1h=k-1 distinct bb-transitions can cross CC. However, we have just obtained kk distinct bb-transitions crossing the same cut above, contradicting h=k−1h=k-1. Thus no (k−1)(k-1)-BW-DFA accepts Lf,kL_{f,k}. Therefore

Lf,k∈ℒf,k∖ℒf,k−1,L_{f,k}\in\mathcal{L}_{f,k}\setminus\mathcal{L}_{f,k-1},

and the inclusion is proper.

∎

In contrast to the results obtained for NFAs, we see that no constant kk suffices to obtain all finite languages with kk-BW-DFAs. Related to the practical motivation for this model, we hence know that we also have to increase the maximal achievable size of a removed factor by co-transcriptional splicing to increase even the number of finite languages that we can express using that operation, if we want to encode deterministic finite automata. For that reason, in the following sections, we now investigate specific questions regarding the required bandwidth to encode given finite languages using kk-BW-DFAs.

4 Testing bandwidth 1 for finite languages

From potential practical applications’ point of view, one would like to minimize the distances between consecutive states in the linear encodings of automata similar to the circular DNA one mentioned in the introduction. The minimal non-trivial bound on those distances is 11, therefore, deciding whether a language can be encoded with bandwidth 11 is potentially of high practical interest. Bandwidth 11 forces the automaton to use a unique single following state to which all outgoing transitions of a state must lead. In the deterministic setting, the highly restrictive behavior of 11-BW-DFA leads to the following result.

Theorem 3.

Let M=(Q,Σ,δ,q0,F)M=(Q,\Sigma,\delta,q_{0},F) be a DFA accepting a finite language. One can decide in O⁡(|Q|3​|Σ|)O(|Q|^{3}|\Sigma|) time whether L⁡(M)L(M) is accepted by a bandwidth 11 partial DFA.

Proof.

First we test whether L⁡(M)L(M) is finite. This is done by standard algorithms, deleting states that are not both reachable and co-reachable, and checking whether the remaining directed graph has a cycle. If such a cycle exists, then L⁡(M)L(M) is infinite, so we can answer NO. Otherwise the useful part is acyclic, so from now on we will assume that MM has only useful states and is acyclic.

In such a bandwidth 11 DFA, from each state qiq_{i}, every defined transition goes to the unique next state qi+1q_{i+1}. Since the automaton is acyclic, no transition can wrap from the last state of the circular ordering back to the first, otherwise it would create a directed cycle reachable from q0q_{0} and co-reachable to a final state. Thus, such an automaton is described by letter sets

A1,A2,…,AN⊆ΣA_{1},A_{2},\ldots,A_{N}\subseteq\Sigma

and a set I⊆{0,…,N}I\subseteq\{0,\ldots,N\} of final state positions. It accepts the language

⋃i∈IA1A2⋯Ai.\bigcup_{i\in I}A_{1}A_{2}\cdots A_{i}.

Now let

N=max⁡{|w|∣w∈L⁡(M)}.N=\max\{|w|\mid w\in L(M)\}.

Since the DFA is acyclic, N≤|Q|−1N\leq|Q|-1, and NN can be computed by standard dynamic programming algorithms for longest path in O⁡(|Q|+|δ|)O(|Q|+|\delta|) time. Next, for t=0,…,Nt=0,\ldots,N, we define the forward layers

Fwd⁡[t]={δ⁡(q0,x)∣x∈Σt}.\mathrm{Fwd}[t]=\{\delta(q_{0},x)\mid x\in\Sigma^{t}\}.

and the backward layers

Back[t]={q∈Q∣∃y∈Σt,δ(q,y)∈F}.\mathrm{Back}[t]=\{q\in Q\mid\exists y\in\Sigma^{t},\ \delta(q,y)\in F\}.

These sets are computed recursively:

Fwd⁡[0]={q0},Fwd⁡[t+1]=δ⁡(Fwd⁡[t],Σ),\mathrm{Fwd}[0]=\{q_{0}\},\qquad\mathrm{Fwd}[t+1]=\delta(\mathrm{Fwd}[t],\Sigma),

and

Back[0]=F,Back[t+1]={q∈Q∣∃a∈Σ,δ(q,a)∈Back[t]}.\mathrm{Back}[0]=F,\qquad\mathrm{Back}[t+1]=\{q\in Q\mid\exists a\in\Sigma,\ \delta(q,a)\in\mathrm{Back}[t]\}.

At each recursion level tt, we can add at most min⁡{|Q|,m​|Σ|}\min\{|Q|,m|\Sigma|\} states to the forward/backward layer, where mm is the number of states in the previous layer, so one layer can be computed in O⁡(|Q|​|Σ|)O(|Q||\Sigma|) time and there are O⁡(N)O(N) layers. For each i∈[N]i\in[N], define

Ai={a∈Σ∣∃q∈Fwd⁡[i−1]​ such that ​δ​(q,a)∈Back⁡[N−i]}.A_{i}=\{a\in\Sigma\mid\exists q\in\mathrm{Fwd}[i-1]\text{ such that }\delta(q,a)\in\mathrm{Back}[N-i]\}.

AiA_{i} is exactly the set of letters that occur in position ii among the accepted words of maximum length NN. For each ii, we can compute AiA_{i} in time O⁡(|Q|​|Σ|)O(|Q||\Sigma|). Altogether we get all AiA_{i} in time O⁡(|Q|2​|Σ|)O(|Q|^{2}|\Sigma|).

Let

I={i∈{0,…,N}∣Fwd⁡[i]∩F≠∅}.I=\{i\in\{0,\ldots,N\}\mid\mathrm{Fwd}[i]\cap F\neq\emptyset\}.

Now construct a partial DFA BB with states

0,1,…,N.0,1,\ldots,N.

The initial state is 00, and the final states are the positions in II. For i=1,…,Ni=1,\ldots,N, and a∈Aia\in A_{i}, we set δB​(i−1,a)=i\delta_{B}(i-1,a)=i. Then

L(B)=⋃i∈IA1A2⋯Ai.L(B)=\bigcup_{i\in I}A_{1}A_{2}\cdots A_{i}.

We claim that L⁡(M)L(M) has a bandwidth 11 partial DFA representation if and only if L⁡(M)=L⁡(B).L(M)=L(B).

Indeed, if such a representation exists, then every accepted word of maximum length NN traverses all NN transitions. Hence the ii-th transition must be carry each letter occurring in position ii among the maximum-length words. Therefore the label of the transition is exactly AiA_{i}. Also, a state ii must be final when L⁡(M)L(M) contains a word of length ii, that is, when i∈Ii\in I. Hence, the representation is exactly BB.

Conversely, if L⁡(M)=L⁡(B)L(M)=L(B), then BB itself is a bandwidth 11 partial DFA accepting L⁡(M)L(M).

Finally, DFA equivalence is decidable in O⁡(|Σ|​N2)O(|\Sigma|N^{2}) by standard algorithms. ∎

5 Bounds on the DFA bandwidth of finite languages

In this section we establish some nontrivial upper and lower bounds on the DFA bandwidth of finite languages, with a worst-case multiplicative gap of O⁡(D)O(D) between the bounds, where DD is the length of the longest word in the language. The bounds we present can be efficiently computed from the minimal partial DFA accepting the languages.

The languages ∅\emptyset and {ε}\{\varepsilon\} have trivially DFA bandwidth 11. From here on, throughout this section, we assume that the finite languages LL considered contain at least one nonempty word.

5.1 DFA bandwidth upper bound for finite languages

Let L⊆Σ∗L\subseteq\Sigma^{*} be finite, and let M=(Q,Σ,δ,q0,F)M=(Q,\Sigma,\delta,q_{0},F) be the (unique) minimal partial DFA recognizing LL. As we work with partial DFAs and finite languages, the minimal automata under consideration are acyclic (no sink state needed). This implies that the minimal partial DFA must always have at least one state with no outgoing transitions. All such states must be final, otherwise they could be removed, given that no final state would be reachable from them, contradicting the minimality of MM. If there were more than one final state with no outgoing transitions, they could be merged without affecting the languages. Therefore, the minimal partial DFA has at most one state with no outgoing transitions, which is a final state that we call ff. As the minimal partial DFA do not have useless states, we can also conclude that ff is reachable from all the other states.

Definition 3.

For a finite language LL, let bwDFA⁡(L)\operatorname{bw}_{\mathrm{DFA}}(L) denote the minimum bandwidth among all partial DFAs recognizing LL.

Theorem 4 (Position-unfolding upper bound).

Let L⊆Σ∗L\subseteq\Sigma^{*} be finite, let MM be the minimal partial DFA recognizing LL, and let D=max⁡{|w|∣w∈L}D=\max\{|w|\mid w\in L\}. For 0≤i≤D0\leq i\leq D, let

Hi={δ⁡(q0,w)∣w∈Σi​ and ​δ​(q0,w)​ is defined},hi=|Hi|,H_{i}=\{\delta(q_{0},w)\mid w\in\Sigma^{i}\text{ and }\delta(q_{0},w)\text{ is defined}\},\qquad h_{i}=|H_{i}|,

and define

U⁡(L)=max1≤i≤D⁡(hi−1+hi−1).U(L)=\max_{1\leq i\leq D}(h_{i-1}+h_{i}-1).

Then

bwDFA⁡(L)≤U⁡(L).\operatorname{bw}_{\mathrm{DFA}}(L)\leq U(L).
Proof.

We construct a position-unfolding of the minimal DFA.

For every i≥0i\geq 0, let

Vi={(q,i)∣q∈Hi}.V_{i}=\left\{(q,i)\mid q\in H_{i}\right\}.

Thus ViV_{i} consists of the states of the minimal DFA that occur after reading exactly ii symbols of some accepted word.

Define a partial DFA M′M^{\prime} as follows. Its state set is V=⋃i≥0Vi.V=\bigcup_{i\geq 0}V_{i}. The initial state is (q0,0)(q_{0},0). Its accepting states are

G={(q,i)∈Vi∣q∈F}.G=\left\{(q,i)\in V_{i}\mid q\in F\right\}.

For a state (p,i−1)∈Vi−1(p,i-1)\in V_{i-1} and a letter a∈Σa\in\Sigma, define

δ′​((p,i−1),a)=(q,i)\delta^{\prime}((p,i-1),a)=(q,i)

if and only if in MM we have δ⁡(p,a)=q.\delta(p,a)=q.

Because MM is deterministic, M′M^{\prime} is also deterministic. Moreover, M′M^{\prime} accepts the same language as MM: every accepting computation of MM on a word w∈Lw\in L corresponds to a unique path in M′M^{\prime}, and conversely every accepting path in M′M^{\prime} projects to an accepting path in MM at the same sequence of positions.

The automaton M′M^{\prime} is layered in the sense that its state set is the union of V0,V1,V2,…,V_{0},V_{1},V_{2},\ldots, and every transition goes from Vi−1V_{i-1} to ViV_{i} for some i≥1i\geq 1.

Now order the states layer by layer:

V0,V1,V2,…V_{0},\ V_{1},\ V_{2},\ \ldots

with an arbitrary order inside each layer. Since all transitions go from one layer to the next, this is a topological ordering of the states. Consider a transition from Vi−1V_{i-1} to ViV_{i}. In the worst case, its source state is the first state of Vi−1V_{i-1}, and its target is the last state of ViV_{i}, giving the largest distance in the topological ordering between any pair of states from Vi−1V_{i-1} and ViV_{i}, respectively. This distance is at most

|Vi−1|+|Vi|−1.|V_{i-1}|+|V_{i}|-1.

Since |Vi|=hi|V_{i}|=h_{i}, this layer-by-layer ordering has bandwidth at most

max1≤i≤D⁡(hi−1+hi−1)=U⁡(L).\max_{1\leq i\leq D}(h_{i-1}+h_{i}-1)=U(L).

∎

In what follows let U⁡(L)U(L) denote the position-unfolding upper bound on the DFA bandwidth of a finite language LL, from Theorem 4.

5.2 DFA bandwidth lower bound for finite languages

Let L⊆Σ∗L\subseteq\Sigma^{*} be finite, and let

M=(Q,Σ,δ,q0,F)M=(Q,\Sigma,\delta,q_{0},F)

be the minimal partial DFA recognizing LL (no sink state). Every state p∈Qp\in Q of the minimal DFA represents a residual language

RM​(p)={z∈Σ∗∣δ⁡(p,z)∈F}.R_{M}(p)=\{z\in\Sigma^{*}\mid\delta(p,z)\in F\}.

If pp is reached from q0q_{0} by a word uu, then RM​(p)=u−1​L,R_{M}(p)=u^{-1}L, where u−1​L={v∣u​v∈L}u^{-1}L=\{v\mid uv\in L\} is the left-quotient of LL by uu. Note that for two words u,vu,v, if δ⁡(q0,u)=δ⁡(q0,v)=p\delta(q_{0},u)=\delta(q_{0},v)=p, then u−1​L=v−1​L=RM​(p)u^{-1}L=v^{-1}L=R_{M}(p).

In the minimal partial DFA for LL, for p∈Qp\in Q and ℓ≥0\ell\geq 0, define

Bℓ(p)={r∈Q∣∃x∈Σ∗,|x|≤ℓ,δ(p,x)=r},B_{\ell}(p)=\left\{r\in Q\mid\exists x\in\Sigma^{*},\ |x|\leq\ell,\ \delta(p,x)=r\right\},

in words, Bℓ​(p)B_{\ell}(p) denotes the “ball” of radius ℓ\ell around pp.

Theorem 5 (Residual-ball lower bound).

For every finite language LL,

bwDFA⁡(L)≥maxp∈Q,ℓ≥1⁡⌈|Bℓ​(p)|−1ℓ⌉.\operatorname{bw}_{\mathrm{DFA}}(L)\geq\max_{p\in Q,\ \ell\geq 1}\left\lceil\frac{|B_{\ell}(p)|-1}{\ell}\right\rceil.
Proof.

Let AA be a partial DFA recognizing LL, and suppose AA has bandwidth at most kk. To easily distinguish the components of the two DFAs MM and AA, we will subscript them with the automaton’s name, e.g., QMQ_{M} and QAQ_{A} denote the state set of MM and AA, respectively. For a given state pMp_{M} of the minimal DFA accepting LL, choose a state pAp_{A} of AA whose residual is the same as pMp_{M}’s. This is always possible, since for any word uu for which δM​(q0,u)=pM\delta_{M}(q_{0},u)=p_{M}, the state pA=δA​(q0,u)p_{A}=\delta_{A}(q_{0},u) has the same residual as pMp_{M}, that is, RM​(pM)=RA​(pA)R_{M}(p_{M})=R_{A}(p_{A}).

Every state reachable from pAp_{A} by a word of length at most ℓ\ell must appear within circular distance at most ℓ​k\ell k from pAp_{A} in the bandwidth ordering. Let n=|QM|n=|Q_{M}|. Since MM is minimal, every DFA recognizing LL, including AA, has at least nn states. If ℓ​k<n\ell k<n, then ℓ​k<|QA|\ell k<|Q_{A}|, so all these states lie in an arc of size at most ℓ​k+1\ell k+1. If ℓ​k≥n\ell k\geq n, then the inequality |Bℓ​(pM)|−1≤ℓ​k|B_{\ell}(p_{M})|-1\leq\ell k is trivial. On the other hand, the distinct residuals of states in Bℓ​(pM)B_{\ell}(p_{M}) require distinct states of AA. Hence

|Bℓ​(pM)|−1≤ℓ​k.|B_{\ell}(p_{M})|-1\leq\ell k.

Therefore

k≥⌈|Bℓ​(pM)|−1ℓ⌉.k\geq\left\lceil\frac{|B_{\ell}(p_{M})|-1}{\ell}\right\rceil.

Taking the maximum over pMp_{M} and ℓ\ell gives the result. ∎

We denote the lower bound in Theorem 5 by

LBball​(L)=maxp∈Q,ℓ≥1⁡⌈|Bℓ​(p)|−1ℓ⌉.\mathrm{LB}_{\mathrm{ball}}(L)=\max_{p\in Q,\ \ell\geq 1}\left\lceil\frac{|B_{\ell}(p)|-1}{\ell}\right\rceil.

5.3 Gap between bounds

Recall from Theorem 4, the notation, for i≥0i\geq 0,

Hi={q∈Q∣ some word of ​L​ reaches ​q​ after exactly ​i​ letters},hi=|Hi|,H_{i}=\{q\in Q\mid\text{ some word of }L\text{ reaches }q\text{ after exactly }i\text{ letters}\},\qquad h_{i}=|H_{i}|,

and with D=max⁡{|w|∣w∈L}D=\max\{|w|\mid w\in L\}, the position-unfolding upper bound

U⁡(L)=max1≤i≤D⁡(hi−1+hi−1).U(L)=\max_{1\leq i\leq D}(h_{i-1}+h_{i}-1).
Theorem 6.

Let LL be a finite language. Then,

LBball​(L)≤bwDFA⁡(L)≤U⁡(L)≤1+(2​D−1)​LBball​(L).\mathrm{LB}_{\mathrm{ball}}(L)\leq\operatorname{bw}_{\mathrm{DFA}}(L)\leq U(L)\leq 1+(2D-1)\mathrm{LB}_{\mathrm{ball}}(L).
Proof.

By Theorem 5 and Theorem 4,

LBball​(L)≤bwDFA⁡(L)≤U⁡(L).\mathrm{LB}_{\mathrm{ball}}(L)\leq\operatorname{bw}_{\mathrm{DFA}}(L)\leq U(L).

We now compare these two quantities. Since every state occurring after exactly ii letters is reachable from q0q_{0} by a word of length at most ii, we have

Hi⊆Bi​(q0).H_{i}\subseteq B_{i}(q_{0}).

Hence, by the definition of LBball​(L)\mathrm{LB}_{\mathrm{ball}}(L),

hi≤|Bi​(q0)|≤1+i​LBball​(L).h_{i}\leq|B_{i}(q_{0})|\leq 1+i\,\mathrm{LB}_{\mathrm{ball}}(L).

Therefore, for every 1≤i≤D1\leq i\leq D,

hi−1+hi−1≤(1+(i−1)​LBball​(L))+(1+i​LBball​(L))−1.h_{i-1}+h_{i}-1\leq\bigl(1+(i-1)\mathrm{LB}_{\mathrm{ball}}(L)\bigr)+\bigl(1+i\mathrm{LB}_{\mathrm{ball}}(L)\bigr)-1.

Thus

hi−1+hi−1≤1+(2​i−1)​LBball​(L)≤1+(2​D−1)​LBball​(L).h_{i-1}+h_{i}-1\leq 1+(2i-1)\mathrm{LB}_{\mathrm{ball}}(L)\leq 1+(2D-1)\mathrm{LB}_{\mathrm{ball}}(L).

Taking the maximum over ii gives

U⁡(L)≤1+(2​D−1)​LBball​(L).U(L)\leq 1+(2D-1)\mathrm{LB}_{\mathrm{ball}}(L).

∎

Consequently, the residual-ball lower bound and the position-unfolding upper bound give an 2​D2D-approximation of the DFA bandwidth of finite languages. Moreover, both bounds are polynomial-time computable from the minimal partial DFA MM. The sets HiH_{i} required for the upper bound can be computed by dynamic programming following their definition, and then U⁡(L)U(L) is obtained by a maximum search. For the lower bound, it is easy to see that it is enough to consider balls of radius at most |Q|−1|Q|-1, since the shortest path between any two states cannot be longer than that. Then, one can compute Bℓ​(p)B_{\ell}(p) for all p∈Qp\in Q and 0≤ℓ<|Q|−10\leq\ell<|Q|-1 by dynamic programming.

Example 1 (Matching bounds).

Fix integer r≥1r\geq 1 and let

Σr={a1,…,ar,b1,…,br}.\Sigma_{r}=\{a_{1},\ldots,a_{r},b_{1},\ldots,b_{r}\}.

Define

Lr={aj​bj∣1≤j≤r}.L_{r}=\{a_{j}b_{j}\mid 1\leq j\leq r\}.

The minimal partial DFA accepting LrL_{r} consists of rr paths

q0→ajpj→bjf,q_{0}\xrightarrow{a_{j}}p_{j}\xrightarrow{b_{j}}f,

one for each j=1,…,rj=1,\ldots,r, with the final state ff shared by all paths.

The states pjp_{j} have pairwise distinct residuals, since the unique continuation from pjp_{j} is bjb_{j}. Thus, the initial state has rr distinct successor residuals. Hence every partial DFA recognizing LrL_{r} has bandwidth at least rr:

bwDFA⁡(Lr)≥r.\operatorname{bw}_{\mathrm{DFA}}(L_{r})\geq r.

Conversely, order the states as

q0,p1,…,pr,f.q_{0},p_{1},\ldots,p_{r},f.

Every transition is between states at a distance at most rr in the linear ordering above. Thus

bwDFA⁡(Lr)≤r.\operatorname{bw}_{\mathrm{DFA}}(L_{r})\leq r.

Therefore

bwDFA⁡(Lr)=r.\operatorname{bw}_{\mathrm{DFA}}(L_{r})=r.

For the position-unfolding upper bound we have h0=1h_{0}=1, h1=rh_{1}=r and h2=1h_{2}=1, and we get

U⁡(Lr)=max⁡{h0+h1−1,h1+h2−1}=r.U(L_{r})=\max\{h_{0}+h_{1}-1,h_{1}+h_{2}-1\}=r.

For the lower bound, we get

B1​(q0)={q0,p1,1,…,pr,1},B_{1}(q_{0})=\{q_{0},p_{1,1},\ldots,p_{r,1}\},

therefore

LBball​(Lr)≥|B1​(q0)|−1=r.\mathrm{LB}_{\mathrm{ball}}(L_{r})\geq|B_{1}(q_{0})|-1=r.

This, together with LBball​(Lr)≤bwDFA⁡(Lr)=r,\mathrm{LB}_{\mathrm{ball}}(L_{r})\leq\operatorname{bw}_{\mathrm{DFA}}(L_{r})=r, implies LBball​(Lr)=r.\mathrm{LB}_{\mathrm{ball}}(L_{r})=r. Thus the bounds meet exactly, for the infinite family {Lr∣r≥1}\{L_{r}\mid r\geq 1\}, that is,

U⁡(Lr)=LBball​(Lr)=r,∀r≥1.U(L_{r})=\mathrm{LB}_{\mathrm{ball}}(L_{r})=r,\quad\forall r\geq 1.

6 Final Discussion

We extended the notion of bandwidth for finite automata to the deterministic setting by applying it to partial DFAs. In that context, we have seen that, even for finite languages, a strict infinite hierarchy of language classes defined by bandwidth can be proven (see Figure 2). Therefore, in contrast to the nondeterministic setting, there does not exist any constant kk such that all finite languages can be accepted by kk-BW-DFAs. For bandwidth k=1k=1, we obtained polynomial time decidability for the question whether a 11-BW-DFA AA with L⁡(A)=LfL(A)=L_{f} exists for a given finite language LfL_{f} represented by some DFA. For arbitrary kk, and DFAs AA, whether such an efficient decision procedure exists, remains an open problem that could indeed turn out to be NP-hard. Nonetheless, given an arbitrary DFA AA, we provided efficiently computable upper and lower bounds for the minimal bandwidth kk needed to encode L⁡(A)L(A) in a kk-BW-DFA, having a multiplicative gap bounded by 2​D2D, where DD is the length of the longest word in L⁡(A)L(A). An example provided showed that there exist input DFAs that hit both bounds simultaneously, resulting in the ability to determine the necessary bandwidth kk efficiently. However, the example construction uses an unbounded alphabet that grows with the bandwidth. It is left as future work to determine whether the bounds meet for an infinite family of finite languages over a fixed alphabet.

⋮\vdotsℒf,k\mathcal{L}_{f,k}{ai​bk2​ai∣i∈[m]}\{a^{i}b^{k^{2}}a^{i}\mid i\in[m]\}⋮\vdotsℒf,2\mathcal{L}_{f,2}{a​b4​a,a​a​b4​a​a}\{ab^{4}a,aab^{4}aa\}ℒf,1\mathcal{L}_{f,1}{a​b​a}\{aba\}
Figure 2: A relationship among ℒf,1,ℒf,2,…,ℒf,k,…\mathcal{L}_{f,1},\mathcal{L}_{f,2},\ldots,\mathcal{L}_{f,k},\ldots, established in Proposition 2.

These results extend the solid foundation for relevant questions regarding the optimization of finite automata that are to be encoded on circular DNA for RNA transcription. In particular, they provide a deeper insight if we assume the given automata to be deterministic. In future work, several problems are to be considered. First of all, we would like to know if it can be generally efficiently decided whether a given bandwidth kk suffices to encode the language L⁡(A)L(A) of a given DFA AA in a kk-BW-DFA. In addition to that, the question of minimization has not been tackled for DFAs, yet. For NFAs and unbounded alphabets, we know from previous work the NP-hardness of the question for a given finite language LfL_{f}, a bandwidth kk and a maximum number of states nn, whether an nn-state kk-BW-NFA AA with L⁡(A)=LfL(A)=L_{f} exists or not. Whether such a result also holds for DFAs, remains an open question. Especially for bounded alphabets.

Here we were primarily concerned with finite languages and exact matching, therefore extending this investigation to arbitrary regular languages represented by DFAs or to an approximate setting where some unwanted words with certain properties might still be allowed, could be a worthwhile direction for future research.

Finally let us raise a point about the definition of bandwidth. The well-established notion of bandwidth of a graph is defined slightly differently than how we did, by taking the maximum of the absolute value between the indices of two vertices (states) connected by an edge, over all vertex pairs. We defined the distance modulo the number of states rather than adapting the graph definition, because in the setting where the problem occurred [6], the automata were embedded in a circular medium where repeating a transition costs a full circle (hence our definition 0<(j−i)modn≤k0<(j-i)\bmod n\leq k), making it undesirable. However, depending on the one-dimensional medium considered for the encoding, it may make just as much sense to directly adapt the graph definition (|j−i||j-i|), for instance, if one considers a bounded tape with bidirectional head movements for reading the transitions. We think that at least in the case of finite languages (accepted by DFA with acyclic transition graphs) most of our techniques and proof ideas work with the other definition, up to minor changes in the proof details, but leave the treatment of the other naturally defined bandwidth notion as future work, and note that in the case of infinite languages, the differences might be substantial.

Acknowledgements.

We would like to thank the anonymous referees for their detailed suggestions for improvements, which led, in particular, to a cleaner presentation of the bounds in Section 5 and the correction of Example 1.

This work was supported by grants funded by the Korea government (MSIT): the Institute of Information & Communications Technology Planning & Evaluation (IITP) under the Artificial Intelligence Convergence Innovation Human Resources Development Program (IITP-2026-RS-2023-00255968) and the National Research Foundation of Korea (NRF) (RS-2025-25436818), awarded to D.-J. C. This work was also supported by JSPS KAKENHI Grant Number JP23K10976, awarded to S. Z. F. In addition, M. W. gratefully acknowledges Dirk Nowotka of Kiel University for his support and encouragement in participating in this collaboration.

References

  • [2] Janusz A. Brzozowski (1964): Derivatives of Regular Expressions. Journal of the ACM 11(4), pp. 481–494, 10.1145/321239.321249.
  • [3] Phyllis Z Chinn, Jarmila Chvátalová, Alexander K Dewdney & Norman E Gibbs (1982): The bandwidth problem for graphs and matrices—a survey. Journal of Graph Theory 6(3), pp. 223–254, 10.1002/jgt.3190060302.
  • [4] Da-Jung Cho, Szilárd Zsolt Fazekas, Daihei Ise, Shinnosuke Seki, Wataru Tamehira & Max Wiedenhöft (2026): Bandwidth of Nondeterministic Finite Automata. In Taylor J. Smith, editor: Implementation and Application of Automata (CIAA 2026), Springer Nature Switzerland, pp. 32–46, 10.1007/978-3-032-31176-4_3.
  • [5] Da-Jung Cho, Szilárd Zsolt Fazekas, Shinnosuke Seki & Max Wiedenhöft (2025): A formalization of co-transcriptional splicing as an operation on formal languages. Natural Computing 24(4), pp. 991–1009, 10.1007/s11047-025-10051-8.
  • [6] Da-Jung Cho, Szilárd Zsolt Fazekas, Shinnosuke Seki & Max Wiedenhöft (2025): Programmable Co‑Transcriptional Splicing: Realizing Regular Languages via Hairpin Deletion. In: 31st International Conference on DNA Computing and Molecular Programming (DNA 31), Leibniz International Proceedings in Informatics (LIPIcs) 347, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, pp. 5:1–5:22, 10.4230/LIPIcs.DNA.31.5.
  • [7] Lawrence Hueston Harper (2006): Global methods for combinatorial isoperimetric problems. 90, Cambridge University Press, 10.1017/CBO9780511616679.
  • [8] Markus Holzer & Bianca Truthe (2015): On relations between some subregular language families. In: 7th Workshop on Non-Classical Models of Automata and Applications (NCMA 2015), pp. 109–124.
  • [9] John E. Hopcroft & Jeffrey D. Ullman (1979): Introduction to Automata Theory, Languages and Computation. Addison-Wesley.
  • [10] Benedek Nagy (2019): Union-freeness, deterministic union-freeness and union-complexity. In: 21st International Conference on Descriptional Complexity of Formal Systems (DCFS 2019), Springer, pp. 46–56, 10.1007/978-3-030-23247-4_3.
  • [11] William J. Sakoda & Michael Sipser (1978): Nondeterminism and the Size of Two Way Finite Automata. Proceedings of the Tenth Annual ACM Symposium on Theory of Computing (STOC 1978), pp. 275–286, 10.1145/800133.804357.
  • [12] Huei Jang Shyr & Gabriel Thierrin (1974): Ordered automata and associated languages. Tamkang Journal of Mathematics 5(1), pp. 9–20.
  • [13] Bianca Truthe (2014): A relation between definite and ordered finite automata. In: 6th Workshop on Non-Classical Models of Automata and Applications (NCMA 2014), pp. 235–247.