This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Algorithms in the Real World (15-853), Fall 09 Assignment #5 Due: Nov 12 You can look up material on the web and books, but you cannot look up solutions to the given problems. You can work in groups, but must write up the answers individually. Problem 1: Solving a Recurrence (5pt) For the space-efficient Edit Distance problem (Lecture 3), we used the recurrence: T ( n,m ) = T ( n/ 2 ,k ) + T ( n/ 2 ,m- k ) + O ( mn ) T (1 ,m ) = m T ( n, 1) = n Give a formal proof that T ( m,n ) = O ( mn ) . Problem 2: 10pt Given two strings S 1 and S 2 and a text T , you want to find whether there is an occurrence of S 1 and S 2 interwoven in T , possibly with spaces. For example, the strings abac and bbc occur inter- woven in cabcbabcca . Give an efficient algorithm for this problem (i.e. one that is polynomial in the size of the inputs). Problem 3: 10pt Consider the following gap model each insertion or deletion costs a unit. However, if there are more than k consecutive insertions, or k consecutive deletions, they cost only...
View Full Document
This note was uploaded on 01/26/2010 for the course COMPUTER S 15-853 taught by Professor Guyblelloch during the Fall '09 term at Carnegie Mellon.
- Fall '09