Abstract

The longest square subsequence (LSS) problem consists of computing a longest subsequence of a given string SS that is a square, i.e., a longest subsequence of form XXXX appearing in SS. It is known that an LSS of a string SS of length nn can be computed using O(n2)O(n^2) time [Kosowski 2004], or with (model-dependent) polylogarithmic speed-ups using O(n2(log⁡log⁡n)2/log⁡2n)O(n^2 (\log \log n)^2 / \log^2 n) time [Tiskin 2013]. We present the first algorithm for LSS whose running time depends on other parameters, i.e., we show that an LSS of SS can be computed in O(rmin⁡{n,M}log⁡nr+n+Mlog⁡n)O(r \min\{n, M\}\log \frac{n}{r} + n + M \log n) time with O(M)O(M) space, where rr is the length of an LSS of SS and MM is the number of matching points on SS.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.