arrow
Return

Counting Distinct (Non-)crossing Substrings

delete2026-01-01
delete0
PRE
AI
H
Haruki Umezaki
H
Hiroki Shibata
D
Dominik Köppl
Y
Yuto Nakashima
S
Shunsuke Inenaga *
H
Hideo Bannai
DOI:10.1007/978-3-032-05228-5_22delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Let w be a string of length n. The problem of counting factors crossing a position- Problem 64 from the textbook 125 Problems in Text Algorithms [Crochemore, Leqroc, and Rytter, 2021], asks to count the number C( w, k) (resp. N (w, k)) of distinct substrings in w that have occurrences containing (resp. not containing) a position k in w. The solutions provided in their textbook compute C(w, k) and N (w, k) in O(n) time for a single position k in w, and thus a direct application would require O(n(2)) timefor all positions k = 1,..., n in w. Their solution is designed for constant-size alphabets. In this paper, we present new algorithms which compute C( w, k) in O(n) total time for general ordered alphabets, and N (w, k) in O(n) total time for linearly sortable alphabets, for all positions k = 1,..., n in w.
Keywords:
string algorithms ,distinct substrings
runs
LPF arrays

Journal

S
STRING PROCESSING AND INFORMATION RETRIEVAL, SPIRE 2025
IF:
0
Papers:
22
Citations:
0

Organization

K
kyushu university
Scholars:
4.5K
Papers: 1.7K
Citations: 0
U
university of yamanashi
Scholars:
911
Papers: 280
Citations: 0
I
institute of science tokyo
Scholars:
3.3K
Papers: 1.2K
Citations: 0
researcher View more organizations