16:36mcs - wg20041 on the maximum cardinality search lower bound for treewidth hans bodlaender...
Post on 19-Dec-2015
218 views
TRANSCRIPT
20:40 20:40 MCS - WG2004 1
On the Maximum Cardinality
Search Lower Bound for Treewidth
Hans BodlaenderUtrecht University
Arie KosterZIB Berlin
20:40 20:40 MCS - WG2004 3
Contents
• Introduction– Treewidth – Maximum Cardinality Search– Lucena’s result
• Complexity• Bounds on planar graphs• Comparison with degeneracy lower bound• Heuristics and experiments• Conclusions
20:40 20:40 MCS - WG2004 4
Treewidth
• Treewidth of graph = smallest width of tree decomposition (no definition today!)
• Many problems have treewidth-based algorithm with running time exponential only in treewidth– E.g.: Probabilistic inference, frequency assignment
• Method to solve problems– Make tree decomposition of G with small width
– Run `dynamic programming-like’ algorithm on tree decomposition
20:40 20:40 MCS - WG2004 5
Computing treewidth andtree decomposition
• We need algorithms to find tree decompositions and determine treewidth
• Theoretical solutions often not useable • Experimental work:
– Preprocessing
– Upper bound heuristics
– Branch and bound
– ILP methods
– Lower bounds
20:40 20:40 MCS - WG2004 6
Lower bounds
• Inform about quality of upper bounds
• Help to speed up Branch and Bound and ILP methods– Degeneracy– Ramachandramurthi bound – Clautiaux et. al technique– Contraction technique– Lucena (2003): MCS-lower bound
} Can be combinedwith other lowerbound methods
20:40 20:40 MCS - WG2004 7
Recognizing chordal graphs
• Rose, Tarjan, Lueker, 1976: Lexicographic Breadth First Search
• Tarjan, Yannakakis, 1984: Maximum Cardinality Search– Used later also as triangulation heuristic / upper
bound heuristic for treewidth– M-variant by Berry, Blair, Heggernes (2002)
20:40 20:40 MCS - WG2004 8
Maximum Cardinality Search
• Simple mechanism to make a permutation of the vertices of an undirected graph
• Let the visited degree of a vertex be its number of visited neighbors
• the maximum visited degree of a graph is the maximum over all MCS-orderings of the maximum visited degree of a vertex in the ordering.
• Pseudocode for MCS:– First, all vertices are
unvisited
– Repeat• Visit an unvisited
vertex that has the largest visited degree
– Until all vertices are visited
20:40 20:40 MCS - WG2004 10
We can start at any vertex: each vertex has 0
visited neighbors0
0
0
0
0
a
bc
d
e
a, …
20:40 20:40 MCS - WG2004 11
Say, we start at a
0
1
1
0
1
a
bc
d
e
a, …The next vertexmust be b, c, ord. It can not be e.
20:40 20:40 MCS - WG2004 16
Lucena’s theorem
(SIAM J. Disc. Math, 2003):
• The treewidth of a graph is at least its visited degree.
• Task: find an MCS-ordering such that the largest visited degree of a vertex is as large as possible.
20:40 20:40 MCS - WG2004 17
Different orderings can give different maximum
visited degree0
1
0
0
1
a
bc
d
e
e, …
20:40 20:40 MCS - WG2004 21
a has visited degree 3, so the treewidth is at least 3
3
1
2
0
1
a
bc
d
e, b, d, c, …
20:40 20:40 MCS - WG2004 22
Some easy cases
• Clique: maximum visited degree n – 1.
• Grid: maximum visited degree 2.
20:40 20:40 MCS - WG2004 23
Complexity
Instance: graph G, integer k
Question: is the maximum visited degree of G at least k?
• Is an NP-complete problem• Can not be approximated in polynomial time with
constant ratio unless P=NP– Construction: a graph that has maximum visited degree
at least k when a 3-sat formula can be satisfied, and maximum visited degree at most 6 otherwise.
20:40 20:40 MCS - WG2004 24
Planar graphs
• Example of planar graph with O(k!) vertices and with maximum visited degree k.
• Upper bound O(log n) on maximum visited degree of planar graphs with n vertices
20:40 20:40 MCS - WG2004 59
332 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
End of 3rd row
20:40 20:40 MCS - WG2004 60
33
3
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
4th row
20:40 20:40 MCS - WG2004 61
33
43
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
Visited degree 4
20:40 20:40 MCS - WG2004 62
33
443
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
20:40 20:40 MCS - WG2004 63
3
4
3
443
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
20:40 20:40 MCS - WG2004 64
4
3
4
3
443
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
20:40 20:40 MCS - WG2004 65
4
3
4
3
443
2 3 3 3 3 3 3 3
1 2 2 2 2 2 2 2 2 2
5
0 1 1 1 1 1 1 1 1 1
3
2 2
1 1
And reaching a node with visited degree 5
Generalizes to larger values
20:40 20:40 MCS - WG2004 66
Upper bound for planar graphs
Planar graphs have visited degree O(log n).
• Let G be a planar graph with an MCS with visited degree k, of minimum size.
• At each point:– The set of visited vertices is connected– By minimality: the set of unvisited vertices is
connected.
20:40 20:40 MCS - WG2004 67
Definition: Last successor
• The last successor of a vertex v is its last visited neighbor, if it is visited later than v.
• If all neighbors of v are visited before v, v has no last successor.
• Edges from vertices to last successors form a forest.
20:40 20:40 MCS - WG2004 68
Lemma
• If v has visited degree l 6, then there are two vertices w and x with v the last successor of w and of x, and the visited degree of w and x at least l – 4.
20:40 20:40 MCS - WG2004 69
Proof
• Look at set S of last four neighbors of v, visited before v.
• Each has visited degree at least l – 4, otherwise v is visited earlier.
• Look at subgraph of visited vertices. W.l.o.g., suppose unvisited vertices are in exterior face.
• If vertex from S is not at exterior face, v is its last successor.
• We cannot have three vertices from S at exterior face.
v
After z is visited, we must visitv (v.d. 2) instead of vertex inunvisited part with v.d. 1.
z
20:40 20:40 MCS - WG2004 70
Proof of upper bound
• Look at forest of edges to last successor.
• Each node of vd l > 5 has two children with vd at least l – 4.
• There is a node with vd k.
• Forest, and hence G must have more than 2k/4-1 vertices, so k = O(log n).
20:40 20:40 MCS - WG2004 71
MCS lower bound is bad for planar graphs
• Treewidth of planar graphs can be ( n1/2).
• Can be approximated with ratio 1.5 (Seymour & Thomas, Hicks)
• MCS gives O( log n)
20:40 20:40 MCS - WG2004 72
Degeneracy
• Degeneracy or MMD:– Maximum over all subgraphs H of G of
minimum degree of vertex in H– Lower bound on treewidth– Easily computable in O(|V|+|E|) time
20:40 20:40 MCS - WG2004 73
Degeneracy versus maximum visited degree
• Maximum visited degree never smaller than degeneracy– Consider last visited vertex of subgraph with
large minimum degree
• Maximum visited degree sometimes larger than degeneracy– Planar graphs have degeneracy at most 5. – Example shows planar graphs with MCS with
large maximum visited degree
20:40 20:40 MCS - WG2004 74
Heuristics
• Three heuristics for tie-breaking MCS:– First– Largest degree– Smallest degree
• Heuristics that gives upper bound on maximum visited degree (omitted from talk)
}Give lower bound onmaximum visited degree,hence on treewidth
20:40 20:40 MCS - WG2004 75
Graphs alsoused in otherexperiments.
Three casesgive matchingbounds.
Default isneveroutperformed!
Improvements
are incremental.
20:40 20:40 MCS - WG2004 76
Conclusions
• MCS gives incremental improvement to existing lower bounds for treewidth
• Interesting combinatorial questions• Additional techniques (contraction, Clautiaux-
et.al technique) can give considerable improvements
• Sometimes still big gaps, e.g., (close to) planar graphs
20:40 20:40 MCS - WG2004 78
Results
Barley-pp 5 0.00 6 0.00 5 0.00 6 0.00 7Link 4 0.00 5 3.65 4 7.79 5 7.89 25
Link-pp 6 0.01 6 0.60 6 1.27 6 1.20 27Munin1-pp 4 0.00 5 0.02 5 0.04 5 0.05 17Munin2-pp 4 0.00 5 0.15 5 0.30 5 0.29 8Munin3-pp 4 0.00 5 0.05 4 0.10 5 0.10 17Oesoca+-pp 9 0.00 10 0.00 9 0.00 10 0.00 11
Pathfinder-pp 5 0.00 6 0.00 5 0.00 6 0.00 6Pignet2-pp 5 0.01 6 7.59 6 17.42 6 18.02 239
network MMD UPBMCS-def MCS-max MCS-min
Water-pp 6 0.00 8 0.00 7 0.00 8 0.01 10
20:40 20:40 MCS - WG2004 79
Upper bound heuristic
• Each vertex v has upper bound u(v) variable– Invariant: u(v) maximum visited degree of v
• Try to improve upper bounds until no longer possible:– Compute set UN(v) of u(w) of neighbors w of v
– Sort UN(v), say: d1, …, dr. l = 0.
– For i = 1 to r do if di l then l++
– Set u(v) = min { u(v), l }If v is visited with visited degree k,
then v has neighbors w1, …, wk with wi visited before v with
visited degree at least i – 1.
If v is visited with visited degree k,
then v has neighbors w1, …, wk with wi visited before v with
visited degree at least i – 1.
20:40 20:40 MCS - WG2004 80
More on upper bound heuristic
• Improvement: looking at maximum visited degree when v has a neighbor that is visited later
• Improvement 2: looking at maximum visited degree when v is visited before neighbor w: a bound per edge
20:40 20:40 MCS - WG2004 81
Bounds of upper bound heuristics
MCSLB ub1 cpu ub2 cpulink 5 11 0.02 10 0.01link-pp 6 10 0 9 0.02munin1 4 7 0 6 0.01munin1-pp 5 8 0 7 0pignet2 5 9 0.41 8 0.16pignet2-pp 6 11 0.06 9 0.06celar06pp 11 16 0.01 16 0graph11 8 13 0.01 13 0.01graph11-pp 9 14 0 13 0.01graph13 8 14 0.01 13 0.01graph13-pp 8 14 0.01 12 0.02
InstanceMCSLB-max
ub3 cpu10 0.059 0.026 0.017 08 0.169 0.06
16 013 0.0113 0.0113 0.0112 0.02