Docsity

CMSC 451 HW4: Finding Max Weight Independent Set in an Undirected Tree (Spring 2005) - Pro, Assignments of Computer Science

Toggle sidebar
bg1
CMSC 451: Homework 4, Spring 2005
Due at the beginning of class on April 12, 2005.
Warning: some of the problems require thought - do not wait until the
last day to start working on them!
If you cannot come up with algorithms that run in the required time,
then provide (correct) slower algorithms for partial credit. Write your an-
swers using pseudo-code in the same style as the textbook. These make the
algorithm description precise, and easy to read (as opposed to code in C or
some other language).
1. Recall that an independent set in an undirected graph Gis a subset
Sof the vertices, such that no two elements of Sare neighbors in G.
We are given an undirected tree T; each vertex of Talso has a given
non-negative weight. Design an efficient (polynomial-time) algorithm
to find an independent set of maximum total weight in T. Prove
correctness, and analyze the running time of your algorithm.
2. Problem 2 in Section 6.12, pages 295-296 of the textbook.
3. Problem 3 in Section 6.12, pages 296-297 of the textbook.
4. Problem 7 in Section 6.12, page 300 of the textbook.
1

Partial preview of the text

Download CMSC 451 HW4: Finding Max Weight Independent Set in an Undirected Tree (Spring 2005) - Pro and more Assignments Computer Science in PDF only on Docsity!

CMSC 451: Homework 4, Spring 2005

Due at the beginning of class on April 12, 2005. Warning: some of the problems require thought - do not wait until the last day to start working on them! If you cannot come up with algorithms that run in the required time, then provide (correct) slower algorithms for partial credit. Write your an- swers using pseudo-code in the same style as the textbook. These make the algorithm description precise, and easy to read (as opposed to code in C or some other language).

  1. Recall that an independent set in an undirected graph G is a subset S of the vertices, such that no two elements of S are neighbors in G. We are given an undirected tree T ; each vertex of T also has a given non-negative weight. Design an efficient (polynomial-time) algorithm to find an independent set of maximum total weight in T. Prove correctness, and analyze the running time of your algorithm.
  2. Problem 2 in Section 6.12, pages 295-296 of the textbook.
  3. Problem 3 in Section 6.12, pages 296-297 of the textbook.
  4. Problem 7 in Section 6.12, page 300 of the textbook.