A string $w$ is called a minimal absent word (MAW) for a string $S$ if $w$ does not occur as a substring in $S$ and all proper substrings of $w$ occur in $S$. MAWs are well-studied combinatorial string objects that have potential applications in areas including bioinformatics, musicology, and data compression. In this paper, we generalize the notion of MAWs to a set $\mathcal{S} = \{S_1, \ldots, S_k\}$ of multiple strings. We first describe our solution to the case of $k = 2$ strings, and show how to compute the set $\mathsf{M}$ of MAWs in optimal $O(n + |\mathsf{M}|)$ time and with $O(n)$ working space, where $n$ denotes the total length of the strings in $\mathcal{S}$. We then move on to the general case of $k > 2$ strings, and show how to compute the set $\mathsf{M}$ of MAWs in $O(n \lceil k / \log n \rceil + |\mathsf{M}|)$ time and with $O(n (k + \log n))$ bits of working space, in the word RAM model with machine word size $\omega = \log n$. The latter algorithm runs in optimal $O(n + |\mathsf{M}|)$ time for $k = O(\log n)$.
翻译:若字符串$w$不出现在$S$中作为子串,且$w$的所有真子串均出现在$S$中,则称$w$为字符串$S$的最小缺失词(MAW)。MAW是经过充分研究的组合字符串对象,在生物信息学、音乐学与数据压缩等领域具有潜在应用。本文我们将MAW概念推广至多字符串集合$\mathcal{S} = \{S_1, \ldots, S_k\}$。首先描述$k=2$字符串情形的解法,展示如何以最优$O(n + |\mathsf{M}|)$时间复杂度和$O(n)$工作空间计算MAW集合$\mathsf{M}$(其中$n$表示$\mathcal{S}$中字符串总长度)。进而针对$k>2$字符串的一般情形,展示如何在机器字长为$\omega = \log n$的字RAM模型下,以$O(n \lceil k / \log n \rceil + |\mathsf{M}|)$时间复杂度及$O(n (k + \log n))$比特工作空间计算MAW集合$\mathsf{M}$。该算法在$k = O(\log n)$时运行于最优$O(n + |\mathsf{M}|)$时间复杂度。