{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assign5 - Algorithms in the Real World(15-853 Fall 09...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
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 k units. Give an
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online