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 $w$ and a scattered factor $u$ of $w$, the complement scattered factors of $w$ with regards to $u$, $C(w, u)$, is the set of scattered factors in $w$ that can be formed by removing any embedding of $u$ from $w$. 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)$, an algorithm to compute the set $C(w, u)$ from $w$ and $u$ in $O(\vert w \vert \cdot \vert u \vert \binom{w}{u})$ time, where $\binom{w}{u}$ denotes the number of embeddings of $u$ into $w$, an algorithm to construct $u$ from $w$ and $C(w, u)$ in $O(\vert w \vert^2 \binom{\vert w \vert}{\vert w \vert - \vert u \vert})$ time, and an algorithm to construct $w$ from $u$ and $C(w, u)$ in $O(\vert u \vert \cdot \vert w \vert^{\vert u \vert + 1})$ time.
翻译:自20世纪70年代Imre Simon的开创性工作以来,分散因子(亦称子序列或分散子词)一直是持续且深入研究的对象。关于分散因子的研究主要可分为两大类问题:给定一个词,哪些分散因子信息包含其中,哪些不包含。本文研究了一个中间问题,引入了“互补分散因子”的概念。给定词$w$和$w$的一个分散因子$u$,$w$关于$u$的互补分散因子$C(w, u)$定义为从$w$中移除$u$的任意嵌入后所能形成的所有分散因子的集合。该概念与两个词交织的“洗牌”操作紧密相关,即我们利用关于分散因子的知识,扩展了先前关于洗牌算子的研究。在引入这些集合的同时,我们提供了关于集合$C(w, u)$大小的组合结果,以及一个算法:从$w$和$u$计算$C(w, u)$,时间复杂度为$O(\vert w \vert \cdot \vert u \vert \binom{w}{u})$,其中$\binom{w}{u}$表示$u$在$w$中的嵌入数量;一个算法:从$w$和$C(w, u)$构建$u$,时间复杂度为$O(\vert w \vert^2 \binom{\vert w \vert}{\vert w \vert - \vert u \vert})$;以及一个算法:从$u$和$C(w, u)$构建$w$,时间复杂度为$O(\vert u \vert \cdot \vert w \vert^{\vert u \vert + 1})$。