Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
StringTools[EditDistance] - compute the edit distance between two strings
Calling Sequence
EditDistance( s, t )
Parameters
s
-
Maple string
t
Description
The EditDistance(s,t) command returns an integer measure of the distance between the two strings s and t.
The edit distance between two strings s and t, is defined to be the difference between the sum of their lengths and twice the length of the longest common subsequence of s and t. If strings s and t have respective lengths m and n, then the edit distance is defined to be . It is related to the Levenshtein metric, which is sometimes also called the edit distance.
For a different notion of the distance between two strings, see StringTools[HammingDistance] and StringTools[Levenshtein].
Examples
Since it is a metric, the edit distance satisfies the triangle inequality.
See Also
string, StringTools, StringTools[Levenshtein]
Download Help Document