This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Algorithms  Exercise 2 TA in charge: Omri 1. Please read the section in Cormen about “Huffman codes” (section 16.3 in the second edition and 17.3 in the first edition). You may be asked to explain the algorithm in class. 2. You are given a series of words ( w 1 ,w 2 ,...,w n ) in varying lengths. We are interested in assigning all 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 total number of unused characters in all nonempty lines. (in a line in which the sum of lengths of all the words is K , the number of unused characters is L K ) Suggest an algorithm that solves the problem. 3. Are the following matroids? prove or give a counter example: (a) ( S,I ) such that S is a finite nonempty set and let S 1 ,S 2 ,...,S k a partition of S into nonempty disjoint subsets, and I = { A :  A ∩ S i  ≤ 1 for all i = 1 ,...,k,....
View
Full
Document
This note was uploaded on 03/08/2010 for the course ENGINEERIN 5022432 taught by Professor Prizler during the Spring '10 term at Tel Aviv Uni..
 Spring '10
 Prizler
 Algorithms

Click to edit the document details