29
1/28 Interval Graph Test

Interval Graph Test

  • Upload
    annora

  • View
    32

  • Download
    0

Embed Size (px)

DESCRIPTION

Interval Graph Test. Chordal Graphs. A chord of a cycle C is an edge not in C whose endpoints lie in C A n chordless cycle in G is a cycle of length at least 4 in G that has no chord - PowerPoint PPT Presentation

Citation preview

Page 1: Interval Graph Test

1/28

Interval Graph Test

Page 2: Interval Graph Test

2/28

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’.

Page 3: Interval Graph Test

3/28

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}

Page 4: Interval Graph Test

4/28

Perfect Elimination Ordering

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

v1 v2 v4

v3 v5 v6

Page 5: Interval Graph Test

5/28

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)

Page 6: Interval Graph Test

6/28

Lexicographic BFS (LBFS)

• LBFS is used to obtain a perfect elimination ordering for chordal graphs

vn

vn-1 vn

Page 7: Interval Graph Test

7/28

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?

Page 8: Interval Graph Test

8/28

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

Page 9: Interval Graph Test

9/28

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.

x1 y u x y u x

Page 10: Interval Graph Test

10/28

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.

x1 y u x y1

Page 11: Interval Graph Test

11/28

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

yi-1 xi vn

x1 y u x y1 xi yi

Page 12: Interval Graph Test

12/28

The Interval Graph Models

• 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

1

23

4 54

1

2

35

Page 13: Interval Graph Test

13/28

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

Page 14: Interval Graph Test

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.

14/28

Page 15: Interval Graph Test

15/28

N2

Decomposition for Interval Graphs

1

3

5 7 2

6

4 G

8

The interval graph

3

1

4

N

5 6

N 2 7

1

2 8

The decomposition tree

1

3

5 7 2

6 4 G’

8

The ST-subgraph G’

Page 16: Interval Graph Test

16/28

Strictly Adjacent vertices

• 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.

Page 17: Interval Graph Test

17/28

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’

Page 18: Interval Graph Test

18/28

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

Page 19: Interval Graph Test

19/28

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)

Page 20: Interval Graph Test

20/28

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)

Page 21: Interval Graph Test

21/28

The Recognition Algorithm

1. Compute a CLO for G. If G is not chordal, stop.

2. Otherwise, construct G”.

3. Based on the components of G”, compose a decomposition tree of G’.

4. Check if each prime component is an interval graph

Page 22: Interval Graph Test

22/28

COP Testing with Good Row OrderingUnique up to permutation within the same part

Review

Page 23: Interval Graph Test

23/28

The Left-Right Endpoint Block SequenceThe uniqueness of a model

Page 24: Interval Graph Test

24/28

Constructing an Interval Model for a Prime GraphHow to place the next interval u into the model?

Endpoints with the label must be consecutive

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

z

Page 25: Interval Graph Test

25/28

Constructing a unique Interval Model for a Prime Graph

u1

f(u1) u2

ui

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

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

ui

Page 26: Interval Graph Test

26/28

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

ui

uj

uk

ui

uj

uk

OR

Key point: Whether ui and uk are on the same side of uj

Page 27: Interval Graph Test

27/28

Stage 2: Place the remaining nodes of D (II)

(i) (ui, uk ) E

(ii) (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

uk

ui

ujf(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

ui and uk are on different sides of uj.

Case 2. k < i, (exercise)

Page 28: Interval Graph Test

28/28

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.

Page 29: Interval Graph Test

29/28

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)|. BR*

BL*