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 S={S1,…,Sk} of multiple strings. We first describe our solution to the case of k=2 strings, and show how to compute the set M of MAWs in optimal O(n+∣M∣) time and with O(n) working space, where n denotes the total length of the strings in S. We then move on to the general case of k>2 strings, and show how to compute the set M of MAWs in O(n⌈k/logn⌉+∣M∣) time and with O(n(k+logn)) bits of working space, in the word RAM model with machine word size ω=logn. The latter algorithm runs in optimal O(n+∣M∣) time for k=O(logn).
@article{arxiv.2307.01967,
title = {Linear-time computation of generalized minimal absent words for multiple strings},
author = {Kouta Okabe and Takuya Mieno and Yuto Nakashima and Shunsuke Inenaga and Hideo Bannai},
journal= {arXiv preprint arXiv:2307.01967},
year = {2023}
}