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 Each interval corresponds to a vertex on graph G=(V, E) (|V|=n, |E|=m) Two intervals intersect ⇔ corresponding two vertices are adjacent I3I3 I1I1 I2I2 I4I
Applications of Interval Graphs bioinformatics scheduling problems x 1 : ACGGTTTA x 2 : ATCGGAACG x 3 : AACGGTTTAC x 4 : TTTACGTGGT DNA sequence x1x1 x2x2 x3x3 x4x4 interval graph ATCGGGAACGGTTTACGTGGT x2x2 x1x1 x3x3 x4x4 interval representation huge interval representation
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 ,
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 C1C1 C2C2 C3C3 C4C4 C7C7 C5C5 C6C6
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,
P-node P Are the two interval graphs corresponding to these interval representations isomorphic?
Q-node 1 P Q Are the two interval graphs corresponding to these interval representations isomorphic?
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
, interval representation graph representation MPQ-tree 2 O(n log n) time O(n+m) space O(n) space MPQ-tree from interval representation PQ-tree O(n) space C1C1 C2C2 C3C3 C4C4 C5C5 C6C6 C7C7 1 O(n+m) time
, MPQ-tree from Interval Representation C1C1 C2C2 C3C3 C4C4 C5C5 C6C6 C7C7 1 Our approach O(n log n) time interval representation graph representation MPQ-tree O(n+m) space O(n) space PQ-tree O(n) space O(n log n) time O(n+m) time
Outline of Our Algorithm O(n) time An interval representation A compact interval representation An MPQ-tree P -nodes, Q -nodes and leaves , 4 4 2, O(n) time
Characterization of nodes Leaves Intervals of length 0 Q-nodes Overlapped intervals P-nodes Other intervals Theorem
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
Finding Q-nodes for each endpoint i do if 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 2L2L 1L1L stack S 3L3L Q L5L 4L4L 6L6L 8L8L 9L9L 7L7L 2R2R 1R1R 3R3R 5R5R 4R4R 6R6R 8R8R 9R9R 7R7R , 4
Outline of Our Algorithm O(n) time An interval representation A compact interval representation An MPQ-tree P -nodes, Q -nodes and leaves , 4 4 2, O(n) time
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