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

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

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

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern