In the word RAM model, a string T of length n over an integer alphabet of size \(\sigma \) can be represented in \(\mathcal {O}(n /\log _\sigma n)\) space. We show that a representation of all covers of T can be computed in the optimal \(\mathcal {O}(n/\log _\sigma n)\) time; in particular, the shortest cover can be computed within this time. We also design an \(\mathcal {O}(n(\log \sigma + \log \log n)/\log n)\) -sized data structure that computes in \(\mathcal {O}(1)\) time any element of the so-called (shortest) cover array of T, that is, the length of the shortest cover of any given prefix of T. As a by-product, we describe the structure of the cover array of Fibonacci strings. On the negative side, we show that the shortest cover of a length-n string cannot be computed using \(o(n/\log n)\) operations in the PILLAR model of Charalampopoulos, Kociumaka, and Wellnitz (FOCS 2020).

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Computing String Covers in Sublinear Time

  • Jakub Radoszewski,
  • Wiktor Zuba

摘要

In the word RAM model, a string T of length n over an integer alphabet of size \(\sigma \) can be represented in \(\mathcal {O}(n /\log _\sigma n)\) space. We show that a representation of all covers of T can be computed in the optimal \(\mathcal {O}(n/\log _\sigma n)\) time; in particular, the shortest cover can be computed within this time. We also design an \(\mathcal {O}(n(\log \sigma + \log \log n)/\log n)\) -sized data structure that computes in \(\mathcal {O}(1)\) time any element of the so-called (shortest) cover array of T, that is, the length of the shortest cover of any given prefix of T. As a by-product, we describe the structure of the cover array of Fibonacci strings. On the negative side, we show that the shortest cover of a length-n string cannot be computed using \(o(n/\log n)\) operations in the PILLAR model of Charalampopoulos, Kociumaka, and Wellnitz (FOCS 2020).