Question: Given two strings A = wxyz and B = xzy , there exist several ways to measure the similarity ( dissimilarity

Given two strings A="wxyz" and B="xzy", there exist several ways to measure the similarity (dissimilarity) between them. For the following measurement, please describe the corresponding algorithm using the dynamic programming approach and illustrate by the given example. Note that, not only the cost, but the editing steps are required to be illustrated.
(1) Dissimilarity based on the string editing in which three types of editing (insert, delete, replace a character) are allowed. Each editing step is assigned a cost of 1.
(2) The same as the above with the exception that replacement is not allowed.
(3) The same as (1), with the following exception. Each deletion step is assigned a cost of 2.
(4) The same as (1), with the exception that the transposition operation (exchange adjacent characters) is also allowed. (i.e. four editing operations are allowed.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!