Comparability Graphs
Comparability Graphs
This lecture develops the concepts of comparability and co-comparability graphs. Then, we define perfect
graphs and their properties.
Definition 3.1 A comparability graph is an undirected graph in which it is possible to orient each edge such
that the resultant graph (G=(V, U)) has the following properties
Note: A comparability graph with oriented edges has to be acyclic, or else it violates the anti-symmetry
property.
In effect, comparability graphs capture partial order or precedence between pairs of vertices. For instance,
an edge u → v may convey the constraint that the event u must precede the event v. In general, the problem
of assigning directions to edges is not trivial. In the rest of the lecture, the orientations of the edges are
assumed to be given.
3.1.1 Example
Figure 3.1: A comparability graph, an acyclic transitive orientation and orientation that is neither acyclic
not transitive
3-1
3-2 Lecture 3: Comparability Graphs
The above graph is chordal as it does not have an induced cycle of length ≥ 4.
Proof: Consider an interval graph G=(V, E) and its complement GC =(V, E’). Let u, v ∈ V . Now (u, v) ∈ E 0
/ E. For each (u, v) ∈ E 0 , we should be able to orient it so that it satisfies the properties mentioned
iff (u, v) ∈
earlier. Since u and v represent intervals, there would be an edge between them in GC iff they do not
intersect. Orient the edge as follows: u → v if u starts and ends before v, or v → u otherwise.
The above orientation satisfies transitivity, since if interval u comes before v which comes before w, then
u also comes before w. Also, it is anti-symmetric, because if interval u precedes v, then u starts and ends
before v starts. Hence v cannot precede u.
Note: A co-comparability graph may not be interval. Actually, it may not even be chordal. For instance,
refer to figure 4.
Lecture 3: Comparability Graphs 3-3
Figure 3.4: Co-comparability graph G and its complement, which is comparability. Note that G is not
chordal
Note that not all graphs are perfect. For e.g. a cycle of length 5 is not perfect.
G is perfect iff it does not contain an odd cycle (of length ≥ 5) or complement of odd cycle (of length ≥ 5)
as an induced subgraph.
Suppose G=(V, E) is a comparability graph (assume orientations are given). We want to find the largest
clique in G.
3-4 Lecture 3: Comparability Graphs
Lemma 3.6 Every directed path is a clique. Further, the longest path is the largest clique.
Proof: We first prove that any path gives a clique. Consider a directed path (v1 , v2 , ..., vk ). Because of
transitivity, there are edges from v1 to v3 , ...vk , v2 to v4 , .., vk and so on. Hence there are edges between
every pair of vertices on the path (in the undirected version of the graph). Hence it is a clique.
Next we prove that any clique gives a path. Note that a clique is a DAG, with an edge between every pair
of vertices. Also it has a topological sort where each edge goes from left to right. Hence it gives a path.
To find the longest path, we arrange the vertices in a topological sort and use dynamic programming. Let
L(vi ) denote the longest path starting at vertex vi .
We want to find the chromatic number of a comparability graph. Continuing with the formulation for the
longest path, consider a situation where L(vi ) ≤ L(vj ). In such a case, there cannot be an edge from vi to
vj . If there was such an edge, L(vi ) > L(vj ).
This leads to an algorithm where we can form sets of vertices, where each set contains vertices with L(v)
value 1, 2, .., ω. Since vertices in same set form an independent set, they can be colored with the same color.
We carry out the above construction, where the edges from s to L and R to t have capacity 1, while edges
from L to R have capacity ∞; and solve the min cut problem on the above graph. Let the min cut be (S, T )
and define R1 = S ∩ R, L1 = S ∩ L, R2 = T ∩ R, L2 = T ∩ L. Note that in the min cut, there cannot be edges
from L1 to R2 (because they have infinite capacity). There are two types of edges - those which go from s
to L2 and those which go from R1 to t.
Lecture 3: Comparability Graphs 3-5
Claim: R1 ∪ L2 is a vertex cover. If there it is not a vertex cover, then there exists an edge in R2 ∪ L1 .
But as argued above, there cannot be such an edge.
Not that max flow = Size of min cut = |R1 ∪ L2 | = size of min vertex cover. Hence for a bipartite graph,
the independent set can be found efficiently by taking the complement of min vertex cover obtained by the
above procedure.