2ème cours cours mpri 2010 2011habib/documents/cours_2_2010.pdfthe memory word graf[x,y] therefore...
TRANSCRIPT
![Page 1: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/1.jpg)
2eme Cours Cours MPRI 2010–2011
2eme CoursCours MPRI 2010–2011
Michel [email protected]
http://www.liafa.jussieu.fr/~habib
Chevaleret, septembre 2010
![Page 2: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/2.jpg)
2eme Cours Cours MPRI 2010–2011
Schedule
Comments on last course
Chordal graphsLexicographic Breadth First Search LexBFSSimplicial elimination scheme
Exercices
![Page 3: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/3.jpg)
2eme Cours Cours MPRI 2010–2011
Comments on last course
Fagin’s Theorems again
Fagin’s theorems in structural complexity
Characterizations without any notion of machines or algorithms !
NP
The class of all graph-theoretic properties expressible in existentialsecond-order logic is precisely NP.
P
The class of all graph-theoretic properties expressible in Hornexistential second-order logic with successor is precisely P.
![Page 4: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/4.jpg)
2eme Cours Cours MPRI 2010–2011
Comments on last course
Quadratic space in linear time
◮ Select a 2-dimensional array GRAF of size n2
construct an auxillary unidimensional array of size m EDGE :For j=1 to mxy being the j th edge of GGRAF [x , y ] = jEDGE [j] = a pointer to the memory word GRAF [x , y ]
◮ The construction of the EDGE array requires O(m) time
◮ Memory used n2 +m ∈ O(n2)
![Page 5: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/5.jpg)
2eme Cours Cours MPRI 2010–2011
Comments on last course
◮ xy ∈ E iff EDGE [GRAF [x , y ]] contains a pointer pointing tothe memory word GRAF [x , y ]
◮ Therefore the query : xy ∈ E ?Can be done in 2 tests O(1).
![Page 6: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/6.jpg)
2eme Cours Cours MPRI 2010–2011
Comments on last course
Any graph solution for the rectangle problem ?
![Page 7: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/7.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
A nice graph
Start with the graph of the planar tiling and keep exactly 2integers edges by rectangle.This yields a graph (possibly with parallel edges) in whichall vertices have even degrees except the corners.Take a maximal path starting in one corner ....
![Page 8: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/8.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
Lexicographic Breadth First Search (LexBFS)
Data: a graph G = (V ,E ) and a start vertex s
Result: an ordering σ of V
Assign the label ∅ to all verticeslabel(s)← {n}for i ← n a 1 do
Pick an unumbered vertex v with lexicographically largest labelσ(i)← vforeach unnumbered vertex w adjacent to v do
label(w)← label(w).{i}end
end
![Page 9: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/9.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
1
76
5
4
3
2The ordering of the LexBFS search is 7,6,5,4,3,2,1. Note that thereverse ordering is not simplicial, since G is not chordal
![Page 10: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/10.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
It is just a breadth first search with a tie break rule.We are now considering a characterization of the
order in which a LexBFS explores the vertices.
![Page 11: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/11.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
Property (LexB)
an order σ on V , if a < b < c and ac ∈ E but ab /∈ E , then itexists a vertex d such that d < a and db ∈ E and dc /∈ E .
d cba
Theorem
For a graph G = (V ,E ), an order σ on V is a LexBFS of G iff σsatisfies property (LexB).
![Page 12: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/12.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
4 points condition
Questions◮ Under which condition an order σ on V correspond to some
graph search ?
◮ What are the properties of these orderings ?
Main reference :
D.G. Corneil et R. M. Krueger, A unified view of graph searching,SIAM J. Discrete Math, 22, N 4 (2008) 1259-1276
![Page 13: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/13.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Lexicographic Breadth First Search LexBFS
A characterisation theorem for chordal graphs
Theorem
Dirac 1961, Fulkerson, Gross 1965, Gavril 1974, Rose, Tarjan,Lueker 1976.
(0) G is chordal (every cycle of length ≥ 4 has a chord) .
(i) G has a simplicial elimination scheme
(ii) Every minimal separator is a clique
![Page 14: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/14.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Simplicial
5
1 4 38
6 7 2
A vertex is simplicial if its neighbourhood is a clique.
Simplicial elimination scheme
σ = [x1 . . . xi . . . xn] is a simplicial elimination scheme if xi issimplicial in the subgraph Gi = G [{xi . . . xn}]
ca b
![Page 15: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/15.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Minimal Separators
A subset of vertices S is a minimal separator if Gif there exist a, b ∈ G such that a and b are not connected inG − S .and S is minimal for inclusion with this property .
![Page 16: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/16.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Chordal graphs are hereditary
![Page 17: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/17.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Theorem [Tarjan et Yannakakis, 1984]
G is a chordal graph iff every LexBFS ordering provides a simplicialelimination scheme.
1
1 8
7
6
5
4
32
![Page 18: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/18.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
How can we prove such an algorithmic theorem ?
1. A direct proof, finding the invariants ?
2. Find some structure of chordal graphs
3. Understand how LexBFS explores a chordal graph
![Page 19: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/19.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
A direct proof
Theorem [Tarjan et Yannakakis, 1984]
G is a chordal graph iff every LexBFS ordering provides a simplicialelimination scheme.
![Page 20: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/20.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Demonstration.
Let c be the leftmost non simplicial vertex.Therefore it exists a < b ∈ N(c) with ab /∈ E . Using LexBproperty, it necessarily exists d < a with db ∈ E and dc /∈ E .Since G is chordal, we have ad /∈ E (else we would have the cycle[a, c , b, d ] without a chord).But then considering the triple d , a, b, it exists d ′ < d such thatd ′a ∈ E and d ′b /∈ E .If dd ′ ∈ E , using the cycle [d , d ′, a, c , b] we must have the chordd ′c ∈ E which provides the cycle [d , d ′c , b] which has no chord.Therefore dd ′ /∈ E .And we construct an infinite sequence of such d and d’.
![Page 21: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/21.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Consequences
G has a linear number of maximal cliques.Computing a maximum clique ω(G ) is polynomial.Computing χ(G ) also
![Page 22: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/22.jpg)
2eme Cours Cours MPRI 2010–2011
Chordal graphs
Simplicial elimination scheme
Let C(x , y) be the set of maximal cliques that contain x and y.
Clique Consecutivity property
In a lexBFS ordering τ if y is the first vertex after x s.t.(C (x , y)) = {C}, then the elements of C visited after x areconsecutive in τ .
![Page 23: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/23.jpg)
2eme Cours Cours MPRI 2010–2011
Exercices
Helly Property
Definition
A subset family {Ti}i∈I satisfies Helly property ifJ ⊆ I et ∀i , j ∈ J Ti ∩ Tj 6= ∅ implies ∩i ∈JTi 6= ∅
Exercise
Subtrees in a tree satisfy Helly property.
![Page 24: 2ème Cours Cours MPRI 2010 2011habib/Documents/Cours_2_2010.pdfthe memory word GRAF[x,y] Therefore the query : xy ∈E? Can be done in 2 tests O(1). 2`eme Cours Cours MPRI 2010–2011](https://reader033.vdocuments.mx/reader033/viewer/2022041420/5e1e6b614b33f83d3c71de80/html5/thumbnails/24.jpg)
2eme Cours Cours MPRI 2010–2011
Exercices
Classes of twin vertices
Definition
x and y are called false twins, (resp. true twins) ifN(x) = N(y) (resp. N(x) ∪ {x} = N(y) ∪ {y}))