Thursday, July 2, 2026
SAVED POSTS
  • Login
  • Register
RathBiotaClan
No Result
View All Result
  • HOME
  • HEALTH SCIENCE

    TRENDING ON HEALTH (TOP)

    Fick Method Underestimates Heart Problems in Children After Heart Transplant, Study Finds

    For Women on Antidepressants, Creatine Showed a Possible Extra Boost

    Did the iPhone Quietly Reshape When and Whether Americans Have Children?

    For People Antidepressants Never Helped, a 30-Minute Home Session Is Now FDA-Approved

    NOW ON AIR (RBC)

    BIOINFORMATICS

    The Edit Distance Between Two Strings Alignment

    July 2, 2026
    fick principle
    HEALTH SCIENCE

    Fick Method Underestimates Heart Problems in Children After Heart Transplant, Study Finds

    July 2, 2026
    From sequence to function: Bridging single-molecule kinetics and molecular diversity | Science
    BIOINFORMATICS

    Importance of Sequence Comparison in Molecular Biology | Exam Notes

    July 2, 2026
    Three minimum tile paths from bacterial artificial
    BIOINFORMATICS

    Minimal Tiling Clone Sets and Fingerprinting in Physical Mapping of DNA

    July 1, 2026
  • NEUROSCIENCE
    • PHYSIOLOGY
    • IMMUNOLOGY
    • CANCER
  • DISCOVERIES
    • SPOTLIGHTS
    • STUDENT PORTAL
    • SCIENCE FEATURED
  • MOLECULAR BIOLOGY
    • GENETICS
    • BIOTECHNOLOGY
    • BIOINFORMATICS
    • BIOCHEMISTRY
    • BIOPHYSICS
  • ZOOLOGY & ECOLOGY
    • ENVIRONMENTAL SCIENCE
    • ECOLOGY
    • EVOLUTION
  • MICRO & PLANT SCIENCE
    • MICROBIOLOGY
    • CELL BIOLOGY
    • DEVELOPMENTAL BIOLOGY
  • PSYCHOLOGY
RathBiotaClan
RathBiotaClan
No Result
View All Result
Home BIOINFORMATICS

The Edit Distance Between Two Strings Alignment

Shibasis Rath by Shibasis Rath
July 2, 2026
in BIOINFORMATICS, STUDENT PORTAL
Reading Time: 7 mins read
0
A A
0

Comparing two strings and measuring how different or similar they are is a fundamental problem in computer science, with applications in evolutionary and structural biology, textual database retrieval, and spelling correction. Among the various ways of formalizing the notion of distance between two strings, the most common and simplest formalization is known as edit distance.

Edit distance measures the difference between two strings in terms of the minimum number of elementary operations required to transform one string into the other. Closely related to edit distance is the concept of string alignment, which provides an alternative, more visual way of representing the same relationship between two strings. Both concepts are widely used together and are foundational to the study of dynamic programming applied to string comparison.

Edit Operations

The transformation of one string into another is carried out using a set of permitted operations performed on individual characters. These operations are:

  1. Insertion (I) – inserting a character into the first string.
  2. Deletion (D) – deleting a character from the first string.
  3. Substitution or Replacement (R) – replacing a character in the first string with a character from the second string.
  4. Match (M) – a non-operation, indicating that a character is common to both strings and requires no change.

These four symbols—I, D, R, and M—are used to construct what is known as an edit transcript.

ADVERTISEMENT

Edit Transcript

Definition: A string composed of the symbols I, D, R, and M that describes how one string can be transformed into another is called an edit transcript.

READ ALSO

Importance of Sequence Comparison in Molecular Biology | Exam Notes

Minimal Tiling Clone Sets and Fingerprinting in Physical Mapping of DNA

To understand how an edit transcript works, two pointers, next1 and next2, are maintained over the first string (S1) and the second string (S2) respectively. Both pointers initially point to the first character of their respective strings. The transcript is read from left to right, and operations are applied as follows:

ADVERTISEMENT
  • When the symbol I is encountered, the character pointed to by next2 is inserted into S1, and next2 is incremented.
  • When the symbol D is encountered, the character pointed to by next1 is deleted from S1, and next1 is incremented.
  • When the symbol R or M is encountered, the character at next1 is either replaced or matched with the character at next2, and both pointers are incremented.

Example: Consider transforming the string “vintner” into “writers.” The edit transcript for this transformation is:

ADVERTISEMENT
R I M D M D M M I
v _ i n t n e r _
w r i _ t _ e r s

Here, v is replaced by w (R), r is inserted (I), i is matched (M), n is deleted (D), t is matched (M), n is deleted (D), e and r are matched (M, M), and finally s is inserted (I).

Edit Distance

Definition: The edit distance between two strings is defined as the minimum number of edit operations—insertions, deletions, and substitutions—required to transform the first string into the second string. It is important to note that matches are not counted while calculating edit distance, since a match does not represent a change.

Edit distance is also known as Levenshtein distance, named after V. Levenshtein, who is credited with first introducing this concept.

An edit transcript that achieves the transformation using the minimum possible number of operations is referred to as an optimal transcript. Since more than one transcript may achieve this same minimum number of operations, such transcripts are collectively called cooptimal transcripts.

The edit distance problem therefore involves two tasks:

  • Computing the numerical edit distance between two given strings.
  • Determining an optimal edit transcript that describes the actual transformation.

Alternative Interpretation of Edit Distance

Although edit distance is defined as the minimum number of operations needed to convert the first string into the second, it can equivalently be viewed as the minimum number of operations performed on either of the two strings so that both strings are transformed into a common third string. This interpretation is mathematically equivalent to the original definition, because an insertion performed on one string can always be viewed as a deletion performed on the other string, and vice versa.

String Alignment

Definition: A global alignment of two strings S1 and S2 is obtained by inserting chosen spaces (or dashes) into or at the ends of S1 and S2, and then placing the two resulting strings one above the other, such that every character or space in either string corresponds to a unique character or space in the other string.

The term “global” is used to emphasize that the entire length of both strings participates in the alignment. This is in contrast to local alignment, where only selected portions of the strings are aligned (a concept studied separately).

Example: Consider the alignment of the strings “qacdbd” and “qawxb”:

q a c _ d b d
q a w x _ b _

In this alignment, the character c is mismatched with w, and the remaining positions involve either matches or spaces opposite characters.

Relationship Between Alignment and Edit Transcript

From a mathematical point of view, an alignment and an edit transcript are equivalent ways of describing the relationship between two strings, and one can be converted into the other. The correspondence between the two is as follows:

  • Two opposing characters that mismatch in an alignment correspond to a substitution (R) in the edit transcript.
  • A space in the first string of the alignment corresponds to an insertion (I) of the opposing character into the first string.
  • A space in the second string of the alignment corresponds to a deletion (D) of the opposing character from the first string.

Therefore, the edit distance between two strings can also be defined as the alignment that minimizes the total number of mismatched opposing characters plus the number of characters opposite spaces.

Conceptual Difference Between Alignment and Edit Transcript

Although alignment and edit transcript are mathematically equivalent, they differ conceptually:

  • An edit transcript emphasizes the actual mutational events (such as point mutations) that transform one string into another. It represents the process of transformation.
  • An alignment, on the other hand, only displays the final relationship or correspondence between the two strings. It represents the product of the transformation, without specifying the process.

This distinction is significant in evolutionary modeling, because different evolutionary models may permit different sets of string operations, and yet these different models can still result in the same final alignment. In other words, an alignment alone does not reveal which underlying mutational model produced it. For this reason, the language of “alignment” is often preferred over “edit transcript” in comparative and evolutionary studies, since it is more neutral and does not commit to any particular process. Alignment terminology is also more natural and convenient when extending the discussion to multiple sequence comparison, where more than two strings are compared simultaneously.

Significance of Edit Distance and Alignment

  • They provide a precise, quantitative measure of similarity or dissimilarity between two strings.
  • They form the mathematical basis for dynamic programming algorithms used in sequence comparison.
  • They are extensively applied in bioinformatics for comparing DNA, RNA, and protein sequences.
  • They are used in spelling correction systems to suggest the closest matching word.
  • They are applied in textual database retrieval to identify approximate matches.

Conclusion

Edit distance and string alignment together form the conceptual foundation for comparing two strings. While edit distance provides a numerical measure of dissimilarity based on the minimum number of insertion, deletion, and substitution operations, alignment offers a visual and structural representation of the same relationship. Both concepts are interconvertible, yet alignment is generally preferred in comparative and evolutionary biology due to its neutrality regarding the underlying process of transformation. These ideas serve as the starting point for more advanced techniques in dynamic programming, including local alignment and multiple sequence alignment.

  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Shibasis Rath

Shibasis Rath

"𝓒𝓸𝓷𝓷𝓮𝓬𝓽𝓲𝓷𝓰 𝓡𝓮𝓼𝓮𝓪𝓻𝓬𝓱 𝓣𝓸 𝓡𝓮𝓪𝓵𝓲𝓽𝔂" 𝓲𝓼𝓷'𝓽 𝓙𝓾𝓼𝓽 𝓪 𝓜𝓸𝓽𝓽𝓸 - 𝓘𝓽'𝓼 𝓜𝔂 𝓜𝓲𝓼𝓼𝓲𝓸𝓷

Related Posts

From sequence to function: Bridging single-molecule kinetics and molecular diversity | Science
BIOINFORMATICS

Importance of Sequence Comparison in Molecular Biology | Exam Notes

July 2, 2026
Three minimum tile paths from bacterial artificial
BIOINFORMATICS

Minimal Tiling Clone Sets and Fingerprinting in Physical Mapping of DNA

July 1, 2026
Building config from cloned genome fragments
BIOINFORMATICS

Building Contigs from Cloned Genome Fragments: Coverage, Assembly & Statistical Analysis

July 1, 2026

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

POPULAR NEWS

Chewing gum releases thousands of microplastic particles directly into your mouth with every piece you chew

Chewing gum releases thousands of microplastic particles directly into your mouth with every piece you chew

by Shibasis Rath
May 8, 2026
0

Microplastics are turning up in places researchers never expected: deep-sea sediments, Arctic ice, and human blood. Now, a UCLA pilot...

woman in white tank top lying on bed

New Studys Says Gen Z is the least sexually active young cohort in modern recorded history

by Shibasis Rath
January 24, 2026
0

A generation that grew up with dating apps in their pockets, pornography a tap away, and sex discussed more openly...

grayscale photo of girl in polka dot long sleeve shirt

Yelling Isn’t Just Yelling: How a Hostile Home Rewires a Child’s Brain for Constant Alert

by Shibasis Rath
March 8, 2026
0

To a parent in the heat of the moment, a raised voice may feel like simple frustration. To a child...

a group of gen Z kids walking down a street

Is Gen Z the First Generation Less Intelligent Than Their Parents?

by Shibasis Rath
February 5, 2026
0

Gen Z intelligence decline is emerging as a serious concern among neuroscientists and education researchers. For over a century, each...

Whole Brain Emulation Achieved: Scientists Run a Fruit Fly Brain in Simulation

by Shibasis Rath
March 9, 2026
0

Scientists have copied an entire biological brain neuron by neuron and synapse by synapse and made it control a simulated...

EDITOR CHOICE‘S

  • All
  • NEWS
  • SPOTLIGHTS
The Edit Distance Between Two Strings Alignment

The Edit Distance Between Two Strings Alignment

by Shibasis Rath
July 2, 2026
0

Comparing two strings and measuring how different or similar they are is a fundamental problem in computer science, with applications...

fick principle

Fick Method Underestimates Heart Problems in Children After Heart Transplant, Study Finds

by Shibasis Rath
July 2, 2026
0

Researchers at Ann & Robert H. Lurie Children's Hospital of Chicago found poor agreement between two common methods of measuring...

From sequence to function: Bridging single-molecule kinetics and molecular diversity | Science

Importance of Sequence Comparison in Molecular Biology | Exam Notes

by Shibasis Rath
July 2, 2026
0

Sequence comparison, especially when supported by systematic collection, curation, and searching of biological sequence databases, has become one of the...

Three minimum tile paths from bacterial artificial

Minimal Tiling Clone Sets and Fingerprinting in Physical Mapping of DNA

by Shibasis Rath
July 1, 2026
0

Minimal tiling clone sets represent an efficient approach in genome mapping where the entire genomic sequence is covered by a...

ADVERTISEMENT

RathBiotaClan – RBC

RathBiotaClan – Connecting Research To Reality

Your trusted source for life science news, biology research & discoveries. Covering neuroscience, genetics, ecology, and more — connecting research to reality.

About Us

Privacy Policies

Contact Us

Editorial Standard

Latest Posts

  • The Edit Distance Between Two Strings Alignment
  • Fick Method Underestimates Heart Problems in Children After Heart Transplant, Study Finds
  • Importance of Sequence Comparison in Molecular Biology | Exam Notes
  • Minimal Tiling Clone Sets and Fingerprinting in Physical Mapping of DNA

SHIBASIS RATH

Contact Mail

rathbiotaclan@gmail.com

No Result
View All Result
MSME (Udyam) Certified Science Platform
Govt. of India

Get Us On PlayStore

playstore app for rathbiotaclan
  • About Us
  • Advertise With Us
  • Cancellation and Refund Policy
  • Contact Us
  • Contribute
  • Editorial Standards
  • Home
  • Pricing Details
  • Privacy Policies
  • Shipping Policy
  • Terms & Conditions

© 2026 RathBiotaClan. All rights reserved.

Welcome Back!

Sign In with Google
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Google
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
  • HOME
  • HEALTH SCIENCE
  • NEUROSCIENCE
    • PHYSIOLOGY
    • IMMUNOLOGY
    • CANCER
  • DISCOVERIES
    • SPOTLIGHTS
    • STUDENT PORTAL
    • SCIENCE FEATURED
  • MOLECULAR BIOLOGY
    • GENETICS
    • BIOTECHNOLOGY
    • BIOINFORMATICS
    • BIOCHEMISTRY
    • BIOPHYSICS
  • ZOOLOGY & ECOLOGY
    • ENVIRONMENTAL SCIENCE
    • ECOLOGY
    • EVOLUTION
  • MICRO & PLANT SCIENCE
    • MICROBIOLOGY
    • CELL BIOLOGY
    • DEVELOPMENTAL BIOLOGY
  • PSYCHOLOGY
  • Login
  • Sign Up
SAVED POSTS

© 2026 RathBiotaClan. All rights reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.