English

(Sets of ) Complement Scattered Factors

Data Structures and Algorithms 2026-03-24 v1 Formal Languages and Automata Theory Combinatorics

Abstract

Starting in the 1970s with the fundamental work of Imre Simon, \emph{scattered factors} (also known as subsequences or scattered subwords) have remained a consistently and heavily studied object. The majority of work on scattered factors can be split into two broad classes of problems: given a word, what information, in the form of scattered factors, are contained, and which are not. In this paper, we consider an intermediary problem, introducing the notion of \emph{complement scattered factors}. Given a word ww and a scattered factor uu of ww, the complement scattered factors of ww with regards to uu, C(w,u)C(w, u), is the set of scattered factors in ww that can be formed by removing any embedding of uu from ww. This is closely related to the \emph{shuffle} operation in which two words are intertwined, i.e., we extend previous work relating to the shuffle operator, using knowledge about scattered factors. Alongside introducing these sets, we provide combinatorial results on the size of the set C(w,u)C(w, u), an algorithm to compute the set C(w,u)C(w, u) from ww and uu in O(wu(wu))O(\vert w \vert \cdot \vert u \vert \binom{w}{u}) time, where (wu)\binom{w}{u} denotes the number of embeddings of uu into ww, an algorithm to construct uu from ww and C(w,u)C(w, u) in O(w2(wwu))O(\vert w \vert^2 \binom{\vert w \vert}{\vert w \vert - \vert u \vert}) time, and an algorithm to construct ww from uu and C(w,u)C(w, u) in O(uwu+1)O(\vert u \vert \cdot \vert w \vert^{\vert u \vert + 1}) time.

Keywords

Cite

@article{arxiv.2603.20790,
  title  = {(Sets of ) Complement Scattered Factors},
  author = {Duncan Adamson and Pamela Fleischmann and Annika Huch},
  journal= {arXiv preprint arXiv:2603.20790},
  year   = {2026}
}
R2 v1 2026-07-01T11:31:22.437Z