arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1911.01644cs.DS
收藏

快速多模式笛卡尔树匹配

Fast Multiple Pattern Cartesian Tree Matching

Geonmo Gu, Siwoo Song, Simone Faro, Thierry Lecroq, Kunsoo Park

摘要:

笛卡尔树匹配是在给定文本中找到所有与给定模式具有相同笛卡尔树的子串的问题。在本文中,我们处理笛卡尔树匹配的情况下,多个模式。我们提出了两种指纹识别方法,即,父母距离编码和二进制编码。通过将一种有效的指纹方法与传统的多串匹配算法相结合,可以有效地解决多模式笛卡尔树匹配问题。提出了三种实用的多模式笛卡尔树匹配算法,分别基于Wu-Manber算法、Rabin-Karp算法和Alpha Skip Search算法。在实验中,我们将我们的解决方案与之前的算法进行比较[18]。我们的解决方案运行速度比以前的算法作为模式长度的增加。特别是,我们的算法基于Wu-Manber运行速度高达33倍。

英文摘要:

Cartesian tree matching is the problem of finding all substrings in a given text which have the same Cartesian trees as that of a given pattern. In this paper, we deal with Cartesian tree matching for the case of multiple patterns. We present two fingerprinting methods, i.e., the parent-distance encoding and the binary encoding. By combining an efficient fingerprinting method and a conventional multiple string matching algorithm, we can efficiently solve multiple pattern Cartesian tree matching. We propose three practical algorithms for multiple pattern Cartesian tree matching based on the Wu-Manber algorithm, the Rabin-Karp algorithm, and the Alpha Skip Search algorithm, respectively. In the experiments we compare our solutions against the previous algorithm [18]. Our solutions run faster than the previous algorithm as the pattern lengths increase. Especially, our algorithm based on Wu-Manber runs up to 33 times faster.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑