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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online