On the Complexity of BWT-runs Minimization via Alphabet Reordering
Abstract
The Burrows-Wheeler Transform (BWT) has been an essential tool in text compression and indexing. First introduced in 1994, it went on to provide the backbone for the first encoding of the classic suffix tree data structure in space close to the entropy-based lower bound. Recently, there has been the development of compact suffix trees in space proportional to "", the number of runs in the BWT, as well as the appearance of in the time complexity of new algorithms. Unlike other popular measures of compression, the parameter is sensitive to the lexicographic ordering given to the text's alphabet. Despite several past attempts to exploit this, a provably efficient algorithm for finding, or approximating, an alphabet ordering which minimizes has been open for years. We present the first set of results on the computational complexity of minimizing BWT-runs via alphabet reordering. We prove that the decision version of this problem is NP-complete and cannot be solved in time unless the Exponential Time Hypothesis fails, where is the size of the alphabet and is the length of the text. We also show that the optimization problem is APX-hard. In doing so, we relate two previously disparate topics: the optimal traveling salesperson path and the number of runs in the BWT of a text, providing a surprising connection between problems on graphs and text compression. Also, by relating recent results in the field of dictionary compression, we illustrate that an arbitrary alphabet ordering provides a -approximation. We provide an optimal linear-time algorithm for the problem of finding a run minimizing ordering on a subset of symbols (occurring only once) under ordering constraints, and prove a generalization of this problem to a class of graphs with BWT like properties called Wheeler graphs is NP-complete.
Cite
@article{arxiv.1911.03035,
title = {On the Complexity of BWT-runs Minimization via Alphabet Reordering},
author = {Jason Bentley and Daniel Gibney and Sharma V. Thankachan},
journal= {arXiv preprint arXiv:1911.03035},
year = {2020}
}