Publication Date:
2019
Description:
〈h3〉Abstract〈/h3〉
〈p〉We introduce a compressed suffix array representation that, on a text 〈em〉T〈/em〉 of length 〈em〉n〈/em〉 over an alphabet of size 〈span〉
〈span〉\(\sigma \)〈/span〉
〈/span〉, can be built in 〈em〉O〈/em〉(〈em〉n〈/em〉) deterministic time, within 〈span〉
〈span〉\(O(n\log \sigma )\)〈/span〉
〈/span〉 bits of working space, and counts the number of occurrences of any pattern 〈em〉P〈/em〉 in 〈em〉T〈/em〉 in time 〈span〉
〈span〉\(O(|P| + \log \log _w \sigma )\)〈/span〉
〈/span〉 on a RAM machine of 〈span〉
〈span〉\(w=\Omega (\log n)\)〈/span〉
〈/span〉-bit words. This time is almost optimal for large alphabets (〈span〉
〈span〉\(\log \sigma =\Theta (\log n)\)〈/span〉
〈/span〉), and it outperforms all the other compressed indexes that can be built in linear deterministic time, as well as some others. The only faster indexes can be built in linear time only in expectation, or require 〈span〉
〈span〉\(\Theta (n\log n)\)〈/span〉
〈/span〉 bits. For smaller alphabets, where 〈span〉
〈span〉\(\log \sigma = o(\log n)\)〈/span〉
〈/span〉, we show how, by using space proportional to a compressed representation of the text, we can build in linear time an index that counts in time 〈span〉
〈span〉\(O(|P|/\log _\sigma n + \log _\sigma ^\epsilon n)\)〈/span〉
〈/span〉 for any constant 〈span〉
〈span〉\(\epsilon 〉0\)〈/span〉
〈/span〉. This is almost RAM-optimal in the typical case where 〈span〉
〈span〉\(w=\Theta (\log n)\)〈/span〉
〈/span〉.
〈/p〉
Print ISSN:
0178-4617
Electronic ISSN:
1432-0541
Topics:
Computer Science
,
Mathematics