Title: PC trees and Circular One Arrangements
1PC trees and Circular One Arrangements
- Wen-Lian Hsu
- Ross M. McConnell
Presented by Noa Bar-Yosef
2Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
3Interval Graphs
c
4Motivation
- Molecular Biology
- 1950s Benzer showed that the intersection graph
of a large number of fragments of genetic
material was an interval graph. - Other Applications
- Scheduling jobs
- Maximum cliques
- Minimum coloring
5A Clique Matrix
6Recognizing Interval Graphs
- 1976 - Booth and Leuker
- If a consecutive-ones ordering is found, it is
easy to find a representation of the graph with
intervals in linear time.
A
C
A
D
B
E
C
B
D
E
Consecutive-Ones
7A matrix WITHOUT a consecutive-ones property
8Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
9PQ-Trees
10Order of Children Node are Reversed
11Order of children of a P node are permuted
arbitrarily
P
P
Q
Q
1
13
11
12
2
3
P
6
7
4
8
5
9
10
12PQ-Trees
- Booth and Leukers observation
- testing for the circular-ones property reduces in
linear time to testing for the consecutive-ones
property.
Circular Ones
13A matrix WITHOUT a circular-ones property
14PQ-Trees
- Notoriously difficult to program!
- Extensive Literature on the subject try to solve
the complexity of the algorithm. - Why not use the circular-ones property?
- Solve the consecutive-ones problem and reduce it
to the circular-ones problem.
15Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
16PC - Trees
17Reverse the leaves on one side of an edge
18Reverse leaves of forest if a P -Node would be
removed
4
9
5
10
p
6
11
7
c
1
8
3
2
19An Unrooted Set Family
- Let an unrooted set family be a set family F on
domain V with the following properties - The singleton subsets of V are members of F
- Whenever X?F, then so X V-X.
- Whenever X,Y?F, X-Y, Y-X, Y?X and (X?Y)
V-(X?Y) are all non-empty, then X?Y, X?Y, and X?Y
are also in F
20Theorem of Representation
- Theorem For an unrooted set family, there is an
unrooted tree whose nodes are labeled prime and
degenerate, and whose leaves are the singletons
subsets of V. X?F iff it is the union of the leaf
set of a subtree that results from the deletion
of an edge, or the union of leaf sets of some of
the subtrees that result from the deletion of a
degenerate node.
21Circular Module
X B,C is uniform in Row II
Y B,C is a circular module
22The circular modules are an unrooted set family!
- Unrooted Set Family
- The singleton subsets of V are members of F.
- Whenever X?F, then so X V-X.
- Whenever X,Y?F, X-Y, Y-X, Y?X and (X?Y)
V-(X?Y) are all non-empty, then X?Y, X?Y, and X?Y
are also in F
23Circular Modules Edge and P Modules
- A circular module X is either an edge module,
which means the leaves on one side of an edge
X
24Circular Modules Edge and P Modules
- Or a P module, which means a set that is not an
edge module but the union of leaves in a subset
of the trees formed when a P node is removed.
X
25Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree
- Algorithm time Analysis
26Constructing the PC-Trees
- On induction on the number of rows of a matrix.
- The ith step of the algorithm modifies the PC
tree so that it is correct for the submatrix
consisting of the first i rows of the matrix.
27Constructing the PC-tree Cont.
- When adding a row, no new circular modules are
created. But older ones may become defunct
because a constraint was added.
28Order preserving Contraction
f
a
g
e
b
z
c
d
29Leaves and Edges
Step i
0 Empty leaf 1 Full leaf
Terminal Edge
30Construction Algorithm Illustration
31Construction Algorithm
- The initial PC tree is a P node that is adjacent
to all leaves, which allows all (n-1)! circular
orderings. - At each row
- Find the terminal path, and then perform flips of
C nodes and modify the cyclic order of edges
incident to P nodes so that all 1s lie on one
side of the path. - Split each node on the path into two nodes, one
adjacent to the edges to full leaves and one
adjacent to the edges to empty leaves. - Delete the edges of the path and replace them
with a new C node x whose cyclic order preserves
the order of the nodes on this path. - Contract all edges from x to C-node neighbors,
and any node that has only 2 neighbors. -
32PC Tree Example - Initially
33PC Tree Example Row I
34PC Tree Example Row II
E0
35PC Tree Example Row III
D0
36PC Tree Example Row IV
37PC Tree Example Row V
G0
38PC Tree Example Row VI
C0
F1
H1
39PC Tree Example Row VII
A1
40PC Tree Example Last Row
41Circular Ones Matrix
42Correctness of Algorithm
- By induction
- i1 a tree that represents all possible circular
permutations. - i
- Ignore effects of contraction
- T be the PC tree before the ith row, T after.
- An edge set of T is in the set family represented
by T iff it continues to be a circular module. - A P set of T continues to be represented in T
iff t is a circular module in the first i rows. - The cyclic order of all C nodes must be correct.
43Correctness of Algorithm Illustrated
44Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
45Solving the Consecutive-Ones Problem
- Add the zero vector as a new column of the matrix
- Compute the PC-tree for the new matrix
- Pick it up by the leaf corresponding to the new
column to root it - The subtree rooted at its child is the PQ tree
for the original matrix. - Think of cutting up the vertical cylinder
at X!
46Computing Consecutive Ones Matrix
47Consecutive Ones - Initially
48Consecutive Ones Row I
49Consecutive Ones Row II
E0
50Consecutive Ones Example
?
2
1
51Consecutive Ones Last Row
A1
D1
52Circular Ones Matrix
53Creating the Consecutive One Matrix
54Consecutive Ones Matrix
55PQ Tree
D1
56PQ Tree and Matrix
57Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
58Data Structure for PC tree representation
59Full-Partial Labeling Algorithm
Partial
Full
1
1
60Finding the Terminal Path Efficiently - 1
Key Observation
Apex the least common ancestor of partial nodes
61Finding the Terminal Path Efficiently - 1
0
1
0
1
p
0
1
0
f
p
1
p
1
f
p
0
p
1
p
0
1
0
1
0
62Finding the terminal Path Efficiently - 3
- If X is a node on the terminal path other than
the apex, the parent of X is also on the terminal
path. - Finding Xs parent
- P node O(1)
- C node All full neighbors are consecutive! Find
the neighbor that isnt full! Cost proportional
to number of full neighbors.
63Performing the update step on the terminal path
efficiently
O(pk)
Assigning Parent bits O(p) Contraction O(1)
O(p)
64Linear Time Bound
- Amortized Analysis
- F(M,i) 2ui Ci ?x?Pi(deg(x) 1)
F(M,0) T(m)
1 Credit for each C-node
65Outline
- Motivation
- PQ Trees to solve consecutive-ones problem
- PC Trees to solve circular-ones problem
- Algorithm to build a PC tree
- Turning a PC tree into a PQ tree
- Data Structure for representing the PC tree and
algorithm time analysis - Summary
66Summary
- PC tree solves a more general problem than that
of the PQ tree in a very simple matter. - The PQ tree can be obtained from the PC tree
- The linear time bound analysis is similar
- Perhaps the problem with the PQ-tree is that it
is rooted???
67References
- Algorithmic Graph Theory and Perfect Graphs,
Martin C. Golumbic - PC Trees vs. PQ Trees, Wen-Lian Hsu
- PC trees and Circular-One Arrangements, Wen-Lian
Hsu, Ross M. McConnell - PQ Trees, PC Trees, and Planar Graphs, Wen-Lian
Hsu, Ross M. McConnell - And thank you to http//www.lsi.upc.edu/dbaneres/
for his examples
68(No Transcript)