单词RAM模型中小字母的最长公共子序列问题

IF 0.7 4区 计算机科学 Q4 COMPUTER SCIENCE, INFORMATION SYSTEMS
Rodrigo Alexander Castro Campos
{"title":"单词RAM模型中小字母的最长公共子序列问题","authors":"Rodrigo Alexander Castro Campos","doi":"10.1016/j.ipl.2025.106579","DOIUrl":null,"url":null,"abstract":"<div><div>Given two strings of lengths <em>m</em> and <em>n</em>, with <span><math><mi>m</mi><mo>≤</mo><mi>n</mi></math></span>, the longest common subsequence problem consists of computing a common subsequence of maximum length by deleting symbols from both strings. While the <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>)</mo></math></span> algorithm devised in 1974 is optimal in the most general setting, algorithms that depend on parameters other than <em>m</em> and <em>n</em> have been proposed since then. In the word RAM model, let <em>w</em> be the word size, <em>s</em> be the alphabet size, <em>d</em> be the number of dominant symbol matches between the strings, and <em>p</em> be the length of the longest common subsequence. Fast algorithms for this problem have complexities <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>log</mi><mo>⁡</mo><mi>n</mi><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>w</mi><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>p</mi><mo>(</mo><mi>n</mi><mo>−</mo><mi>p</mi><mo>)</mo><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>+</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>log</mi><mo>⁡</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mo>,</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>d</mi><mo>)</mo><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mi>s</mi><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span>, and <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>s</mi><msup><mrow><mo>!</mo></mrow><mrow><mn>2</mn></mrow></msup><mi>s</mi><mo>+</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>)</mo></math></span>. In this work, we present an <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>(</mo><mi>s</mi><mo>+</mo><msup><mrow><mi>log</mi></mrow><mrow><mo>⁎</mo></mrow></msup><mo>⁡</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span> algorithm when <span><math><mi>s</mi><mo>∈</mo><mi>O</mi><mo>(</mo><mi>w</mi><mo>)</mo></math></span>, and also an <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>(</mo><mi>s</mi><mo>+</mo><msup><mrow><mi>log</mi></mrow><mrow><mo>⁎</mo></mrow></msup><mo>⁡</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>d</mi><mo>)</mo></math></span> algorithm when <span><math><mi>s</mi><mo>≤</mo><mi>w</mi></math></span> which uses bitwise instructions that became recently available in modern processors.</div></div>","PeriodicalId":56290,"journal":{"name":"Information Processing Letters","volume":"190 ","pages":"Article 106579"},"PeriodicalIF":0.7000,"publicationDate":"2025-04-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"The longest common subsequence problem for small alphabets in the word RAM model\",\"authors\":\"Rodrigo Alexander Castro Campos\",\"doi\":\"10.1016/j.ipl.2025.106579\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Given two strings of lengths <em>m</em> and <em>n</em>, with <span><math><mi>m</mi><mo>≤</mo><mi>n</mi></math></span>, the longest common subsequence problem consists of computing a common subsequence of maximum length by deleting symbols from both strings. While the <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>)</mo></math></span> algorithm devised in 1974 is optimal in the most general setting, algorithms that depend on parameters other than <em>m</em> and <em>n</em> have been proposed since then. In the word RAM model, let <em>w</em> be the word size, <em>s</em> be the alphabet size, <em>d</em> be the number of dominant symbol matches between the strings, and <em>p</em> be the length of the longest common subsequence. Fast algorithms for this problem have complexities <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>log</mi><mo>⁡</mo><mi>n</mi><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>w</mi><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>p</mi><mo>(</mo><mi>n</mi><mo>−</mo><mi>p</mi><mo>)</mo><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>+</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>log</mi><mo>⁡</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mo>,</mo><mi>m</mi><mi>n</mi><mo>/</mo><mi>d</mi><mo>)</mo><mo>)</mo></math></span>, <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mi>s</mi><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span>, and <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mi>s</mi><mo>+</mo><mi>s</mi><msup><mrow><mo>!</mo></mrow><mrow><mn>2</mn></mrow></msup><mi>s</mi><mo>+</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>)</mo></math></span>. In this work, we present an <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>(</mo><mi>s</mi><mo>+</mo><msup><mrow><mi>log</mi></mrow><mrow><mo>⁎</mo></mrow></msup><mo>⁡</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>min</mi><mo>⁡</mo><mo>(</mo><mi>d</mi><mi>log</mi><mo>⁡</mo><mi>s</mi><mo>,</mo><mi>p</mi><mi>m</mi><mo>)</mo><mo>)</mo></math></span> algorithm when <span><math><mi>s</mi><mo>∈</mo><mi>O</mi><mo>(</mo><mi>w</mi><mo>)</mo></math></span>, and also an <span><math><mi>O</mi><mo>(</mo><mi>n</mi><mo>(</mo><mi>s</mi><mo>+</mo><msup><mrow><mi>log</mi></mrow><mrow><mo>⁎</mo></mrow></msup><mo>⁡</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>d</mi><mo>)</mo></math></span> algorithm when <span><math><mi>s</mi><mo>≤</mo><mi>w</mi></math></span> which uses bitwise instructions that became recently available in modern processors.</div></div>\",\"PeriodicalId\":56290,\"journal\":{\"name\":\"Information Processing Letters\",\"volume\":\"190 \",\"pages\":\"Article 106579\"},\"PeriodicalIF\":0.7000,\"publicationDate\":\"2025-04-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Information Processing Letters\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0020019025000237\",\"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":"Information Processing Letters","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0020019025000237","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

摘要

给定两个长度为m和n的字符串,且m≤n,最长公共子序列问题包括通过从两个字符串中删除符号来计算最大长度的公共子序列。虽然1974年设计的O(mn)算法在大多数一般情况下是最优的,但从那时起,已经提出了依赖于m和n以外参数的算法。在单词RAM模型中,设w为单词大小,s为字母表大小,d为字符串之间的主导符号匹配数,p为最长公共子序列的长度。该问题的快速算法的复杂度为O(mn/log (n))、O(mn/w)、O(ns+min (p(n−p),pm))、O(nlog (s) + log (d,mn/d))、O(ns+min (ds,pm))和O(ns+s!2s+dlog (s))。在这项工作中,我们提出了当s∈O(w)时的O(n(s+log n)+min (dlog n,pm))算法,以及当s≤w时的O(n(s+log n)+d)算法,该算法使用现代处理器中最近可用的位指令。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
The longest common subsequence problem for small alphabets in the word RAM model
Given two strings of lengths m and n, with mn, the longest common subsequence problem consists of computing a common subsequence of maximum length by deleting symbols from both strings. While the O(mn) algorithm devised in 1974 is optimal in the most general setting, algorithms that depend on parameters other than m and n have been proposed since then. In the word RAM model, let w be the word size, s be the alphabet size, d be the number of dominant symbol matches between the strings, and p be the length of the longest common subsequence. Fast algorithms for this problem have complexities O(mn/logn), O(mn/w), O(ns+min(p(np),pm)), O(nlogs+dloglogmin(d,mn/d)), O(ns+min(ds,pm)), and O(ns+s!2s+dlogs). In this work, we present an O(n(s+logn)+min(dlogs,pm)) algorithm when sO(w), and also an O(n(s+logn)+d) algorithm when sw which uses bitwise instructions that became recently available in modern processors.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Information Processing Letters
Information Processing Letters 工程技术-计算机:信息系统
CiteScore
1.80
自引率
0.00%
发文量
70
审稿时长
7.3 months
期刊介绍: Information Processing Letters invites submission of original research articles that focus on fundamental aspects of information processing and computing. This naturally includes work in the broadly understood field of theoretical computer science; although papers in all areas of scientific inquiry will be given consideration, provided that they describe research contributions credibly motivated by applications to computing and involve rigorous methodology. High quality experimental papers that address topics of sufficiently broad interest may also be considered. Since its inception in 1971, Information Processing Letters has served as a forum for timely dissemination of short, concise and focused research contributions. Continuing with this tradition, and to expedite the reviewing process, manuscripts are generally limited in length to nine pages when they appear in print.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信