4eme Cours : Chordal Graphs MPRI 2012 2013

53
4 eme Cours : Chordal Graphs MPRI 2012–2013 4 eme Cours : Chordal Graphs MPRI 2012–2013 Michel Habib [email protected] http://www.liafa.univ-Paris-Diderot.fr/ ~ habib Chevaleret, octobre 2012

Transcript of 4eme Cours : Chordal Graphs MPRI 2012 2013

Page 1: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

4eme Cours : Chordal GraphsMPRI 2012–2013

Michel [email protected]

http://www.liafa.univ-Paris-Diderot.fr/~habib

Chevaleret, octobre 2012

Page 2: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Schedule

More structural insights of chordal graphs

Properties of reduced clique graphs

Interval graphs

Exercises

Page 3: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Playing with the representation

Easy Exercises :

1. Find a minimum Coloring (resp. a clique of maximum size) ofa chordal graph in O(|V |+ |E |).Consequences : chordal graphs are perfect.At most |V | − 1 maximal cliques (best upper bound, sincestars have exactly |V | − 1 maximal cliques).

2. Find a minimum Coloring (resp. a clique of maximum size) ofan interval graph in O(|V |)using the interval representation.

Page 4: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Greedy colorings

Definitions

Clique number ω(G ) = maximum size of a clique in GChromatic number χ(G ) = minimum coloring of G .∀G , χ(G ) ≥ ω(G )

Greedy colorings

Color with integers from [1, k]Following a vertex ordering, process successively the vertices usingthe greedy rule :

Take the minimum color not already in the neighbourhood

Page 5: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Chordal graphs

Apply LexBFS from n downto 1Use the ordering n downto 1 for the greedy coloring.Let k = ω(G ).Since every added vertex x is simplicial and |N(x)| ≤ k − 1, itexists at least one missing color in its neighbourhood of the alreadycolored subgraph.The value k is reached for the last vertex belonging to eachmaximum clique of G .

Page 6: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

66

44

55

33

22

11

6, 5, 4, 3, 2, 1 LexBFS ordering6, 5, 4, 3, 2, 1 LexBFS ordering

Page 7: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

66

44

55

33

22

11

6, 5, 4, 3, 2, 1 LexBFS ordering6, 5, 4, 3, 2, 1 LexBFS ordering

11

22

3311

33

22

Page 8: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Perfect Graphs

G such that for every induced subgraphs H ⊆ Gω(G ) = χ(G )

Consequences

Therefore ω(G ) = χ(G ) for chordal graphs.Since being chordal graphs is an hereditary property, chordalgraphs are perfect.

Page 9: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Perfectly orderable graphs

Although ω(G ) and χ(G ) can be computed in polynomial time forperfect graphs using the ellipsoid method, greedy coloring does notwork for all perfect graphs.

A graph G is said to be perfectly orderable if there exists anordering π of the vertices of G, such that any induced subgraph isoptimally colored by the greedy algorithm using the subsequence ofπ induced by the vertices of the subgraph.Chordal graphs are perfectly orderable.

Page 10: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

For which graphs the greedy coloring works ?

Bad news :NP-complete to recognize perfectly orderable graphs.Greedy coloring can be far from the optimum, even for subclassesof perfect graphs.

Page 11: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

66 55

44

33 22

11

2233

22

11

11

4 4

A bad LexBFSA bad LexBFS

Page 12: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

A good LexBFSA good LexBFS

66 11

445522

33

33 33

22 1111

22

Page 13: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

The study of the relationships between ω(G ) and χ(G ) isfundamental for algorithmic graph theory.

1. 1930 Wagner’s conjecture and treewidth

2. 1950 Shannon Problem and Perfect graphs and semi-definiteprogramming

Page 14: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Some questions about geometric representations

1. Can we use efficiently this representation of chordal graphs asintersection of subtrees ?

2. Same question for path graphs ? (intersection graph of pathsin a tree)

Page 15: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Graph classes visited so far

I Interval graphs : intersection graph of intervals of the real line

I Unit interval graphs (no K1,3)all interval have the same length (no proper inclusion)

I Path graphs (resp. directed path graphs) : intersection graphof paths in a tree (resp. directed paths in a rooted directedtree)(Directed path graph appear in some polynomial CSP class).

I Chordal graphs intersection graphs of subtrees in a tree.

Page 16: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Research problems

I A linear time algorithm for Path graphs recognition.

I Using LBFS as for interval graphs and chordal graphs ?

I Meta Conjecture :Most graph classes can be recognized using some graphsearch, or using a series of consecutive graph searches.

Page 17: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Clique treeclique tree of G = a minimum size tree model of G

for a clique tree T of G :I vertices of T correspond precisely to the maximal cliques of GI for every maximal cliques C ,C ′, each clique on the path in T

from C to C ′ contains C ∩ C ′

I for each edge CC ′ of T , the set C ∩ C ′ is a minimal separator(an inclusion-wise minimal set separating two vertices)

Note : we label each edge CC ′ of T with the set C ∩ C ′.

Page 18: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Size of a maximal clique tree in a chordal graph

I Let G = (V ,E ) be a chordal graph.

I G admits at most |V | − 1 maximal cliques and therefore thetree is also bounded by |V | − 1 (vertices).

I But some vertices of the original graph can be repeated in thecliques. If we consider a simplicial elimination ordering the sizeof a given maximal clique is bounded by the neighbourhood ofthe first vertex of the maximal clique.

I Therefore any maximal clique tree is bounded by |V |+ |E |. Ifwe label the edges of the maximal clique tree with minimalseparators the size remains in O(|V |+ |E |).

Page 19: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Consequences of maximal clique tree

Theorem

Every minimal separator belongs to every maximal clique tree.

Lemma

Every minimal separator is the intersection of at least 2 maximalcliques of G .

Corollary

There are at most |V | − 2 different minimal separators.

Page 20: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Theorem

Every minimal separator belongs to every maximal clique tree.

Lemma

Every minimal separator is the intersection of at least 2 maximalcliques of G .

Page 21: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Proof of the lemma

Demonstration.

We know that S is a clique. Let us consider G1 a connectedcomponent of G − S . Let x1, . . . , xk be the vertices of G1 having amaximal neighbourhood in S .If k = 1 then x1 must be universal to S , since S is a minimalseparator.Else, consider a shortest path µ in G1 from x1 to xk . Necessarily x1(resp. xk) has a private neighbour z (resp. t) in S .Then the cycle [x1, µ, xk , t, z ] has no chord, a contradiction.Therefore x1 ∪ S is a clique, and is contained in some maximalclique C in G1. We finish the proof by taking another connectedcomponent of G − S .

Page 22: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Proof of the theorem

Demonstration.

Therefore S = C ′ ∩ C ′′. These two maximal cliques belong to anymaximal clique tree T of G . Let us consider the unique path µ inT joigning C ′ to C ′′.All the internal maximal cliques in µ must contain S . Suppose thatall the edges of µ are labelled with minimal separators strictlycontaining S , then we can construct a path in G from C ′ − S toC ′′ − S avoiding S , a contradiction. So at least one edge of µ islabelled with S .

Page 23: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Clique graphthe clique graph C(G ) of G = intersection graph of maximalcliques of G

G C(G )

Page 24: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Reduced clique graphthe reduced clique graph Cr (G ) of G = graph on maximal cliquesof G where CC ′ is an edge of Cr (G ) ⇐⇒ C ∩ C ′ is a minimalseparator.

Page 25: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

More structural insights of chordal graphs

Page 26: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Combinatorial structure of Cr (G )

Lemma 1 : M.H and C. Paul 95

If C1,C2,C3 is a cycle in Cr (G ), with S12,S23 and S23 be theassociated minimal separators then two of these three separatorsare equal and included in the third.

Lemma 2 : M.H. and C. Paul 95

Let C1,C2,C3 be 3 maximal cliques, ifC1 ∩ C2 = S12⊂S23 = C2 ∩ C3 then it yields a triangle in Cr (G )

Page 27: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Lemma 3 : Equality case

Let C1,C2,C3 be 3 maximal cliques, if S12 = S23 then :

I either the C1 ∩ C3 = S13 is a minimal separator

I or the edges C1C2 and C2C3 cannot belong together to amaximal clique tree of G .

Page 28: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

a

bc

d fe

g

h

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e   

   e  c,e

   c

c

ee

b,c        c

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e      c,e

   ce

b,c      

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e   

   e  c,e

c

b,c      

Page 29: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Theorem (Gavril 87, Shibata 1988, Blayr and Payton 93)

The clique trees of G are precisely the maximum weight spanningtrees of C(G ) where the weight of an edge CC ′ is defined as|C ∩ C ′|.

Theorem (Galinier, Habib, Paul 1995)

The clique trees of G are precisely the maximum weight spanningtrees of Cr (G ) where the weight of an edge CC ′ is defined as|C ∩ C ′|.

Moreover, Cr (G ) is the union of all clique trees of G.

Page 30: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Applications

I All clique trees have exactly the same labels, includingrepetitions.

Page 31: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Maximal Cardinality Search : MCS

Data: a graph G = (V ,E ) and a start vertex s

Result: an ordering σ of V

Assign the label 0 to all verticeslabel(s)← 1for i ← n to 1 do

Pick an unumbered vertex v with largest labelσ(i)← vforeach unnumbered vertex w adjacent to v do

label(w)← label(w) + 1end

end

Page 32: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Maximum spanning trees

Maximal Cardinality Search can be seen as Prim algorithm forcomputing a maximal spanning tree of Cr (G ).

Page 33: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

I How to compute a clique tree ?

I How to generate all simplicial elimination schemes ?

Page 34: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

LexBFS, MCS or MNS visit maximal cliques “consecutively” (i.e.when the search explores a vertex x of a maximal clique C thatdoes not belong to any of the previously visited maximal cliquesthen all the unvisited vertices of C will appear consecutively justafter x).

Therefore when applying a search (LexBFS, MCS or MNS) one cancompute a clique tree, by considering the strictly increasingsequences of labels.

Page 35: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

a

bc

d fe

g

h

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e   

   e  c,e

   c

c

ee

b,c        c

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e      c,e

   ce

b,c      

b,c,e

a,b,c

b,d,e e,g c,e,f

c,hb,e   

   e  c,e

c

b,c      

b, a, c, e, d , h, f , g is a LexBFS ordering.we can find the maximal cliques b, a, c then b, c , e then b, e, dthen c, h then c , e, f and e, g .

Page 36: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Simplicial elimination schemes

1. Choose a maximal clique tree T

2. While T is not empty doSelect a vertex x ∈ F − S in a leaf F of T ;F ← F − x ;If F = S delete F ;

Page 37: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Canonical simplicial elimination scheme

1. Choose a maximal clique tree T

2. While T is not empty doChoose a leaf F of T ;Select successively all vertices in F − Sdelete F ;

Page 38: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Remark

Does there exist other simplicial elimination scheme ?

Page 39: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Size of CS(G )

Considering a star on n vertices,shows |CS(G )| ∈ O(n2)Not linear in the size of G

Page 40: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

CS(G ) is not chordal !

Page 41: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

CS(G ) is not chordal !

Page 42: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

In fact CS(G ) is dually chordal (almost chordal)and CS(CS(G )) is chordal.

Page 43: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Properties of reduced clique graphs

Cannonical representation

I For an interval graph, its PQ-tree represents all its possiblemodels and can be taken as a cannonical representation of thegraph (for example for graph isomorphism)

I But even path graphs are isomorphism complete. Therefore acanonical tree representation is not obvious for chordal graphs.

I Cr (G ) is a Pretty Structure to study chordalgraphs.To prove structural properties of all maximal clique trees of agiven chordal graph.

Page 44: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Characterization Theorem for interval graphs

(i) G = (V ,E ) is interval graph.

(ii) It exists a total ordering τ of the vertices of V s.t.∀x , y , z ∈ G with x ≤τ y ≤τ z and xz ∈ E thenxy ∈ E .

(iii) G has a maximal clique path. (A maximal clique pathis just a maximal clique tree T, reduced to a path).

(iv) G is the intersection graph of a family of intervals ofthe real line

Page 45: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

To recognize an interval graph, we just have to compute amaximal clique tree and check if it is a path ?Difficulty : an interval graph has many clique trees among themsome are paths

Page 46: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Page 47: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Page 48: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Many linear time algorithms already proposed for interval graphrecognition ....using nice algorithmic tools :graph searches, modular decomposition, partition refinement,PQ-trees . . .

Page 49: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Linear time recognition algorithms for interval graphs

I Booth and Lueker 1976, using PQ-trees.

I Korte and Mohring 1981 using LexBFS and ModifiedPQ-trees.

I Hsu and Ma 1995, using modular decomposition and avariation on Maximal Cardinality Search.

I Corneil, Olariu and Stewart SODA 1998, using a series of 6consecutive LexBFS, published in 2010.

I M.H, McConnell, Paul and Viennot 2000, using LexBFS andpartition refinement on maximal cliques.

Page 50: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

A partition refinement algorithm working on maximalcliques

1. Compute a tree T using LexBFSIf T is not a maximal clique tree ; then G is not chordal,neither interval.

2. Start form the last maximal clique Refine the cliques with theminimal separator.

3. Refine until each part is a singleton

4. If a part is not a singleton start recursively from the last cliqueof this part according to LexBFS.

Page 51: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Interval graphs

Page 52: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Exercises

Exercise 1

Ends of a LexBFS

Many properties can be expressed on the last vertex of a LexBFS.Example : if G is a chordal graph, the last vertex is simplicial .

1. Show that the last maximal clique visited can be taken as theend of some chain of cliques if G is an interval graph.

2. Complexity of the following decision problem :

Data: a graph G = (V ,E ) and a given vertex x ∈ V

Result: Does there exist a LexBFS of G ending at x ?

Page 53: 4eme Cours : Chordal Graphs MPRI 2012 2013

4eme Cours : Chordal Graphs MPRI 2012–2013

Exercises

Exercise 2

If we consider the edges of the clique tree labelled with the size ofthe minimal separators, show that :for every maximal clique tree Tweight(T ) = Σ1≤i≤k |Ci | − n, where C1, . . .Ck are the maximalcliques of G .