This preview shows pages 1–12. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473: Algorithms Chandra Chekuri [email protected] 3228 Siebel Center University of Illinois, UrbanaChampaign Fall 2009 Chekuri CS473ug Part I Maximum Weighted Independent Set in Trees Chekuri CS473ug Maximum Weight Independent Set Problem Input Graph G = ( V , E ) and weights w ( v ) ≥ 0 for each v ∈ V Goal Find maximum weight independent set in G A B C D E F 20 5 2 2 10 15 Chekuri CS473ug Maximum Weight Independent Set Problem Input Graph G = ( V , E ) and weights w ( v ) ≥ 0 for each v ∈ V Goal Find maximum weight independent set in G A B C D E F 20 5 2 2 10 15 Maximum weight independent set in above graph: { B , D } Chekuri CS473ug Maximum Weight Independent Set in a Tree Input Tree T = ( V , E ) and weights w ( v ) ≥ 0 for each v ∈ V Goal Find maximum weight independent set in T r a b c d e f g h i j 10 5 8 4 4 9 2 7 8 11 3 Maximum weight independent set in above tree: ?? Chekuri CS473ug Towards a Recursive Solution For an arbitrary graph G : Number vertices as v 1 , v 2 ,..., v n Find recursively optimum solutions without v n (recurse on G v n ) and with v n (recurse on G v n N ( v n ) & include v n ). Saw that if graph G is arbitrary there was no good ordering that resulted in a small number of subproblems. Chekuri CS473ug Towards a Recursive Solution For an arbitrary graph G : Number vertices as v 1 , v 2 ,..., v n Find recursively optimum solutions without v n (recurse on G v n ) and with v n (recurse on G v n N ( v n ) & include v n ). Saw that if graph G is arbitrary there was no good ordering that resulted in a small number of subproblems. What about a tree? Chekuri CS473ug Towards a Recursive Solution For an arbitrary graph G : Number vertices as v 1 , v 2 ,..., v n Find recursively optimum solutions without v n (recurse on G v n ) and with v n (recurse on G v n N ( v n ) & include v n ). Saw that if graph G is arbitrary there was no good ordering that resulted in a small number of subproblems. What about a tree? Natural candidate for v n is root r of T ? Chekuri CS473ug Towards a Recursive Solution Natural candidate for v n is root r of T ? Let O be an optimum solution to the whole problem. Case r 6∈ O Then O contains an optimum solution for each subtree of T hanging at a child of r . Chekuri CS473ug Towards a Recursive Solution Natural candidate for v n is root r of T ? Let O be an optimum solution to the whole problem. Case r 6∈ O Then O contains an optimum solution for each subtree of T hanging at a child of r . Case r ∈ O None of the children of r can be in O . O  { r } contains an optimum solution for each subtree of T hanging at a grandchild of r . Chekuri CS473ug Towards a Recursive Solution Natural candidate for v n is root r of T ? Let O be an optimum solution to the whole problem....
View
Full
Document
This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.
 Fall '08
 Chekuri,C
 Algorithms

Click to edit the document details