Abstract

AbstractA substring of a string is unbordered if its only border is the empty string. The study of unbordered substrings goes back to the paper of Ehrenfeucht and Silberger [Discr. Math 26 (1979)]. The main focus of their and subsequent papers was to elucidate the relationship between the longest unbordered substring and the minimal period of strings. In this paper, we consider the algorithmic problem of computing the longest unbordered substring of a string. The problem was introduced recently by G. Kucherov et al. [CPM (2015)], where the authors showed that the average-case running time of the simple, border-array based algorithm can be bounded by \(\mathcal {O}(\max \{n, n^2/\sigma ^4\})\) for \(\sigma \) being the size of the alphabet. (The worst-case running time remained \(\mathcal {O}(n^2)\).) Here we propose two algorithms, both presenting substantial theoretical improvements to the result of [11]. The first algorithm has \(\mathcal {O}(n \log n)\) average-case running time and \(\mathcal {O}(n^2)\) worst-case running time, and the second algorithm has \(\mathcal {O}(n^{1.5})\) worst-case running time.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.