- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
MIT麻省理工学院 算法导论公开课Problem Set 7 solution
Introduction to Algorithms November 18, 2005
Massachusetts Institute of Technology 6.046J/18.410J
Professors Erik D. Demaine and Charles E. Leiserson Handout 25
Problem Set 7 Solutions
Problem 7-1. Edit distance
In this problem you will write a program to compute edit distance. This problem is mandatory.
Failure to turn in a solution will result in a serious and negative impact on your term grade!
We advise you to start this programming assignment as soon as possible, because getting all the
details right in a program can take longer than you think.
Many word processors and keyword search engines have a spelling correction feature. If you type
in a misspelled word x, the word processor or search engine can suggest a correction y . The
correction y should be a word that is close to x. One way to measure the similarity in spelling
between two text strings is by “edit distance.” The notion of edit distance is useful in other fields
as well. For example, biologists use edit distance to characterize the similarity of DNA or protein
sequences.
The edit distance d(x, y) of two strings of text, x [1 . . m] and y [1 . . n], is defined to be the minimum
possible cost of a sequence of “transformation operations” (defined below) that transforms string
x [1 . . m] into string y [1 . . n].1 To define the effect of the transformation operations, we use an
auxiliary string z [1 . . s] that holds the intermediate results. At the beginning of the transformation
sequence, s = m and z [1 . . s] = x [1 . . m] (i.e., we start with string x [1 . . m]). At the end of
the transformation sequence, we should have s = n and z [1 . . s] = y [1 . . n] (i.e., our goal is to
transform into string y [
您可能关注的文档
- 进一步完善广西蔗糖发展.pdf
- 智慧水务处步设计方案.pdf
- 我国大米进出口现状与对策.pdf
- 人力资源规划与配套方案.pdf
- 提升产学研合作水平 推进全社会协同创新——2013产学研协同创新工作座谈会侧记.pdf
- 互通式立交进出口连接部分设计探讨_马炅.pdf
- 进出口销售合同英文版SALES_CONTRACT专业版.pdf
- HOK凤凰国际水城概念性规划竞赛方案2138343198.pdf
- 南昌市修建性详细规划及建设工程设计方案.pdf
- 武汉众新联商贸有限公司、王雷、彭兵骗取票据承兑、虚开增值税专.pdf
- 心理咨询师串讲-基础知识2.pdf
- 麻省理工 电路和电子学 公开课 Circuits and Electronics, MIT 课程笔记 - lecture24.pdf
- 麻省理工 电路和电子学 公开课 Circuits and Electronics, MIT 课程笔记 - lecture18.pdf
- 麻省理工 电路和电子学 公开课 Circuits and Electronics, MIT 课程笔记 - lecture14.pdf
- 麻省理工公开课:固态化学PPT课件第5课时.pdf
- 麻省理工公开课:固态化学PPT课件第2课时.pdf
- 申论公开课讲义.pdf
- 麻省理工 电路和电子学 公开课 Circuits and Electronics, MIT 课程笔记 - lecture16.pdf
- 导学案模式下的物理教学及管理的研究.pdf
- 阳光心态:无处不在的正思维.pdf
最近下载
- 国内支付业务付款回单[收集].pdf VIP
- 2025年辽宁省抚顺市辅警人员招聘考试题库及答案.docx
- 剑桥商务英语BEC单词初级.pdf VIP
- 客户经理职能转变之我见.doc VIP
- Unit 2 Bridging Cultures Using Language&Assessing Your Progress人教版(2019)教学课件.pptx VIP
- 2025年辽宁高级档案职称考试(档案管理概论)精选模拟试题及答案.docx VIP
- 中华人民共和国法治宣传教育法普法课件.pptx VIP
- 人教版高中英语选择性必修第二册精品课件 Unit 2 BRIDGING CULTURES Section C Using Language & Assessing Your Progress (2).ppt VIP
- 英语选择性必修2选择性必修 二 Unit 2 Bridging Cultures - Assessing your progress(28张PPT).pptx VIP
- 2023-CSP-S提高级(第一轮)C++真题.doc VIP
文档评论(0)