For a text with , its suffix array orders the suffix starting positions lexicographically, while its inverse suffix array maps each position to its suffix’s rank. Since compressed suffix arrays and FM-indexes appeared in 2000, a central goal has been to support both queries in bits. Thankachan recently reduced inverse suffix array query time to , but constant time remained open. We give the first inverse suffix array structure with optimal space and query time: bits and time. For binary texts, this unconditionally separates the two queries for deterministic structures, since every -bit suffix array structure in the cell-probe model with -bit cells has worst-case query time . Construction is a second challenge: linear time can take times as long as reading the input or writing a compact index. Previously, sublinear construction was known for only one such index supporting both queries. In the word RAM with -bit words, we deterministically construct the new structure and two suffix array families from the packed text in time. For , the first family uses bits and has query time , whereas the second uses bits and has query time . Each has peak preprocessing space bounded by its index size. For binary texts, the second family matches the deterministic cell-probe time-space lower bound whenever , and, outside the slowest-query regimes, improving the deterministic construction time to would yield an equally fast Dictionary Matching algorithm.

生成讲解博客的中文版本

生成AI智能校验的中文版本