Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Edit distance, alignment?

Dikenal juga sebagai: edit distance · alignment

Definition 28.5 High School Computer Science · Bab 28 — Dynamic Programming

The edit distance between two sequences is the smallest number of operations that turn the first into the second, each operation inserting one element, deleting one, or replacing one by another. An alignment of two sequences writes them one above the other, with gaps, so that each column holds two equal elements, two different ones (a replacement), or an element and a gap (an insertion or a deletion).

Baca dalam konteks →
Definition 23.4 University Computer Science — Year 1 · Bab 23 — Dynamic Programming

The edit distance d(a,b)d(a, b) of two words is the smallest number of single-letter insertions, deletions and substitutions that turn aa into bb. An alignment of aa and bb writes them one above the other with gaps (written -), so that no column holds two gaps; its cost is the number of columns whose two entries differ.

The table of , row i for a[:i] and column j for b[:j]. The arrows follow the walk back from D(5, 5) = 2: each step goes to a neighbour that gives the cell its value. The path spells the alignment train- over -rains.
The table of Output 23.2, row ii for a[:i]a[{:}i] and column jj for b[:j]b[{:}j]. The arrows follow the walk back from D(5,5)=2D(5, 5) = 2: each step goes to a neighbour that gives the cell its value. The path spells the alignment train- over -rains.
Baca dalam konteks →