<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.aletopedia.org/index.php?action=history&amp;feed=atom&amp;title=String-to-string_correction_problem</id>
	<title>String-to-string correction problem - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.aletopedia.org/index.php?action=history&amp;feed=atom&amp;title=String-to-string_correction_problem"/>
	<link rel="alternate" type="text/html" href="https://www.aletopedia.org/index.php?title=String-to-string_correction_problem&amp;action=history"/>
	<updated>2026-12-06T18:05:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://www.aletopedia.org/index.php?title=String-to-string_correction_problem&amp;diff=1021184&amp;oldid=prev</id>
		<title>imported&gt;Mikhail Ryazanov: /* */ punct.</title>
		<link rel="alternate" type="text/html" href="https://www.aletopedia.org/index.php?title=String-to-string_correction_problem&amp;diff=1021184&amp;oldid=prev"/>
		<updated>2026-10-08T01:30:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;: &lt;/span&gt; punct.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[computer science]], the &amp;#039;&amp;#039;&amp;#039;string-to-string correction problem&amp;#039;&amp;#039;&amp;#039; refers to determining the minimum cost sequence of edit operations necessary to change one [[String (computer science)|string]] into another (i.e., computing the shortest [[edit distance]]). Each type of edit operation has its own cost value.&amp;lt;ref name=&amp;quot;wagnerfischer&amp;quot;&amp;gt;{{cite journal |first1=Robert A. |last1=Wagner |first2=Michael J. |last2=Fischer |author2-link=Michael J. Fischer |title=The String-to-String Correction Problem |journal=Journal of the ACM |volume=21 |issue=1 |year=1974 |pages=168–173 |doi= 10.1145/321796.321811|s2cid=13381535 |doi-access=free }}&amp;lt;/ref&amp;gt; A single edit operation may be changing a single [[Character (computing)|symbol]] of the string into another (cost W&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;), deleting a symbol (cost W&amp;lt;sub&amp;gt;D&amp;lt;/sub&amp;gt;), or inserting a new symbol (cost W&amp;lt;sub&amp;gt;I&amp;lt;/sub&amp;gt;).&amp;lt;ref name=&amp;quot;lowrancewagner&amp;quot;&amp;gt;{{cite journal |last1=Lowrance |first1=Roy |last2=Wagner |first2=Robert A. |title=An Extension of the String-to-String Correction Problem |journal=Journal of the ACM |date=April 1975 |volume=22 |issue=2 |pages=177–183 |doi=10.1145/321879.321880 |s2cid=18892193 |doi-access=free }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If all edit operations have the same unit costs (W&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt; = W&amp;lt;sub&amp;gt;D&amp;lt;/sub&amp;gt; = W&amp;lt;sub&amp;gt;I&amp;lt;/sub&amp;gt; = 1), the problem is the same as computing the [[Levenshtein distance]] of two strings.&lt;br /&gt;
&lt;br /&gt;
Several [[algorithm]]s exist to provide an efficient way to determine string distance and specify the minimum number of transformation operations required.&amp;lt;ref&amp;gt;[[Edit distance#Computation]]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |first=Walter F. |last=Tichy |title=The string-to-string correction problem with block moves |journal=ACM Transactions on Computer Systems |volume=2 |issue=4 |year=1984 |pages=309–321 |doi= 10.1145/357401.357404|s2cid=14034845 |url=http://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1377&amp;amp;context=cstech |doi-access=free }}&amp;lt;/ref&amp;gt; Such algorithms are particularly useful for [[Delta encoding|delta]] creation operations where something is stored as a set of differences relative to a base version. This allows several versions of a single object to be stored much more efficiently than storing them separately. This holds true even for single versions of several objects if they do not differ greatly, or anything in between. &lt;br /&gt;
Notably, such difference algorithms are used in [[molecular biology]] to provide some measure of kinship between different kinds of organisms based on the similarities of their [[macromolecule]]s (such as [[protein]]s or [[DNA]]).&lt;br /&gt;
&lt;br /&gt;
== Extension ==&lt;br /&gt;
&lt;br /&gt;
The extended variant of the problem includes a new type of edit operation: swapping any two adjacent symbols, with a cost of W&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This version can be solved in polynomial time under certain restrictions on edit operation costs.&amp;lt;ref name=&amp;quot;lowrancewagner&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;wagner&amp;quot;&amp;gt;{{cite book |last1=Wagner |first1=Robert A. |title=Proceedings of seventh annual ACM symposium on Theory of computing - STOC &amp;#039;75 |chapter=On the complexity of the Extended String-to-String Correction Problem |date=May 1975 |pages=218–223 |doi=10.1145/800116.803771 |isbn=9781450374194 |s2cid=18705107 |chapter-url=https://dl.acm.org/doi/10.1145/800116.803771}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Robert A. Wagner (1975) showed that the general problem is [[NP-complete]]. In particular, he proved that when W&amp;lt;sub&amp;gt;I&amp;lt;/sub&amp;gt; &amp;lt; W&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt; = W&amp;lt;sub&amp;gt;D&amp;lt;/sub&amp;gt; = ∞ and 0 &amp;lt; W&amp;lt;sub&amp;gt;S&amp;lt;/sub&amp;gt; &amp;lt; ∞ (or equivalently, changing and deletion are not permitted), the problem is NP-complete.&amp;lt;ref name=&amp;quot;wagner&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Problems on strings]]&lt;br /&gt;
[[Category:NP-complete problems]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Mikhail Ryazanov</name></author>
	</entry>
</feed>