1 research outputs found

    On Longest Common Property Preserved Substring Queries

    Full text link
    We revisit the problem of longest common property preserving substring queries introduced by~Ayad et al. (SPIRE 2018, arXiv 2018). We consider a generalized and unified on-line setting, where we are given a set XX of kk strings of total length nn that can be pre-processed so that, given a query string yy and a positive integer kkk'\leq k, we can determine the longest substring of yy that satisfies some specific property and is common to at least kk' strings in XX. Ayad et al. considered the longest square-free substring in an on-line setting and the longest periodic and palindromic substring in an off-line setting. In this paper, we give efficient solutions in the on-line setting for finding the longest common square, periodic, palindromic, and Lyndon substrings. More precisely, we show that XX can be pre-processed in O(n)O(n) time resulting in a data structure of O(n)O(n) size that answers queries in O(ylogσ)O(|y|\log\sigma) time and O(1)O(1) working space, where σ\sigma is the size of the alphabet, and the common substring must be a square, a periodic substring, a palindrome, or a Lyndon word.Comment: minor change from version submitted to SPIRE 201
    corecore