Simon's congruence pattern matching

The Simon's congruence problem is to determine whether or not two strings have the same set of subsequences of length no greater than a given integer, and the problem can be answered in linear time. We consider the Simon's congruence pattern matching problem that looks for all substrings o...

Full description

Saved in:
Bibliographic Details
Published in:Theoretical computer science Vol. 994; p. 114478
Main Authors: Kim, Sungmin, Ko, Sang-Ki, Han, Yo-Sub
Format: Journal Article
Language:English
Published: Elsevier B.V 01.05.2024
Subjects:
ISSN:0304-3975, 1879-2294
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:The Simon's congruence problem is to determine whether or not two strings have the same set of subsequences of length no greater than a given integer, and the problem can be answered in linear time. We consider the Simon's congruence pattern matching problem that looks for all substrings of a text that are congruent to a pattern under the Simon's congruence. We propose a linear time algorithm by reusing results from previous computations with the help of new data structures called X-trees and Y-trees. Moreover, we investigate several variants of the problem such as identifying the shortest substring or subsequence of the text that is congruent to the pattern under the Simon's congruence, or finding frequent matchings. We design efficient algorithms for these problems. We conclude the paper with two open problems: finding the longest congruent subsequence and optimizing the pattern matching problem. •A polynomial algorithm linear in the length of the text that computes all substrings of the text that is Simon's k-congruent to the pattern.•Efficient algorithms that solve variants of the Simon's congruence pattern matching problem.•A data structure with linear preprocessing time that answers two types of queries related to Simon's congruence pattern matching multiplicities.
ISSN:0304-3975
1879-2294
DOI:10.1016/j.tcs.2024.114478