# ex02 - Algorithms Exercise 2 TA in charge Omri 1 Please...

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

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 non-empty 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 } (b) ( S,I ) such that S is a finite nonempty set and I = { X 1 X 2 : X 1

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern