Presentation is loading. Please wait.

Presentation is loading. Please wait.

PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional.

Similar presentations


Presentation on theme: "PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional."— Presentation transcript:

1 PC-Trees Based on a paper by Hsu and McConnell

2 Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional way to solve it We show PC Trees, which are simpler to update and more general in their uses We show how to use this to recognize if a graph is an interval graph, and to recognize if a graph is planar

3 Consecutive ones Given a n*m matrix, find a permutation of the columns such that the ones in each row are consecutive 0111101 0011100 1011010 0011111 0011100 1111000 Each row is a contraint.

4 How would you approach the consecutive ones problem?

5 Consecutive ones Solution: We want a Data Structure that holds ALL valid permutations of columns. At each step we integrate the new constraint into the set of solutions. 0111101 0011100 1011010 0011111 0011100 1111000 Each row is a contraint.

6 PQ Tree Represents a set of permutations Permutation elements are leaves P nodes allow arbitrary permutation Q nodes allow only reversal

7 Manipulation of PQ Tree

8 PQ Tree Represents the permutations: 23415, 23451, 23514, 23541, 23145, 23154, 41523, 45123, 51423, 54123, 14523, 15423

9 ABCDEFG 0011111 0011100 1100000 AB C D E F G Example 1

10 Example 2 ABC 110 011 ABC

11 Old Algorithm for Consecutive Ones (Booth and Lueker) Build initial PQ Tree Go over the rows of the matrix in order. A row is a constraint. Update the tree accordingly. If at the end you have a solution, return it. PROBLEM – updating of the tree is difficult! (because of “templates”). OBSERVATION – templates are complicated because of lack of symmetry – the root is “special” SOLUTION – Generate symmetry: Ciruclar Ones and PC Trees

12 Circular ones Given a n*m matrix, find a re-ordering of the columns such that the ones in each row are consecutive, modulo the table boundary 1001111 0011100 1100011 Each row is a contraint.

13 Consecutive Ones (non-symmetric) Circular Ones (symmetric) PC Tree (symmetric) BEFORE AFTER Consecutive Ones (non-symmetric) PQ Tree (non-symmetric) – complicated updating Reduction (add 0 column) solved using

14 PC Trees Unrooted – all nodes have same “importance” Represents circular permutations P nodes – allow arbitrary permutation on edges C nodes – allow reversing of order of edges

15 Manipulation of PC Tree

16 Advantages of PC Tree Simpler Update Wider Applicability

17 Interval Graph Recognition An Interval Graph is the intersection graph of set of intervals How can we recognize if a graph is an interval graph?

18 Interval Graph Recognition Let us look at its maximal cliques, and define the clique matrix Theorem: A chordal graph is an interval graph iff the clique matrix has the consecutive ones property

19 Interval Graph Recognition Given a graph: Check if it is chordal. If not, it is not an interval graph If it is chordal, “compute” its clique matrix Check if it has the consecutive ones property – there, you have your answer.

20 Planarity testing We no longer use PC- Trees, but PC- Graphs: Graphs with P nodes and C nodes At each step we add a vertex to the graph and update it to represent all “planar embeddings” of our graph

21 Planarity testing Planar Graphs are invariant under stretching and rotation We think of the locations of all vertices around a single vertex as the “constraints” on it.

22 Planarity testing For example, when we add a vertex, we can always “flip over” the rest of the graphs and the orderings there, and still get an embedding. So this corresponds to a C-node This is more complicated than solving circular ones, but uses similar technology, plus some graph-theory

23 Morals 1.Find the “real” model of the problem 2.Don’t stick to dogmatic ways of thinking (or: Americans spend billions of dollars on inventing a pen that writes in zero gravity. Russians use pencils)


Download ppt "PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional."

Similar presentations


Ads by Google