# Interval Graph Test.

## Presentation on theme: "Interval Graph Test."— Presentation transcript:

Interval Graph Test

Chordal Graphs A chord of a cycle C is an edge not in C whose endpoints lie in C An chordless cycle in G is a cycle of length at least 4 in G that has no chord A graph G is chordal if it is simple and has no chordless cycle (also called triangulated graph) An induced subgraph on V’ is a subgraph with node set V’ and all possible edges between nodes in V’.

Perfect Elimination Ordering
A vertex of G is simplicial if its neighborhood in G is a clique A perfect elimination ordering (PEO) is an ordering v1 , …, vn–1, vn for deletion of vertices so that each vi is a simplicial vertex of the remaining graph induced by {vi, …, vn-1, vn}

Perfect Elimination Ordering
v3 v5 v6 v1 v2 v4 v1, v2, v3, v4, v5, v6 is a perfect elimination ordering

Characterization of Chordal Graphs
A graph is chordal  it has a perfect elimination ordering We prove this theorem through an algorithm that construct a PEO (much like the planarity test)

Lexicographic BFS (LBFS)
LBFS is used to obtain a perfect elimination ordering for chordal graphs vn vn-1 vn

LBFS and PEO Theorem 1. If G is a chordal graph, then LBFS will produce a PEO. Let the ordering produced by LBFS be O The neighbors of u ordered after u form a clique (i.e. u is simplicial in the remaining graph) How do you prove this?

Lemma 1 In the LBFS, if there are vertices u, x, y s.t.
L(u) < L(x) < L(y) and (u,y)  G but (x,y)  G, then there must exist a vertex z with L(y) < L(z) s.t. (x,z)  G but (u,z)  G Suppose not. Then every neighbor of x after y is also a neighbor of u. But then, u should be ranked higher than x after we process y in the LBFS ordering. y u x y u x z

Proof of Theorem 1 (I) Prove by contradiction. Suppose there exist vertices u, x, y s.t. L(u) < L(x) < L(y) and (u,x), (u,y)  G but (x,y)  G. WLOG, let (x,y) be a maximal such pair (i.e. for any other such pair (x’,y’) either x’ < x or y’ < y), then, by Lemma 1, there exists an x1 with L(y) < L(x1) s.t. (x, x1)  G but (u,x1)  G. y u x y u x x1

Proof of Theorem 1 (II) x1 cannot be adjacent to y, otherwise we get a chordless 4 cycle. WLOG, let x1 be a maximal such vertex. Similarly, we can get a y1 higher than x1 s.t. y1 is adjacent only to y, but not to u, x or x1. u x y x1 y1

Proof of Theorem 1 (III) By induction, we can get a an induced path xi, ,,,, x1, x, u, y, y1, …, yi This must stop when we reach the last vertex, say yi = vn. At that point, we get a violation u x y x1 y1 xi yi yi-1 xi vn

The Interval Graph Models
1 2 2 5 3 3 1 4 5 4 Each vertex represent a clone, each edge represent overlap information between clones If there is no error in the clone overlap information , then one can use the interval graph recognition algorithm to reassemble clones together

Interval Graph Recognition
Booth & Lueker [1976] linear time, on-line made use of a data structure called PQ-trees Hsu [1992], Hsu and Ma [1999] decomposition, off-line did not use PQ-trees

S - Decomposition A module in G is a set of vertices S such that (a) S is connected; (b) for any vertex u ∈ S and v ∉ S, (u,v) ∈ E iff (u',v) ∈ E for every u' ∈ S. A module S is nontrivial if 1 < |S| < |V(G)|. A graph is S-prime if it has at least four vertices and there exists no nontrivial module. An S-decomposition of a graph is to substitute a nontrivial module with a marker vertex and perform this recursively for the module as well as for the reduced graph containing that marker. You will get a decomposition tree.

Decomposition for Interval Graphs
1 3 5 7 2 6 4 G 8 The interval graph 3 1 4 N 5 6 2 7 8 1 3 5 7 2 6 4 G’ 8 The ST-subgraph G’ The decomposition tree

Vertices u and v are strictly adjacent if they are adjacent, but each has a neighbor not adjacent to the other. Define the ST-subgraph G’ to contain those strictly adjacent edges only.

The corresponding interval graph
The ST-subgraph G’ 3 5 7 6 4 2 1 8 Interval model 1 3 5 7 2 6 4 G 8 The corresponding interval graph 1 3 5 7 2 6 4 G’ 8 The ST-subgraph G’

G’ and the Skeleton Components
1 3 5 7 2 6 4 G’ 8 The ST-subgraph G’ 1 3 4 8 simplicial vertex skeleton component containment 5 7 2 6 The Hass diagram of the containment relationships

Computing a Special Subgraph G”
Determine, for each adjacent pair in G, whether they are strictly adjacent in G can take O(nm) time We shall spend O(m) time to find a special subgraph G” of G’. Use cardinality lexicographic ordering (CLO), which is a LBFS ordering that breaks ties in favor of the vertex with the maximum degree To do this in linear time, presort vertices according to degrees (bucket sort)

The Special Edge Set E” Let D be the set of non-simplicial vertices.
Let O be a CLO of G. Let f(u) be the smallest neighbor of u in D. O(f(u)) < O(u) since u is not simplicial Define E” = { (u,v) | u, v in D, O(u) < O(v), and f(u) is not a neighbor of v} E” is a subset of E The components of G” are identical to those of G’ (to be proven)

The Recognition Algorithm
Compute a CLO for G. If G is not chordal, stop. Otherwise, construct G”. Based on the components of G”, compose a decomposition tree of G’. Check if each prime component is an interval graph

COP Testing with Good Row Ordering Unique up to permutation within the same part
Review

The Left-Right Endpoint Block Sequence The uniqueness of a model

Constructing an Interval Model for a Prime Graph How to place the next interval u into the model?
z 1. Find an endpoint z contained in u 2. Find all intervals adjacent to u (but do not contain u) 3. Start from z, check left and right endpoint blocks Endpoints with the label must be consecutive

Constructing a unique Interval Model for a Prime Graph
Find a BFS tree in G”. Let the vertices be ordered as u1, u2, …, un. (choose u1 to be the smallest) Place u1, u2 first. For every new interval placed, find its relative position w.r.t. u1, namely, determine whether it contains the left or the right endpoint of u1 u1 f(u1) u2 Place the remaining neighbors of u1 in G” one by one. Let ui be the next neighbor to be placed. Since (f(u1), ui)  E , we have that ui and u2 are on the same side of u1 iff (ui , u2)  E. u1 f(u1) u2 We only assume u1 is the smallest, but then the remaining ones are not ordered according to CLO ui ui

Stage 2: Place the remaining nodes of D (I)
Let uk be the next node to be placed with (u1, uk)  E”. Let uj be its parent in the BFS tree and ui be the parent of uj. Based on the adjacent relationships of ui, uj, and uk, we shall determine which endpoint of interval uj is contained in uk OR ui uj uk ui uj uk Key point: Whether ui and uk are on the same side of uj

Stage 2: Place the remaining nodes of D (II)
ui (i) (ui, uk )  E uj uk ui and uk are on different sides of uj. (ui, uk )  E. Case 1. i < k. Since (ui, uk )  E” , We must have (f(ui), uk)  E. We show that ui and uk are on the same side of uj. ui uj f(ui) uk Case 1.1 i < j and (f(ui), uj )  E ui uj uk f(uj) Case 1.2 j < i < k and (f(uj), ui )  E and f(uj), uk)  E For Case 2. k < I, it is an exercise. Case 2. k < i, (exercise)

Stage 3: Place the remaining simplicial nodes (I)
It is likely for the simplicial intervals to refine the blocks Scan the endpoints of D from left to right. For each endpoint block scanned, let Q be the set of all intervals whose left endpoints have already been scanned, but whose right endpoints have not been.

Stage 3: Place the remaining simplicial nodes (II)
Let BL* be the first left block s.t. after its scanning, all neighbors N(u) of a simplicial node u have its left endpoints scanned If, before scanning BL* , |Q| = |N(u)|, then insert the interval of u into BL* Otherwise |Q| > |N(u)|, insert the interval of u after the first right block BR* s.t. |Q| = |N(u)|. BL* BR*