Paweł Gawrychowski , Garance Gourdel , Tatiana Starikovskaya , Teresa Anna Steiner
{"title":"Compressed consecutive pattern matching","authors":"Paweł Gawrychowski , Garance Gourdel , Tatiana Starikovskaya , Teresa Anna Steiner","doi":"10.1016/j.is.2025.102607","DOIUrl":null,"url":null,"abstract":"<div><div>Originating from the work of Navarro and Thankachan [TCS 2016], the problem of consecutive pattern matching is a variant of the fundamental pattern matching problem. In this problem, one is given a text and a pair of patterns <span><math><mrow><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub></mrow></math></span>, and must compute consecutive occurrences of <span><math><mrow><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub></mrow></math></span> in the text. Assuming that the text is given as a straight-line program of size <span><math><mi>g</mi></math></span>, we develop an algorithm that computes all consecutive occurrences of <span><math><mrow><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub></mrow></math></span> in optimal <span><math><mrow><mi>O</mi><mrow><mo>(</mo><mi>g</mi><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mi>output</mi><mo>)</mo></mrow></mrow></math></span> time, where <span><math><mi>output</mi></math></span> is the size of the output. As a corollary, we also derive an algorithm that reports all co-occurrences separated by a distance <span><math><mrow><mi>d</mi><mo>∈</mo><mrow><mo>[</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>]</mo></mrow></mrow></math></span> in <span><math><mrow><mi>O</mi><mrow><mo>(</mo><mi>g</mi><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mi>output</mi><mo>)</mo></mrow></mrow></math></span> time and an algorithm that reports the top-<span><math><mi>k</mi></math></span> closest co-occurrences in <span><math><mrow><mi>O</mi><mrow><mo>(</mo><mi>g</mi><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mrow><mo>|</mo><msub><mrow><mi>p</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>|</mo></mrow><mo>+</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> time.</div></div>","PeriodicalId":50363,"journal":{"name":"Information Systems","volume":"136 ","pages":"Article 102607"},"PeriodicalIF":3.4000,"publicationDate":"2025-08-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information Systems","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0306437925000912","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
Originating from the work of Navarro and Thankachan [TCS 2016], the problem of consecutive pattern matching is a variant of the fundamental pattern matching problem. In this problem, one is given a text and a pair of patterns , and must compute consecutive occurrences of in the text. Assuming that the text is given as a straight-line program of size , we develop an algorithm that computes all consecutive occurrences of in optimal time, where is the size of the output. As a corollary, we also derive an algorithm that reports all co-occurrences separated by a distance in time and an algorithm that reports the top- closest co-occurrences in time.
期刊介绍:
Information systems are the software and hardware systems that support data-intensive applications. The journal Information Systems publishes articles concerning the design and implementation of languages, data models, process models, algorithms, software and hardware for information systems.
Subject areas include data management issues as presented in the principal international database conferences (e.g., ACM SIGMOD/PODS, VLDB, ICDE and ICDT/EDBT) as well as data-related issues from the fields of data mining/machine learning, information retrieval coordinated with structured data, internet and cloud data management, business process management, web semantics, visual and audio information systems, scientific computing, and data science. Implementation papers having to do with massively parallel data management, fault tolerance in practice, and special purpose hardware for data-intensive systems are also welcome. Manuscripts from application domains, such as urban informatics, social and natural science, and Internet of Things, are also welcome. All papers should highlight innovative solutions to data management problems such as new data models, performance enhancements, and show how those innovations contribute to the goals of the application.