22
An algorithm for counting m An algorithm for counting m aximum weighted independen aximum weighted independen t sets and its application. t sets and its application. Appeared in SODA 02, Appeared in SODA 02, by Vilhelm Dahullof, Peter J by Vilhelm Dahullof, Peter J onsson onsson Presenter Jie Meng Presenter Jie Meng

An algorithm for counting maximum weighted independent sets and its application. Appeared in SODA 02, by Vilhelm Dahullof, Peter Jonsson Presenter Jie

  • View
    224

  • Download
    1

Embed Size (px)

Citation preview

An algorithm for counting maxAn algorithm for counting maximum weighted independent imum weighted independent

sets and its application.sets and its application.Appeared in SODA 02, Appeared in SODA 02,

by Vilhelm Dahullof, Peter Jonssby Vilhelm Dahullof, Peter Jonssonon

Presenter Jie MengPresenter Jie Meng

OutlineOutline

DefinitionDefinition HardnessHardness Main ContributionMain Contribution Divide and ConquerDivide and Conquer AlgorithmsAlgorithms

DefinitionDefinition

Independent Set: Given a graph G=(V, E), an Independent Set: Given a graph G=(V, E), an independent set of G is a set I of vertices independent set of G is a set I of vertices in G, such that no vertices in I are in G, such that no vertices in I are adjacent. (For each pair u, v in I, (u, v) is adjacent. (For each pair u, v in I, (u, v) is not in E;) not in E;)

Maximum I.S. : the size of I, (denoted by|I|), Maximum I.S. : the size of I, (denoted by|I|), is maximum; is maximum;

Maximum Weighted I.S. : the summation of Maximum Weighted I.S. : the summation of weights of vertices in I is maximum; weights of vertices in I is maximum;

DefinitionDefinition

Counting Function: Given an optimizatioCounting Function: Given an optimization n problem problem Q=(l, s, f, opt),Q=(l, s, f, opt), g(.)g(.) is a counting is a counting function for Q if for any instance x, function for Q if for any instance x, g(x)g(x) is the number of how many optimal is the number of how many optimal solutions in s(x); solutions in s(x);

Counting function for Max. Weighted I.S.Counting function for Max. Weighted I.S.#mis(G)=(c, s);#mis(G)=(c, s); where where ss is the weight of the is the weight of the heaviest I.S., heaviest I.S., cc is number of I.S. in G of wei is number of I.S. in G of weight ght ss

Hardness for Max. I.S.Hardness for Max. I.S.

Maximum independent Set problem Maximum independent Set problem is NP-hard, so is the max. weighted is NP-hard, so is the max. weighted I.S.;I.S.;

Approximation: It’s nApproximation: It’s n1-c1-c-nonapprox. -nonapprox. For any constant c>0;For any constant c>0;

Efficiently exponential time Efficiently exponential time algorithmalgorithm; ;

Hardness for Max. I.S. for Max. I.S.

Trivially solvable in O(2Trivially solvable in O(2nn););O(1.2599O(1.2599nn) by Tarjan etc. in 1977) by Tarjan etc. in 1977O(1.2345O(1.2345nn) by Jian in 1986) by Jian in 1986Robson in 1986 Robson in 1986

O(1.2243O(1.2243nn) & poly. space ) & poly. space O(1.2108O(1.2108nn) & expe. space by Robson in 1986 ) & expe. space by Robson in 1986

Beigel in 1999, O(1.2226Beigel in 1999, O(1.2226nn) ) Best so far, O(1.21Best so far, O(1.21nn))

Hardness for Max. I.S.Hardness for Max. I.S.

How good it is?How good it is? For n=50, trivial algorithm need 13 For n=50, trivial algorithm need 13

days on a desktop;days on a desktop; For n=100, the last algorithm need For n=100, the last algorithm need

0.5 second on the same desktop;0.5 second on the same desktop;

Hardness for CountingHardness for Counting

In general, counting the number of In general, counting the number of solutions is harder than find a solutions is harder than find a solution;solution;

The original problem is easy, then The original problem is easy, then counting problem might be hard;counting problem might be hard;

The original problem is hard, then The original problem is hard, then counting problem will be hard.counting problem will be hard.

Counting Max. I.S. is #P-complete;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|,

G GU={ | ( , ) E, N (x), v N (x) {x}}u u v u

} ),(max{ (G)

u; of degree The:)(

Vuu

u

x

vz

y u

N(x) is the set of neighbore of x, N(x)={ u, y, z};

L(x)=|{u}|=1;

Divide and ConquerDivide and Conquer

Divide the problem into several subprobDivide the problem into several subproblem;lem;

Compute the solution for each subproblCompute the solution for each subproblem;em;

Combine those solutions, compute the sCombine those solutions, compute the solution for the original problem;olution for the original problem;

Algorithm-DivideAlgorithm-Divide

Given graph G, pick up a vertex x in G of Given graph G, pick up a vertex x in G of degree no less than 4:degree no less than 4:

Case 1: x is in the I.S., then we can remoCase 1: x is in the I.S., then we can remove x and N(x) from G, the residual graph ve x and N(x) from G, the residual graph is denoted by Gis denoted by G11=G-{x}-N(x);=G-{x}-N(x);

Case 2: x in not in I.S., then we can remCase 2: x in not in I.S., then we can remove x from G, the residual graph is denoove x from G, the residual graph is denoted by ted by GG22=G-{x};=G-{x};

AlgorithmAlgorithm

Recursively compute the solutions for Recursively compute the solutions for G1 and G2, (that is we keep dividing thG1 and G2, (that is we keep dividing the graph to subgraph untill the size of se graph to subgraph untill the size of subgraph is constant) ubgraph is constant)

#mis(G#mis(G11)=(c)=(c11, s, s11)) #mis(G#mis(G22)=(c)=(c22, s, s22););

G

G1 G2

G21 G22G11 G12

x in x out

Algorithm-ConquerAlgorithm-Conquer

Combine the solutions of GCombine the solutions of G11, and G, and G22, #, #mis(Gmis(G11)=(c)=(c11, s, s11), #mis(G), #mis(G22)=(c)=(c22, s, s22))

suppose #mis(G)=(c, s), thensuppose #mis(G)=(c, s), thenIf sIf s11+w(x)> s+w(x)> s22, then c=c, then c=c11, s=s, s=s11+w(x);+w(x);If sIf s11+w(x)< s+w(x)< s22, then c=c, then c=c22, s=s, s=s22;;If sIf s11+w(x) = s+w(x) = s22, then c=c, then c=c11+c+c22, s=s, s=s22;;

AlgorithmAlgorithm

Running time: T(|G|) is the running of tRunning time: T(|G|) is the running of the algorithm on G; thenhe algorithm on G; then

T(|G|)= T(|GT(|G|)= T(|G11|)+ T(|G|)+ T(|G22|);|); More precisely, here we use the numbMore precisely, here we use the numb

er of vertices as the size of the graph, ter of vertices as the size of the graph, then hen T(n)=T(n-5)+T(n-1);T(n)=T(n-5)+T(n-1);

T(n)=O(1.3247T(n)=O(1.3247nn))

Algorithm for graph of degree less Algorithm for graph of degree less than 4than 4

If the maximum degree of G is no larger If the maximum degree of G is no larger than 2, then it’s poly-time solvable, Othan 2, then it’s poly-time solvable, O(n(n22););

If the maximum degree of G is no larger If the maximum degree of G is no larger than 3; For x of degree 3, we have two cthan 3; For x of degree 3, we have two case:ase:

If LIf LGG(x)>1, branch on x;(x)>1, branch on x; If LIf LGG(x)=|{u}|=1, branch on u;(x)=|{u}|=1, branch on u;

Algorithm for graph of degree 3Algorithm for graph of degree 3

x

v

z

y

u

• L(x)=|{u,z}|=2>1

w

•If x is in, then (x, y) (x, u) (x, z) (u, v) (z, w) is removed;

Algorithm for graph of degree Algorithm for graph of degree 33

x

v

z

y

u

• L(x)=|{u,z}|=2>1

w

•If x is not in, then (x, y) (x, u) (x, z) is removed;

Algorithm for graph of degree Algorithm for graph of degree 33

• L(x)>1:• How good it is!• We take the number of edges as the siz

e of the graph, then we have:• T(m)=T(m-5)+T(m-3);• T(m)=O(1.1939m);

Algorithm for graph of degree Algorithm for graph of degree 33• L(x)=|{u}|=1

x

vz

y u

•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!Homework!

Formally define Maximum weighted iFormally define Maximum weighted independent set problem;ndependent set problem;

Explain how horrible it is that Max. I.S.Explain how horrible it is that Max. I.S. is n is n1-c1-c non-approx. for any c>0, show non-approx. for any c>0, show what kind of solution you can expect;what kind of solution you can expect;

Write the time function for the case thWrite the time function for the case that the degree of graph is equal to 3 and at the degree of graph is equal to 3 and L(x)=1; take both the numbers of verticL(x)=1; take both the numbers of vertices and edges as the size of the graph.es and edges as the size of the graph.

Questions!Questions!

[email protected]

Good luck and have a nice Good luck and have a nice weekend!weekend!