# ex03 - Algorithms Exercise 3 TA in charge Dvir You should...

This preview shows pages 1–2. Sign up to view the full content.

Algorithms - Exercise 3 TA in charge: Dvir You should provide correctness proofs and running-time analysis for all your algorithms. 1. Recall the Longest Common Subsequence problem shown in class. Assume that the algorithm for solving the problem would have used recursion without saving the solutions of subproblem calculations in a table. Show that the running time of the modiFed algorithm is, in the worst case, exponential in the lengths of the given strings. 2. You are given a list L of strings written using the characters A-Z. Give an algorithm that receives a string s and outputs true i± the string is a concatenation of strings from L . 3. You are given a series of words ( w 1 , w 2 , ..., w n ) in varying lengths. We are interested in printing all the words, by the order they are given in , without spaces between them, in a document in which each line may contain at most L characters. You can not divide a word between lines. We are interested in minimizing the sum of the cubes (third power) of the unused characters

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/08/2010 for the course ENGINEERIN 50-22-43-2 taught by Professor Prizler during the Spring '10 term at Tel Aviv Uni..

### Page1 / 2

ex03 - Algorithms Exercise 3 TA in charge Dvir You should...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online