Week 10. Dynamic Programming
Algorithms and Data Structures
11 Week 10. Dynamic Programming
Reading 10 Goodrich & Tamassia: Chapter 12.5
11.0.1 Compulsory Assignment
Problem 11.1 (based on textbook problem P-12.37/38) The edit distance between two strings and is defined as the minimum number of edit operations needed to transfor into . Three different edit operations are allowed, delete a character, insert a character, or replace a character. Note that the edit distance is symmetric, i.e. the distance from to and from to are the same.
Design an algorithm to calculate the edit distance for a pair of strings and .
11.0.2 Other Exercises
Problem 11.2 What is the best way to multiply a chain of matrices with dimensions , , , , and .
Use dynamic programming and fill in the array by hand.
Problem 11.3 Let three integer arrays, , , and , be given, each of size . Given an arbitrary integer , design an -time algorithm to determine if there exists numbers , , such that .
Problem 11.4 Given an -time algorithm for the previous problem.