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$ 的最小缺失词(MAW),若 $w$ 不作为子串出现在 $S$ 中,而 $w$ 的所有真子串均出现在 $S$ 中。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}|)$ 时间复杂度。