최적 시간에서의 부분 문자의 최소 접미사와 회전
Minimal Suffix and Rotation of a Substring in Optimal Time
Minimal Suffix and Rotation of a Substring in Optimal Time
@misc{kociumaka2016minimal,
title = {Minimal Suffix and Rotation of a Substring in Optimal Time},
author = {Tomasz Kociumaka},
year = {2016},
eprint = {1601.08051},
archivePrefix = {arXiv},
primaryClass = {cs.DS},
url = {https://arxiv.org/abs/1601.08051}
}
Kociumaka, T. (2016). Minimal Suffix and Rotation of a Substring in Optimal Time [Preprint]. arXiv. https://doi.org/10.48550/arXiv.1601.08051
KOCIUMAKA T. Minimal Suffix and Rotation of a Substring in Optimal Time[EB/OL]. (2016-01-29)[2026-11-29]. https://arxiv.org/abs/1601.08051.
초록
주어진 텍스트에 대해 사전 정의된 부분 문자열 최소 접미사 쿼리는, 해당 부분 문자열이 텍스트 내에서 나타나는 위치를 지정하여 그 부분 문자열의 사전 순으로 가장 작은 비어지지 않은 접미사를 결정하도록 요구한다. 우리는 선형 시간 전처리 후 상수 시간 내에 이러한 쿼리를 최적화하여 응답할 수 있는 데이터 구조를 개발한다. 이는 Babenko et al. (CPM 2014) 의 결과를 개선하며, 그들의 트레이드오프 해법은 Theta(nlog n) 이 두 시간 복잡도의 곱으로 특징지어진다. 다음으로, 우리는 O(1) 개의 부분 문자열의 연결을 지원하는 쿼리를 확장하며, 이때 구조 구축 및 쿼리 시간은 유지된다. 우리는 이러한 일반화된 쿼리를 사용하여 주어진 부분 문자열의 사전 순으로 가장 작은 및 최대 회전 (rotation) 을 선형 시간 전처리 후 상수 시간 내에 계산한다. 우리의 데이터 구조는 주로 Lyndon 단어와 Lyndon 분해의 성질을 기반으로 하며, 융합 트리 (fusion trees) 와 문자열의 순서 동형 (order isomorphism) 개념과 같은 추가적인 알고리즘 및 조합론적 도구를 결합한다.
For a text given in advance, the substring minimal suffix queries ask to determine the lexicographically minimal non-empty suffix of a substring specified by the location of its occurrence in the text. We develop a data structure answering such queries optimally: in constant time after linear-time preprocessing. This improves upon the results of Babenko et al. (CPM 2014), whose trade-off solution is characterized by Theta(nlog n) product of these time complexities. Next, we extend our queries to support concatenations of O(1) substrings, for which the construction and query time is preserved. We apply these generalized queries to compute lexicographically minimal and maximal rotations of a given substring in constant time after linear-time preprocessing. Our data structures mainly rely on properties of Lyndon words and Lyndon factorizations. We combine them with further algorithmic and combinatorial tools, such as fusion trees and the notion of order isomorphism of strings.