arXiv:2608.30928cs.FLAug 2026

Manuscript Offprint

arXiv:2608.30928

Further Remarks on Separating Words

John Nicol

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We revisit questions on separating words raised by Demaine, Eisenstat, Shallit, and Wilson, together with Ebrahimnejad's follow-up to their reversal problem. For length-n pairs whose difference word has d runs, we prove an O(dlog⁡n)O(d \log n) bound, extending the Hamming-distance theorem of Demaine et al. For conjugate words, we give bounds controlled by the arithmetic of the shift. We resolve Demaine et al.'s Open Problem 2 by showing that the order of two words can change nondeterministic separation by an unbounded factor. Our reversal construction addresses Ebrahimnejad's follow-up to Open Problem 1: forward and reversed deterministic separation can differ by an unbounded factor. Since nondeterministic separation is invariant under reversal, the same construction also improves the lower bound in Open Problem 3.

1. Introduction

A deterministic finite automaton (DFA) separates two distinct words if it accepts one and rejects the other.

The problem was introduced by Goralčík and Koubek [1]. Robson obtained the long-standing O(n2/5(log⁡n)3/5)O(n^{2/5}(\log n)^{3/5})-state upper bound and also studied separation by automata whose transition monoids are groups [2, 3]. A 2011 paper of Demaine, Eisenstat, Shallit, and Wilson surveyed the subject and posed questions for several restrictions and variants [4]. Subsequent lower-bound work developed the connection with identities in finite transformation semigroups and symmetric groups [5]. More recently, Chase [6] improved the upper bound to O(n1/3(log⁡n)7)O(n^{1/3}(\log n)^{7}) states.

We organize this paper around the questions in [4]. Sections 2 and 3 revisit its results and questions for words with additional structure: runs of differences and cyclic shifts. Sections 4 and 5 address its three open problems, together with Ebrahimnejad's follow-up question to Open Problem 1 [7].

Theorem 2 of [4] shows that hh differing positions (a Hamming distance of hh) can be detected with O(hlog⁡n)O(h \log n) states. We generalize this to detecting dd runs of differences in O(dlog⁡n)O(d \log n) states, regardless of how many positions differ. This also addresses a remark in [6].

Section 5.2 of [4] asks whether conjugate words, which are related by a cyclic shift, are easier to separate. We show that a shift with large greatest common divisor contains an arbitrary shorter separating-words instance, while a shift with small greatest common divisor can be handled by a small fingerprint.

Open Problem 2 asks whether swapping the accepted and rejected words can change nondeterministic separation by an unbounded amount. We show that both the difference and the ratio can be arbitrarily large, even for equal-length binary words that differ in only two positions.

Open Problem 1 asks whether reversal can change deterministic separation by an unbounded amount. Ebrahimnejad proved that the difference is unbounded and asked whether there is a good upper bound on the corresponding ratio [7]. We rule out a constant upper bound by constructing pairs for which forward separation needs more than N states while reversed separation needs only O(log⁡N)O(\log N) states.

Open Problem 3 asks for better bounds on the ratio between deterministic and nondeterministic separation as a function of the common word length. Since nondeterministic separation is unchanged by reversal, the same construction improves its lower bound from Ω(log⁡L)\Omega(\sqrt{\log L}) to Ω(log⁡L/(log⁡log⁡L)2)\Omega(\log L/(\log \log L)^2) for every sufficiently large LL.

We state the reversal theorem in Section 4.2, where it is used for nondeterministic separation, and defer its proof to the final section. We write sep(w,x)\text{sep}(w, x) for the number of states in the smallest DFA separating words ww and xx. Unless stated otherwise, all words are binary and all DFAs are complete. All logarithms are to base 2.