Question

(a) Use the dynamic programming algorithm seen in the course to compute the edit distance between the strings "carrot" and "crow". Also provide the actual edits.[6 marks] (b) State the worst-case running time of the algorithm in Question 2a, for strings of size n and m.[4 marks] (c) Outline how the algorithm can be made to run faster for instances where the strings are similar, i.e., the edit distance is small.[6 marks] (d) Figure 1 shows a directed graph with an s-t flow of value 2 (thick edges). Allarcs have capacity 1. i. Construct the residual flow network. ii. Is the flow a max-flow? Justify your answer. (e) Describe a method for computing an s-t min-cut given an s-t max-flow, in a directed graph D.[6 marks]

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7

Fig: 8