Algorithms for approximate string matching

Q4 Mathematics 信息与控制 Pub Date : 1985-01-01 DOI:10.1016/S0019-9958(85)80046-2
Esko Ukkonen
{"title":"Algorithms for approximate string matching","authors":"Esko Ukkonen","doi":"10.1016/S0019-9958(85)80046-2","DOIUrl":null,"url":null,"abstract":"<div><p>The edit distance between strings <em>a</em><sub>1</sub> … <em>a<sub>m</sub></em> and <em>b</em><sub>1</sub> … <em>b<sub>n</sub></em> is the minimum cost <em>s</em> of a sequence of editing steps (insertions, deletions, changes) that convert one string into the other. A well-known tabulating method computes <em>s</em> as well as the corresponding editing sequence in time and in space <em>O</em>(<em>mn</em>) (in space <em>O</em>(min(<em>m, n</em>)) if the editing sequence is not required). Starting from this method, we develop an improved algorithm that works in time and in space <em>O</em>(<em>s</em> · min(<em>m, n</em>)). Another improvement with time <em>O</em>(<em>s</em> · min(<em>m, n</em>)) and space <em>O</em>(<em>s</em> · min(<em>s, m, n</em>)) is given for the special case where all editing steps have the same cost independently of the characters involved. If the editing sequence that gives cost <em>s</em> is not required, our algorithms can be implemented in space <em>O</em>(min(<em>s, m, n</em>)). Since <em>s</em> = <em>O</em>(max(<em>m, n</em>)), the new methods are always asymptotically as good as the original tabulating method. As a by-product, algorithms are obtained that, given a threshold value <em>t</em>, test in time <em>O</em>(<em>t</em> · min(<em>m, n</em>)) and in space <em>O</em>(min(<em>t, m, n</em>)) whether <em>s</em> ⩽ <em>t</em>. Finally, different generalized edit distances are analyzed and conditions are given under which our algorithms can be used in conjunction with extended edit operation sets, including, for example, transposition of adjacent characters.</p></div>","PeriodicalId":38164,"journal":{"name":"信息与控制","volume":"64 1","pages":"Pages 100-118"},"PeriodicalIF":0.0000,"publicationDate":"1985-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0019-9958(85)80046-2","citationCount":"676","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"信息与控制","FirstCategoryId":"1093","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0019995885800462","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"Mathematics","Score":null,"Total":0}
引用次数: 676

Abstract

The edit distance between strings a1am and b1bn is the minimum cost s of a sequence of editing steps (insertions, deletions, changes) that convert one string into the other. A well-known tabulating method computes s as well as the corresponding editing sequence in time and in space O(mn) (in space O(min(m, n)) if the editing sequence is not required). Starting from this method, we develop an improved algorithm that works in time and in space O(s · min(m, n)). Another improvement with time O(s · min(m, n)) and space O(s · min(s, m, n)) is given for the special case where all editing steps have the same cost independently of the characters involved. If the editing sequence that gives cost s is not required, our algorithms can be implemented in space O(min(s, m, n)). Since s = O(max(m, n)), the new methods are always asymptotically as good as the original tabulating method. As a by-product, algorithms are obtained that, given a threshold value t, test in time O(t · min(m, n)) and in space O(min(t, m, n)) whether st. Finally, different generalized edit distances are analyzed and conditions are given under which our algorithms can be used in conjunction with extended edit operation sets, including, for example, transposition of adjacent characters.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
近似字符串匹配算法
字符串a1…am和b1…bn之间的编辑距离是将一个字符串转换为另一个字符串的一系列编辑步骤(插入,删除,更改)的最小成本s。一种著名的制表方法在时间和空间O(mn)中计算s以及相应的编辑顺序(如果不需要编辑顺序,则在空间O(min(m, n))中计算)。在此基础上,我们开发了一种改进的算法,该算法在时间和空间上都是O(s·min(m, n))。另一个改进是在时间为O(s·min(m, n))和空间为O(s·min(s, m, n))的特殊情况下给出的,即所有编辑步骤的代价与所涉及的字符无关。如果不需要代价为s的编辑序列,我们的算法可以在空间O(min(s, m, n))中实现。由于s = O(max(m, n)),新方法总是与原始制表方法渐近地一样好。在给定阈值t的情况下,得到了在时间O(t·min(m, n))和空间O(min(t, m, n))上测试s≤t的算法。最后,分析了不同的广义编辑距离,并给出了我们的算法可以与扩展编辑操作集结合使用的条件,包括相邻字符的换位。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
信息与控制
信息与控制 Mathematics-Control and Optimization
CiteScore
1.50
自引率
0.00%
发文量
4623
期刊介绍:
期刊最新文献
Systolic trellis automata: Stability, decidability and complexity On relativized exponential and probabilistic complexity classes A note on succinct representations of graphs Function definitions in term rewriting and applicative programming Simulation of large networks on smaller networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1