{"title":"基于 \"决斗-扫荡 \"范式的保序模式匹配串行和并行算法","authors":"Davaajav Jargalsaikhan, Diptarama Hendrian, Yohei Ueki, Ryo Yoshinaka, Ayumi Shinohara","doi":"10.1007/s00236-024-00464-w","DOIUrl":null,"url":null,"abstract":"<div><p>Given a text and a pattern over an alphabet, the classic exact matching problem searches for all occurrences of the pattern in the text. Unlike exact matching, <i>order-preserving pattern matching</i> (OPPM) considers the relative order of elements, rather than their exact values. In this paper, we propose efficient algorithms for the OPPM problem using the “duel-and-sweep” paradigm. For a pattern of length <i>m</i> and a text of length <i>n</i>, our serial algorithm runs in <span>\\(O(n + m\\log m)\\)</span> time, and our parallel algorithm runs in <span>\\(O(\\log ^2 m)\\)</span> time and <span>\\(O(n \\log ^2 m)\\)</span> work with <span>\\(O(\\log m)\\)</span> time and <span>\\(O(m \\log m)\\)</span> work pattern preprocessing on the Priority Concurrent Read Concurrent Write Parallel Random-Access Machines (P-CRCW PRAM).</p></div>","PeriodicalId":7189,"journal":{"name":"Acta Informatica","volume":"61 4","pages":"415 - 444"},"PeriodicalIF":0.4000,"publicationDate":"2024-08-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Serial and parallel algorithms for order-preserving pattern matching based on the duel-and-sweep paradigm\",\"authors\":\"Davaajav Jargalsaikhan, Diptarama Hendrian, Yohei Ueki, Ryo Yoshinaka, Ayumi Shinohara\",\"doi\":\"10.1007/s00236-024-00464-w\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Given a text and a pattern over an alphabet, the classic exact matching problem searches for all occurrences of the pattern in the text. Unlike exact matching, <i>order-preserving pattern matching</i> (OPPM) considers the relative order of elements, rather than their exact values. In this paper, we propose efficient algorithms for the OPPM problem using the “duel-and-sweep” paradigm. For a pattern of length <i>m</i> and a text of length <i>n</i>, our serial algorithm runs in <span>\\\\(O(n + m\\\\log m)\\\\)</span> time, and our parallel algorithm runs in <span>\\\\(O(\\\\log ^2 m)\\\\)</span> time and <span>\\\\(O(n \\\\log ^2 m)\\\\)</span> work with <span>\\\\(O(\\\\log m)\\\\)</span> time and <span>\\\\(O(m \\\\log m)\\\\)</span> work pattern preprocessing on the Priority Concurrent Read Concurrent Write Parallel Random-Access Machines (P-CRCW PRAM).</p></div>\",\"PeriodicalId\":7189,\"journal\":{\"name\":\"Acta Informatica\",\"volume\":\"61 4\",\"pages\":\"415 - 444\"},\"PeriodicalIF\":0.4000,\"publicationDate\":\"2024-08-31\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Acta Informatica\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://link.springer.com/article/10.1007/s00236-024-00464-w\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q4\",\"JCRName\":\"COMPUTER SCIENCE, INFORMATION SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Acta Informatica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00236-024-00464-w","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
摘要
给定一段文本和一个字母表上的模式,经典的精确匹配问题是搜索文本中模式的所有出现次数。与精确匹配不同,保序模式匹配(OPPM)考虑的是元素的相对顺序,而不是它们的精确值。在本文中,我们提出了使用 "决斗和扫荡 "范式来解决 OPPM 问题的高效算法。对于长度为 m 的模式和长度为 n 的文本,我们的串行算法运行时间为 \(O(n + m\log m)\)、而我们的并行算法在优先并发读取并发写入并行随机存取机(P-CRCW PRAM)上的运行时间为(O(\log ^2 m)\),工作模式预处理时间为(O(\log m)\),工作模式预处理时间为(O(n \log ^2 m)\)。
Serial and parallel algorithms for order-preserving pattern matching based on the duel-and-sweep paradigm
Given a text and a pattern over an alphabet, the classic exact matching problem searches for all occurrences of the pattern in the text. Unlike exact matching, order-preserving pattern matching (OPPM) considers the relative order of elements, rather than their exact values. In this paper, we propose efficient algorithms for the OPPM problem using the “duel-and-sweep” paradigm. For a pattern of length m and a text of length n, our serial algorithm runs in \(O(n + m\log m)\) time, and our parallel algorithm runs in \(O(\log ^2 m)\) time and \(O(n \log ^2 m)\) work with \(O(\log m)\) time and \(O(m \log m)\) work pattern preprocessing on the Priority Concurrent Read Concurrent Write Parallel Random-Access Machines (P-CRCW PRAM).
期刊介绍:
Acta Informatica provides international dissemination of articles on formal methods for the design and analysis of programs, computing systems and information structures, as well as related fields of Theoretical Computer Science such as Automata Theory, Logic in Computer Science, and Algorithmics.
Topics of interest include:
• semantics of programming languages
• models and modeling languages for concurrent, distributed, reactive and mobile systems
• models and modeling languages for timed, hybrid and probabilistic systems
• specification, program analysis and verification
• model checking and theorem proving
• modal, temporal, first- and higher-order logics, and their variants
• constraint logic, SAT/SMT-solving techniques
• theoretical aspects of databases, semi-structured data and finite model theory
• theoretical aspects of artificial intelligence, knowledge representation, description logic
• automata theory, formal languages, term and graph rewriting
• game-based models, synthesis
• type theory, typed calculi
• algebraic, coalgebraic and categorical methods
• formal aspects of performance, dependability and reliability analysis
• foundations of information and network security
• parallel, distributed and randomized algorithms
• design and analysis of algorithms
• foundations of network and communication protocols.