Abstract
An order-preserving square in a string is a fragment of the form uv where u ≠ v and u is order-isomorphic to v. We show that a string w of length n over an alphabet of size σ contains O(σn) order-preserving squares that are distinct as words. This improves the upper bound of O(σ2n) by Kociumaka, Radoszewski, Rytter, and Waleń [TCS 2016]. Further, for every σ and n we exhibit a string with Ω(σn) order-preserving squares that are distinct as words, thus establishing that our upper bound is asymptotically tight. Finally, we design an O(σn) time algorithm that outputs all order-preserving squares that occur in a given string and are distinct as words. By our lower bound, this is optimal in the worst case.
Original language | English |
---|---|
Title of host publication | 34th Annual Symposium on Combinatorial Pattern Matching, CPM 2023 |
Editors | Laurent Bulteau, Zsuzsanna Liptak |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
ISBN (Electronic) | 9783959772761 |
DOIs | |
State | Published - Jun 2023 |
Event | 34th Annual Symposium on Combinatorial Pattern Matching, CPM 2023 - Marne-la-Vallee, France Duration: 26 Jun 2023 → 28 Jun 2023 |
Publication series
Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 259 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 34th Annual Symposium on Combinatorial Pattern Matching, CPM 2023 |
---|---|
Country/Territory | France |
City | Marne-la-Vallee |
Period | 26/06/23 → 28/06/23 |
Bibliographical note
Publisher Copyright:© 2023 Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing. All rights reserved.
Keywords
- distinct squares
- order-isomorphism
- repetitions
ASJC Scopus subject areas
- Software