Sunteți pe pagina 1din 35

3eme Cours : Chordal Graphs MPRI 20122013

3eme Cours : Chordal Graphs MPRI 20122013


Michel Habib habib@liafa.jussieu.fr http://www.liafa.univ-Paris-Diderot.fr/~habib

Chevaleret, octobre 2012

3eme Cours : Chordal Graphs MPRI 20122013

Schedule

Partition renement II

Chordal graphs

Representation of chordal graphs

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

Tree isomorphism using Partition renement

Compute the generalized degree partitions of the two graphs G and H

Folklore Property
iF G and H are isomorphic then their partitions are identical.

Particular case of trees


For trees the converse is also true.

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

To compute this partition we can use a variation of the partition renement. DegreeRene(P, S) : compute the partition of S in parts having same degree with P

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

This technique is very powerfull not only for graph algorithms. First used by Corneil for Isomorphism Algorithms 1970 Hopcroft Automaton 1971 Crochemore string sorting 1981 ...

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

Applications

QUICKSORT : Hoare, 1962. Minimal deterministic automaton : Hopcroft O (nlogn) 1971. Relational coarset partition : Paige, Tarjan 1987 Doubly Lexicographic ordering : Paige Tarjan 1987 O (LlogL). using a 2-dimensional renement technique. Interval graph recognition, modular decomposition, many problems on graphs (LexBFS . . .). 1990

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

Vertex splitting

Also called vertex partitionning When the neighborhood N (x ) is used as a pivot set.

3eme Cours : Chordal Graphs MPRI 20122013 Partition renement II

J.E. Hopcroft, A nlogn algorithm for minimizing states in a nite automaton, Theory of Machine and Computations, (1971) 189-196. A. Cardon and M. Crochemore, Partitioning a Graph in O (|A|log 2|V |), Theor. Comput. Sci., 19 (1982) 85-98. M. Habib, R. M. McConnell, C. Paul and L. Viennot, Lex-BFS and partition renement, with applications to transitive orientation, interval graph recognition and consecutive ones testing, Theor. Comput. Sci. 234 :59-84, 2000. R. Paige and R. E. Tarjan, Three Partition Renement Algorithms, SIAM J. Computing 16 : 973-989, 1987.

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Denition

A graph is a chordal graph if every cycle of length 4 has a chord. Also called triangulated graphs, (cordaux in french) 1. First historical application : perfect phylogeny. 2. Many NP-complete problems for general graphs are polynomial for chordal graphs. 3. Second application : graph theory. Treewidth (resp. pathwidth) are very important graph parameters that measure distance from a chordal graph (resp. interval graph).

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Two Basic facts

1.

Chordal graphs are hereditary

2. Interval graphs are chordal

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Chordal graph

6 1 4

7 8

2 3

A vertex is simplicial if its neighbourhood is a clique.

Simplicial elimination scheme


= [x1 . . . xi . . . xn ] is a simplicial elimination scheme if xi is simplicial in the subgraph Gi = G [{xi . . . xn }]

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

A characterization theorem for chordal graphs

Theorem
Dirac 1961, Fulkerson, Gross 1965, Gavril 1974, Rose, Tarjan, Lueker 1976. For a connected graph G the following items are equivalent : (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

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Minimal Separators

A subset of vertices S is a minimal separator if G if there exist a, b G such that a and b are not connected in G S. and S is minimal for inclusion with this property .

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

An example

a f b d
3 minimal separators {b } for f and a, {c } for a and e and {b , c } for a and d .

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

If G = (V , E ) is connected then for every a, b V such that ab /E then there exists at least one minimal separator. But there could be an exponential number of minimal separators. Consider 2 stars a, x1 , . . . , xn (centered in a) and b , y1 , . . . , yn (centered in b ) and then add all the edges xi yi for 1 i n. There exist 2n minimal separators for the vertices a and b .

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Proof of the theorem

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

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 vertices label (s ) {n} for i n to 1 do Pick an unumbered vertex v with lexicographically largest label (i ) v foreach unnumbered vertex w adjacent to v do label (w ) label (w ).{i } end end

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

The reference for a graph algorithm theorem

LexBFS Characterization [Rose, Tarjan et Lueker 1976]


A graph is chordal G i every LexBFS ordering of G provides a simplicial elimination scheme.

2 5 1 4 7 8 3 6

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

How can we prove such a theorem ? 1. A direct proof, nding the invariants ? 2. Find some structure of chordal graphs 3. Understand how LexBFS explores a chordal graph 4. We will consider the 3 viewpoints.

3eme Cours : Chordal Graphs MPRI 20122013 Chordal graphs

Chordal graphs recognition so far

Chordal graph recognition


1. Apply a LexBFS on G O (n + m) 2. Check if the reverse ordering is a simplicial elimination scheme O (n + m) 3. In case of failure, exhibit a certicate : i.e. a cycle of length 4, without a chord. O (n)

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

About Representations

Interval graphs are chordal graphs How can we represent chordal graphs ? As an intersection of some family ? This family must generalize intervals on a line

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Which kind of representation to look for for special classes of graphs ?

Easy to manipulate (optimal encoding, easy algorithms for optimisation problems) Geometric in a wide meaning (ex : permutation graphs = intersection of segments between two lines) Examples : disks in the plane, circular genomes . . .

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

First remark
Proposition
Every undirected graph can be obtained as the intersection of a subset family

Proof
G = (V , E ) Let us denote by Ex = {e E |e x = } the set of edges adjacent to x . xy E i Ex Ey = We could also have taken the set Cx of all maximal cliques which contains x . Cx Cy = i one maximal clique containing both x and y

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Starting from a graph in some application, nd its characteristic : 1. 2-intervals on a line (biology), intersection of disks (or hexagons) in the plane (radio frequency), lament graphs, trapezoid graphs . . . 2. A whole book on this subject : J. Spinrad, Ecient Graph Representations, Fields Institute Monographs, 2003. 3. A website on graph classes : http ://www.graphclasses.org/

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

For chordal graphs the solution is Subtrees in a tree


Using results of Dirac 1961, Fulkerson, Gross 1965, Buneman 1974, Gavril 1974 and Rose, Tarjan and Lueker 1976 :

For a connected graph, the following statements are equivalent and characterize chordal graphs :
(i) G has a simplicial elimination scheme (ii) Every minimal separator is a clique (iii) G admits a maximal clique tree. (iv) G is the intersection graph of subtrees in a tree. (v) Any MNS (LexBFS, LexDFS, MCS) provides a simplicial elimination scheme.

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Helly Property

D enition
A subset family {Ti }i I satises Helly property if J I et i , j J Ti Tj = implies iy J Ti =

Exercise
Subtrees in a tree satisfy Helly property.

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

D emonstration.
Suppose not. Consider a family of subtrees that pairwise intersect. For each vertex x of the tree T , it exists at least one subtree of the family totally contained in one connected component of T x . Else x would belong to the intersection of the family, contradicting the hypothesis. Direct exactly one edge of T from x to this part. We obtain a directed graph G , which has exactly n vertices and n directed edges. Since T is a tree, it contains no cycle, therefore it must exist a pair of symmetric edges in G , which contradicts the pairwise intersection.

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

VIN : Maximal Clique trees

A maximal clique tree (clique tree for short) is a tree T that satises the following three conditions : Vertices of T are associated with the maximal cliques of G Edges of T correspond to minimal separators. For any vertex x G , the cliques containing x yield a subtree of T .

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Two subtrees intersect i they have at least one vertex in common. By no way, these representations can be uniquely dened !

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

An example

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Back to the theorem

For a connected graph, the following statements are equivalent and characterize chordal graphs :
(i) G has a simplicial elimination scheme (ii) Every minimal separator is a clique (iii) G admits a maximal clique tree. (iv) G is the intersection graph of subtrees in a tree. (v) Any MNS (LexBFS, LexDFS, MCS) provides a simplicial elimination scheme.

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Proof of the chordal characterization theorem


Clearly (iii) implies (iv) For the converse, each vertex of the tree corresponds to a clique in G . But the tree has to be pruned of all its unnecessary nodes, until in each node some subtree starts or ends. Then nodes correspond to maximal cliques. We need now to relate these new conditions to chordal graphs. (iii) implies (i) since a maximal clique tree yields a simplicial elemination scheme. (iv) implies chordal since a cycle without a chord generates a cycle in the tree. (iv) implies (ii) since each edge of the tree corresponds to a minimal separator which is a clique

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

from (i) to (iv)


D emonstration.
By induction on the number of vertices. Let x be a simplicial vertex of G . By induction G x can be represented with a family of subtrees on a tree T . N (x ) is a clique and using Helly property, the subtrees corresponding to N (x ) have a vertex in common . To represent G we just add a pending vertex adjacent to . x being represented by a path restricted to the vertex , and we add to all the subtrees corresponding to vertices in N (x ) the edge .

3eme Cours : Chordal Graphs MPRI 20122013 Representation of chordal graphs

Playing with the representation

Easy Exercises : 1. Find a minimum Coloring (resp. a clique of maximum size) of a chordal graph in O (n + m). Consequences : chordal graphs are perfect. At most n maximal cliques. 2. Find a minimum Coloring (resp. a clique of maximum size) of an interval graph in O (n) using the interval representation.

S-ar putea să vă placă și