Finding patterns and periods in Cartesian tree matching.

THEORETICAL COMPUTER SCIENCE(2020)

引用 6|浏览11
暂无评分
摘要
We introduce a new metric of match, called Cartesian tree matching, which means that two strings match if they have the same Cartesian trees. Based on Cartesian tree matching, we define single pattern matching, multiple pattern matching, and indexing problems. We propose a linear time algorithm for single pattern matching, and randomized linear time algorithms for multiple pattern matching and indexing. We also define three types of periods, called full period, initial period, and general period. We propose O(n) time, O(n loglogn) time, and O(n logn) time algorithms for finding all the full periods, initial periods, and general periods of a string of length n, respectively. Our efficient algorithms use a representation of the Cartesian tree, called parent-distance representation. (C) 2020 Elsevier B.V. All rights reserved.
更多
查看译文
关键词
Cartesian tree matching,Pattern matching,Indexing,Periods,Parent-distance representation
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要