230 likes | 247 Views
An algorithm for counting maximum weighted independent sets and its application. Appeared in SODA 02, by Vilhelm Dahullof, Peter Jonsson Presenter Jie Meng. Outline. Definition Hardness Main Contribution Divide and Conquer Algorithms. Definition.
E N D
An algorithm for counting maximum weighted independent sets and its application. Appeared in SODA 02, by Vilhelm Dahullof, Peter Jonsson Presenter Jie Meng
Outline • Definition • Hardness • Main Contribution • Divide and Conquer • Algorithms
Definition • Independent Set: Given a graph G=(V, E), an independent set of G is a set I of vertices in G, such that no vertices in I are adjacent. (For each pair u, v in I, (u, v) is not in E;) • Maximum I.S. : the size of I, (denoted by|I|), is maximum; • Maximum Weighted I.S. : the summation of weights of vertices in I is maximum;
Definition • Counting Function: Given an optimization problem Q=(l, s, f, opt),g(.) is a counting function for Q if for any instance x, g(x) is the number of how many optimal solutions in s(x); • Counting function for Max. Weighted I.S.#mis(G)=(c, s); where s is the weight of the heaviest I.S., c is number of I.S. in G of weight s
Hardness for Max. I.S. • Maximum independent Set problem is NP-hard, so is the max. weighted I.S.; • Approximation: It’s n1-c-nonapprox. For any constant c>0; • Efficiently exponential time algorithm;
Hardness for Max. I.S. Trivially solvable in O(2n); O(1.2599n) by Tarjan etc. in 1977 O(1.2345n) by Jian in 1986 Robson in 1986 O(1.2243n) & poly. space O(1.2108n) & expe. space by Robson in 1986 Beigel in 1999, O(1.2226n) Best so far, O(1.21n)
Hardness for Max. I.S. • How good it is? • For n=50, trivial algorithm need 13 days on a desktop; • For n=100, the last algorithm need 0.5 second on the same desktop;
Hardness for Counting • In general, counting the number of solutions is harder than find a solution; • The original problem is easy, then counting problem might be hard; • The original problem is hard, then counting problem will be hard. • Counting Max. I.S. is #P-complete;
Main contribution: • O(1.3247n)algorithm for counting the maximum weighted I.S. • #mis(G)=(c, s), c is the number of the maximum weighted I.S. and s is the weight of those I.S. • L(x)=|U|,
y u x v z N(x) is the set of neighbore of x, N(x)={ u, y, z}; L(x)=|{u}|=1;
Divide and Conquer • Divide the problem into several subproblem; • Compute the solution for each subproblem; • Combine those solutions, compute the solution for the original problem;
Algorithm-Divide • Given graph G, pick up a vertex x in G of degree no less than 4: • Case 1: x is in the I.S., then we can remove x and N(x) from G, the residual graph is denoted by G1=G-{x}-N(x); • Case 2: x in not in I.S., then we can remove x from G, the residual graph is denoted by G2=G-{x};
Algorithm • Recursively compute the solutions for G1 and G2, (that is we keep dividing the graph to subgraph untill the size of subgraph is constant) #mis(G1)=(c1, s1) #mis(G2)=(c2, s2); G x in x out G1 G2 G11 G12 G21 G22
Algorithm-Conquer • Combine the solutions of G1, and G2, #mis(G1)=(c1, s1), #mis(G2)=(c2, s2) • suppose #mis(G)=(c, s), then If s1+w(x)> s2, then c=c1, s=s1+w(x); If s1+w(x)< s2, then c=c2, s=s2; If s1+w(x) = s2, then c=c1+c2, s=s2;
Algorithm • Running time: T(|G|) is the running of the algorithm on G; then • T(|G|)= T(|G1|)+ T(|G2|); • More precisely, here we use the number of vertices as the size of the graph, then T(n)=T(n-5)+T(n-1); • T(n)=O(1.3247n)
Algorithm for graph of degree less than 4 • If the maximum degree of G is no larger than 2, then it’s poly-time solvable, O(n2); • If the maximum degree of G is no larger than 3; For x of degree 3, we have two case: • If LG(x)>1, branch on x; • If LG(x)=|{u}|=1, branch on u;
Algorithm for graph of degree 3 • L(x)=|{u,z}|=2>1 u v y x z w • If x is in, then (x, y) (x, u) (x, z) (u, v) (z, w) is removed;
Algorithm for graph of degree 3 • L(x)=|{u,z}|=2>1 u v y x z w • If x is not in, then (x, y) (x, u) (x, z) is removed;
Algorithm for graph of degree 3 • L(x)>1: • How good it is! • We take the number of edges as the size of the graph, then we have: • T(m)=T(m-5)+T(m-3); • T(m)=O(1.1939m);
Algorithm for graph of degree 3 • L(x)=|{u}|=1 y u x v z • If u is in, then (x, y) (x, u) (x, z) (u, v) or {x, y, z, u} is removed; • If x is not in, then (x, y) (x, u) (x, z) (u, v) or {x, y, z, u} is removed;
Homework! • Formally define Maximum weighted independent set problem; • Explain how horrible it is that Max. I.S. is n1-c non-approx. for any c>0, show what kind of solution you can expect; • Write the time function for the case that the degree of graph is equal to 3 and L(x)=1; take both the numbers of vertices and edges as the size of the graph.
Questions! jmeng@cs.tamu.edu Good luck and have a nice weekend!