simple efficient algorithm for mpq -tree of an interval graph

17
Simple Efficient Algorithm for MPQ- tree of an Interval Graph Toshiki SAITOH Masashi KIYOMI Ryuhei UEHARA Japan Advanced Institute of Science and Technology (JAIST) School of Information Science

Upload: dolph

Post on 07-Feb-2016

33 views

Category:

Documents


0 download

DESCRIPTION

Simple Efficient Algorithm for MPQ -tree of an Interval Graph. Toshiki SAITOH Masashi KIYOMI Ryuhei UEHARA Japan Advanced Institute of Science and Technology (JAIST) School of Information Science. Interval Graphs. Have interval representations - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Simple Efficient Algorithm for MPQ-tree of an Interval Graph

Toshiki SAITOH Masashi KIYOMI Ryuhei UEHARA

Japan Advanced Institute of Science and Technology (JAIST)

School of Information Science

Page 2: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Interval Graphs

Have interval representations Each interval corresponds to a vertex on graph

G=(V, E) (|V|=n, |E|=m) Two intervals intersect ⇔

corresponding two vertices are adjacent

1

2

3 4I3

I1

I2

I4

0 1 2 3 4 5 6

Page 3: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Applications of Interval Graphs

bioinformatics scheduling problems

x1: ACGGTTTA

x2: ATCGGAACG

x3: AACGGTTTAC

x4: TTTACGTGGT

DNA sequence

x1 x2

x3 x4

interval graph

ATCGGGAACGGTTTACGTGGTx2

x1x3

x4

interval representation

huge interval representation

Page 4: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Our Problem

Input : An interval representation of an interval graph Output : An MPQ-tree

canonical and compact Isomorphism, (random generation, enumeration)

interval representation MPQ-tree

1

2

3 4

5 6

7 8

9

10 11

12

1

2 2, 4 4

3 5 6

7 8

129

10 11

Page 5: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

PQ-tree (Booth and Lueker 1979)

Auxiliary data structure for interval graph Ordered tree Internal nodes are labeled ‘P’ or ‘Q’ Leaf     maximal clique O(n) space

Interval graph recognition O(n+m) time

Only partial information No information for vertices

C1 C2

C3 C4

C7

C5 C6

Page 6: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

MPQ-tree (Korte and MÖhring 1989)

Data structure for interval graph Modified PQ-tree node vertices O(n) space

Interval graph recognition O(n+m) time

Interval graph isomorphism O(n+m) time

1

2 2, 4 4

3 5 6

7 8

12

9

10 11

Page 7: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

P-node

P

Are the two interval graphs corresponding to these interval representations isomorphic?

Page 8: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Q-node

1

P

Q

Are the two interval graphs corresponding to these interval representations isomorphic?

Page 9: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Known Algorithms for constructing (M)PQ-trees

1. Korte and MÖhring(1989) Input: a graph representation Output: an MPQ-tree O(n+m) time Many conditional branches

2. McConnell and Montgolfier(2005) Input: an interval representation Output: a PQ-tree O(n log n) time

When inputs are sorted, O(n) time Too generalized

Page 10: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

1

23 4

5 67 8

910 11

12

1

2

3

4

5

6

78

910

1112

1

2   2, 4   4

3 5 6

7 8

129

10 11

interval representation

graph representation

MPQ-tree

2 O(n log n) time

O(n+m) space O(n) space

O(n) space

MPQ-tree from interval representation

PQ-treeO(n) space

C1 C2

C3 C4

C5 C6

C7

1 O(n+m) time

Page 11: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

1

23 4

5 67 8

910 11

12

1

2

3

4

5

6

78

910

1112

1

2   2, 4   4

3 5 6

7 8

129

10 11

2

MPQ-tree from Interval Representation

C1 C2

C3 C4

C5 C6

C7

1 Our approach

O(n log n) time

interval representation

graph representation

MPQ-tree

O(n+m) space O(n) space

O(n) spacePQ-treeO(n) space

O(n log n) timeO(n+m) time

Page 12: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Outline of Our Algorithm

O(n)time

An interval representation

A compact interval representation

An MPQ-tree

P-nodes, Q-nodes and leaves

7 8

1

3 5 612

9

1011

2 2, 4 4

2, 4

1

3 5 6

7 8

129

1011

O(n)time

O(n)time

Page 13: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Characterization of nodes

Leaves Intervals of length 0

Q-nodes Overlapped intervals

P-nodes Other intervals

Theorem

Page 14: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Order of Sweep

Sweep intervals from left to right Left endpoints precede right endpoints

When left endpoint, long interval precedes short intervals When right endpoint, short interval precedes long intervals

Page 15: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Finding Q-nodes

for each endpoint i doif i is a left endpoint, PUSH(S,i)if i is a right endpoint, compare the stack top with i

if they don’t match, the intervals from the stack top to i on stack belongs to a Q-node

2 L

1 L

stack S

3 LQ

6

2

3

4

5

1

7

8 9

5 L

4 L

6 L

8 L9 L

7 L

2R

1R

3R

5R

4R

6R

8R9R

7R

1

7

3 5 6 8 9

2, 4

Page 16: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Outline of Our Algorithm

O(n)time

An interval representation

A compact interval representation

An MPQ-tree

P-nodes, Q-nodes and leaves

7 8

1

3 5 612

9

1011

2 2, 4 4

2, 4

1

3 5 6

7 8

129

1011

O(n)time

O(n)time

Page 17: Simple Efficient Algorithm for  MPQ -tree of an Interval Graph

Conclusion

New algorithm for MPQ-trees from interval representations simple O(n log n) When inputs are sorted, O(n) time (theoretically optimal)

Future Works Applications of MPQ-trees

Enumeration and random generation of interval graphs