Chordal Graphs: Theory and Algorithms

1 Chordal graphs

 Chordal graph : Every of four or more vertices has a chord in it, i.e. there is an edge between two non consecutive vertices of the cycle.  Also called rigid circuit graphs, Perfect Elimination Graphs, Triangulated Graphs, monotone transitive graphs.

2 Subclasses of Chordal Graphs

 Trees

 K-trees ( 1- is tree)

 Kn: Complete Graph  Block Graphs

 Bipartite Graph with bipartition X and Y ( not necessarily Chordal )

 Split Graphs: Make one part of Bipartite graph complete

 Interval Graphs

3 Subclasses of Chordal Graphs …

 Rooted Directed Path Graphs

 Directed Path Graphs

 Path Graphs

 Strongly Chordal Graphs

 Doubly Chordal Graphs

4 Research Issues in Trees

 Computing Achromatic number in tree is NP-Hard

 Conjecture: Every tree is Graceful

 L(2,1)-labeling number of a tree with maximum degree  is either +1 or +2. Characterize trees having L(2,1)-labeling number +1

5 Why Study a Special Graph Class?

 Reasons

 The Graph Class arises from applications

 The graph class posses some interesting structures that helps solving certain hard but important problems restricted to this class

 some interesting meaningful theory can be developed in this class.

 All of these are true for chordal Graphs. Hence study Chordal Graphs.

 See the book: Graph Classes (next slide)

6

7 Characterizing Property: Minimal separators are cliques ( Dirac 1961) Characterizing Property: Every minimal a-b separator is a ( Complete Subgraph)

Minimal a-b Separator: S  V is a minimal vertex separator if a and b lie in different components of G-S and no proper subset of S has this property.

8 Lemma 1

 A vertex x of G is called simplicial if its adjacency set Adj(x) is a clique (not necessarily maximal)

 Lemma 1[Dirac 1961]: Each chordal graph has a simplicial vertex and if G is not a clique it has two non adjacent simplicial vertices.

9 Proof of Lemma 1

 If G is a clique, done.

 If not, assume that G has two non-adjacent nodes a and b and that the lemma is true to all graphs with fewer vertices than G. Let S be a minimal vertex separator for a and b.

Let Ga and Gb be the connected components of a and b respectively.

1 0 Proof of Lemma 1 (Cont.)

 S is a clique – if not, then there exists x and y such that there is no edge between them, and because S is minimal vertex separator there is a cycle . It is easy to show that there exist a minimal cycle with length no less then 4 with no chords in it, contradiction.

1 1 Proof of Lemma 1 (Cont.)

 S is a clique. GA+S is smaller than G therefore by induction the lemma holds, i.e. GA+S is a clique or has two non adjacent simplicial vertices, one of each must be in GA. Any simplicial vertex in GA is a simplicial vertex in G because all elements of Adj(A) are inside GA+S. Thus from GA and GB we get two simplicial vertices in G.

1 2 Characterizing Property: PEO ( Fulkerson and Gross 1965)

 Lemma: (Dirac 1961) Every chordal graph has a simplicial vertex. If G is not complete, then it has two non-adjacent

simplicial vertices. Simplicial: G[NG(v)] is complete  Theorem: G is chordal iff it has a Perfect Elimination Ordering

2 4 (1,2,3,4,5) is a PEO of G 5 1 3 G  PEO: (v1,v2,…,vn) is a PEO if vi is a simplicial vertex of G[{vi,vi+1,…,vn}], 1 ≤ i ≤n.

13 PEO Illustration

 Perfect Elimination order : necessary and sufficient condition for Chordal graphs  Simplicial vertex : along with their neighbors form a clique

14 Theorem 7

 Definition: The following are equivalent:

1. G is chordal

2. The edges of G can be directed acyclically so that every pair of converging arrows comes from two adjacent vertices.

3. G has a perfect vertex elimination scheme.

4. There is a tree T with maximal cliques of G as vertices. Any two cliques containing v are either adjacent in T or connected by a path of cliques that contain v.

1 5 Proof of Theorem 7 (1→2)

 By lemma 1 every chordal graph has a simplicial vertex

 Direct all of its edges to it

 Repeat the process with the rest of the graph (can be done because being chordal is hereditary)

 From the definition of simplicial vertex corollary that each two converging edges coming from adjacent vertices.

1 6 Proof of Theorem 7 (2→1)

 Let there be a cycle of size larger than 3.

 There exist a valid direction which is acyclic

 There are two converging edges, which come from two adjacent vertices

 The cycle has a chord.

1 7 Perfect Vertex Elimination

 Let G=(V,E) be an undirected graph and let

σ=[v1,v2,…,vn] be an ordering of the vertices. We say that σ is a perfect vertex elimination scheme if for

each i: Xi = { vj in Adj(vi) | j>I } is complete.

1 8 Theorem 7 (Cont.)

 Definition: The following are equivalent:

1. G is chordal

2. The edges of G can be directed acyclically so that every pair of converging arrows comes from two adjacent vertices.

3. G has a perfect vertex elimination scheme.

4. There is a tree T with maximal cliques of G as vertices. Any two cliques containing v are either adjacent in T or connected by a path of cliques that contain v.

1 9 Proof of Theorem 7 (1→3)

 By lemma 1, G has a simplicial vertex.

 The subgraph induced after removing this vertex is also chordal.

 By induction, there is an elimination order.

2 0 Proof of Theorem 7 (3→1)

 Let us assume a cycle of length 4 or greater.

 Let x be the first vertex on the elimination scheme of this cycle.

 x is simplicial at this point.

 Two vertices adjacent to x from the cycle are also adjacent between themselves.

2 1 Theorem 7 (Cont.)

 Definition: The following are equivalent:

1. G is chordal

2. The edges of G can be directed acyclically so that every pair of converging arrows comes from two adjacent vertices.

3. G has a perfect vertex elimination scheme.

4. There is a tree T with maximal cliques of G as vertices. Any two cliques containing v are either adjacent in T or connected by a path of cliques that contain v.

2 2 Clique Tree Example

C1 a a b c

C1 b c

C2 C2 b c C3 e d d

C3 b

e d

2 3 Proof of Theorem 7 (1→4)

 Lemma 2: A vertex is simplicial iff it belongs to exactly one clique.

 Let G =(V,E) be a chordal graph and |V|=k

 Proof by induction: Assume the claim holds for all graphs of size < k.

 By Lemma 1 G has a simplicial vertex v.

 By Lemma 2 v belongs to exactly one clique C. 2 4

Proof of Theorem 7 (1→4)

 For G’ =(V\{v},E’) there exists a tree T’ which satisfies the claim. Split into two cases:

 C’ = C – {v} is maximal in G’. Add v to C’ to build T from T’. T is a Clique-Tree as needed.

a C1 C C1 2 b c a b b c e d C2 e d

2 5 Proof of Theorem 7 (1→4)

 C’ = C – {v} is not maximal in G’. There is a maximal clique P in G’ such that C’⊂P. Add C and (C, P) to T’ to build T. T is a Clique-Tree as needed.

C a b 1 C2 a C2 a b

C1 c d d c d

2 6 Proof of Theorem 7 (4→1)

 Let T be a Clique-Tree of graph G=(V,E) and |V|=k.

 Proof by induction: Assume the claim holds for all graphs of size < k.

 Let L be a leaf in T, and P its parent in T.

 Let v∈L\P (exists from maximality).

 v cannot be in any other clique.

 by Lemma 2, v is simplicial.

2 7

Proof of Theorem 7 (4→1)

 Let T’ be T with v removed. T’ is a Clique- Tree.

 By assumption G’ =(V\{v},E’) is chordal.

 By part 3 of Theorem 7, there exists σ’, a Perfect Elimination Order for G’.

 Let σ = [v, σ’] be a perfect elimination order for G.

 By the converse of part 3, we can conclude that G is chordal

2 8 PEO is a Key in designing algorithms and obtaining structural properties

 The following classical Graph Optimization problems are NP-Hard for general Graphs

 Finding

 (G) :clique number (the size of maximum size clique )

 (G): Chromatic number ( minimum number of colors needed in a proper coloring of G)

 (G): independence number( maximum size of an independent set)

 (G): clique covering number ( minimum number of cliques needed to cover V(G) )

 All these four problems can be solved in linear time in Chordal Graphs given a PEO as part of input

29 Polynomial Algorithms for chordal Graphs: Clique Number

 Given a PEO of a Chordal Graph G, maximum size clique can be found as follows:

 Let (v1,v2,…,vn) be a PEO of G.

 Define L(i)= maximum j, j > i such that vivj E(G). F[i]=minimum j j >I such vivj isan edge.

 Let Max {L[i]-F[i]+1}=k=L[j]-F[j]+1.

 Then k= (G) and C={vj,vj+1,…,v_{j+k-1}} is a maximum size clique.

30 Maximum Clique: Illustration

L[1]=3,L[2]=4,L[3]=5,L[4]=5,L[5]=5. Max{L[i]-i+1}=3=L[1]-1+1=L[2]-2+1=L[3]-3+1. Maximum size cliques are {1,2,3},{2,3,4}, {3,4,5}

2 4 (1,2,3,4,5) is a PEO of G 5 1 3 G

31 Polynomial Algorithms for chordal graphs: chromatic number [Gavril 1972]

 Minimum-Coloring Algorithm

 Greedy Algorithm

 Scan the vertices in the reverse order of PEO and color each vertex with the smallest color not used among its successors

 Gives Optimal coloring

 Complexity = Polynomial (given that PEO is already known)

32 Minimum Coloring: Illustration

C(1)=1,C(2)=2,C(3)=3,C(4)=1,C(5)=2 (G)=3.

2 4 (5,4,3,2,1) is a PEO of G 5 1 3 G

33 Why optimal?

 Clearly, (G) (G)

 Let (v1,v2,…,vn) be PEO. So (vn,…,v2,v1) Is the reverse PEO. Now coloredNbr(vi)=|{vj| vivj is an edge and j >i}| ≤ (G) So (G) = (G) and hence Greedy algorithm is optimal.

34 Polynomial Algorithms for chordal graphs: Independence Number

 Maximum Independent Set

 Greedy algorithm

 Scan the vertices in the order of PEO, and for each vi,

add vi to I if none of its predecessor has been added to I

 Complexity = O(n+m)

 Predecessor of vi is vj if j < i and vjvi E

35 Maximum Independent Set: Illustration

I={1,4}

2 4 (1,2,3,4,5) is a PEO of G 5 1 3 G

36 Clique cover

 Xi={vj | vivj and j >i}

 y1=v1; yi is the first vertex in  which follows yi-1 and which is not in X1 X2  …  Xi-1; all vertices following yt are in X1  X2  …  Xt. Hence V={y1,y2,…yt}  X1  X2 …  Xt.

 Theorem: {y1,y2,…yt} is a maximum independent set and the collection of sets Yi={yi}  Xi, 1≤ i ≤t comprises a minimum clique cover of G.

37 Proof

 {y1,y2,…yt} is an independent set as yiyj E(G) implies yj  Xi which is a contradiction. So (G)  t. As Yi, 1 ≤ i≤ t, is a clique cover of G. So (G)  t. Hence (G) =t and the minimum clique cover contains at least t cliques. Hence the theorem.

38 Perfect Elimination Order (PEO)

• An ordered sequence of all vertices {V1, V2,…, Vn}

• Successor (Vi) = {Vj: j>i and (i,j) ε E}

• Predecessor (Vi) = {Vj : i>j and (i,j) ε E}

• Sequence of vertices such that for each vertex Vi, successors

of Vi form a clique

• A graph is chordal if and only if it has a Perfect Elimination Order (PEO) [Fulkerson 1965]

39 Simplicial Vertex

 A vertex whose all neighbors form a clique

 Every chordal graph has at least one simplical vertex

 The first vertex in PEO is simplicial

 If you remove the simplicial vertex, then the graph induced by remaining nodes is also a chordal graph (hence must have a simplicial vertex of its own)

40 Simple method to find PEO

 Given G = (V, E)  For (i=1 to N) {

Vi = Simplicial vertex (G); G = Graph induced by vertex set (V-Vi); }

What if no simplicial vertex exists at some point?

Complexity = O(N4)

41 Finding a PEO (Maximum Cardinality Method)

 Rose and Tarjan [Rose 1975]

 Cardinality Number = Number of neighbors picked up

 Step1: Pick the node whose maximum number of neighbors have already been chosen

 Reverse the order

 Step 2: In the end, verify the ordering obtained is indeed PEO

42 Example Seq = 2 Seq = 6 F (1) E (0)(1) F (0)F (2)

Seq = 8 G(2) A(0) G(0)G(1) D(2)D(0) HH (3) (1) Seq =1 D(1) HH (2) (0) Seq =3 Seq = 7 The PEO is: G, H, F, B, C, D, E , A

BB (2)B (3)B(0) (1) C(0)C(1)C(2) Seq = 5 Seq = 4 43 Observations

1. Except for the first node, any node being picked up has at least one neighbor which has already been picked

2. Set of picked nodes always form a connected graph

44 Proof of Correctness

 If a PEO does not exist, then algorithm does not generate a PEO

 If the PEO exists, then algorithm outputs some PEO

45 Proof of Correctness (Part 2)

Let {V1, V2, V3,…,Vi, …, Vj,…, Vk,…,Vn} be the ordering generated.

Let Vi is not in sequence. Then Vj and Vk be the two successors of Vi that are not connected.

Case 1:

Then Vj and Vk are parts of two graphs which are connected only through

Vi The order in which the nodes were picked is:

{Vn, …, Vk, …., Vj,…, Vi,…,V3, V2, V1} Then we claim that label sequence must have been different

46 Proof (Contd.)

 Case 2:

 Consider the path from k to j on which the nodes were picked up.

 All such nodes should be connected to i except those nodes, which are directly connected to j.

 Let m be such a vertex on that path. m must have some vertices which are not connected to i.

47 Proof (contd.)

 Let w be such a vertex. Therefore w must be connected to k. (through a path not involving i).

 If i is not connected to w, then we have a non chordal cycle i-k-w-m-j-i.

 i must be connected to w as well. Therefore there is no way that m can be picked before I since i is

connected to one extra node than m (Vk)

48 Complexity Analysis (Step 2)

Check if the generated ordering is perfect

Trivial algorithm:

Number of vertices whose successors have to be checked: N

Time complexity to check if all the successors of a particular node

N 2 are connected: C2 = N Total complexity = N3

49 Step 2: Efficient Implementation

 Efficient Way:

 Given ordering: {V1, V2, V3, …, Vi, …, Vj,…, Vk,…,Vn} 1. for i = 1 to n do

2. if Vi has successors

3. Let u be the first successor of Vi

4. For all w ∈ Successor (Vi), w ≠u 5. Add (u, w) to TEST

6. Test whether all vertex-pairs in TEST are adjacent.

50 Why?

 If the algorithm detects ordering as non-perfect, then ordering must be non- perfect

 If the algorithm detects ordering as PEO, then ordering cannot be imperfect (By contradiction)

 complexity if implemented carefully: O ( N + E)

 Maximum size of set TEST can be O(E)

3  Instead of O (N )

51 Implementation of step 1 (generating perfect ordering)

 Trivial Method:

 Maintain a heap of cardinality numbers

Complexity of each for loop:

Find the maximum cardinality node and removing it: O(lg N)

Number of updates for each node picked: N

modifying the cardinality number and rearranging the heap: N lg N

Total Complexity = N* (lg N + N lg N) = N2 lg N

Can also be shown as E lg N

52 Efficient Implementation (Step 1)

 With complexity O( N + E)

 For each node, maintain list of neighbors. (Already given in this format)

 Maintain linked list of vertices (in order of cardinality number)

 For each node, maintain its location in the linked list

 Picking the vertex with max. cardinality number = O(1)

 Finding all the neighbors and updating their cardinality number and their location in linked list = O(E)

53 Another definition for chordal graphs

Intersection Graph: A graph that represents the intersection of sets

 Subtree Graph:

 Break a tree into multiple subtrees (overlapping)

 Now make a graph whose each vertex represents one subtree. An edge between two vertices if they have a common vertex (between the subtrees they represent)

 The graph thus obtained is known as Subtree Graph

As [Gavril 1974] showed, the subtree graphs are exactly the chordal graphs. So a chordal graph can be represented as an of subtrees.

54 Bibliography

 [Gavril 1974]: Gavril, Fănică, "The intersection graphs of subtrees in trees are exactly the chordal graphs”, Journal of Combinatorial Theory, Series B 16, 1974

 [Gavril 1972]: Gavril, “Algorithms for Minimum Coloring, Maximum Clique, Minimum Independent Set of a Chordal Graph”, SIAM J. Comp., Vol 1, 1972

 [Rose 1975]: Rose, Tarjan, “Algorithmic Aspects of Vertex Elimination”, Proc. 7th annual ACM Symposium on Theory of Computing (STOC), 1975

55 Bibliography

 [Arnborg 1989]: Arnborg et. al., “Linear time algorithms for NP-hard problems restricted to partial k-trees”, Discrete Applied Mathematics, Vol. 23, Issue 1, 1989

 [Fulkerson 1965]: Fulkerson, D. R.; Gross, O. A. (1965). "Incidence matrices and interval graphs”, Pacific J. Math 15: 835–855.

 M.C.Golumbic Algorithmic and Perfect Graphs. Second edition

56