Longest Lyndon Substring After Edit

Yuki Urabe, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda, Marc Herbstritt
2018 Annual Symposium on Combinatorial Pattern Matching  
The longest Lyndon substring of a string T is the longest substring of T which is a Lyndon word. LLS(T ) denotes the length of the longest Lyndon substring of a string T . In this paper, we consider computing LLS(T ) where T is an edited string formed from T . After O(n) time and space preprocessing, our algorithm returns LLS(T ) in O(log n) time for any single character edit. We also consider a version of the problem with block edits, i.e., a substring of T is replaced by a given string of
more » ... th l. After O(n) time and space preprocessing, our algorithm returns LLS(T ) in O(l log σ + log n) time for any block edit where σ is the number of distinct characters in T . We can modify our algorithm so as to output all the longest Lyndon substrings of T for both problems.
doi:10.4230/lipics.cpm.2018.19 dblp:conf/cpm/UrabeNIBT18 fatcat:rikiejsrnfegrn55jajxxab2pu