Theorem 11.14
The oriented neighborhood of every oriented vertex contains a
happy clique.
Let
be the oriented vertices
in
in increasing left endpoint order (we ignore unoriented
vertices in this stage).
To locate a happy clique in ,
The algorithm traverses the
oriented vertices in
according to this order.
Let L(e) and R(e) be the left and right endpoints,
respectively, of the interval corresponding to a vertex e in the
realization of .
After traversing
for
,
the algorithm maintains a happy clique Ci in
the subgraph of
induced by these vertices.
Assume |Ci|=j,
and let
be the vertices in Ci where
.
The vertices of Ci are maintained in a linked list
ordered in increasing left endpoint order.
If there exists an interval that contains all the intervals
in
Ci then the algorithm maintains a minimal such interval
ti.
The clique Ci and the vertex ti (if exists) satisfy
the following invariant:
Invariant 11.4.1
1) Every vertex
,
,
such that
L(vi1) < L(vl)
must be adjacent to ti.
2) Every vertex
,
L(vl) < L(vi1)
that is adjacent to a vertex in Ci is
either adjacent to an interval vp such that
R(vp) < L(vi1)
or adjacent to ti.
We prove the correctness of this invariant by induction: Initially
and t1 is undefined. If
R(eij) < L(ei+1)
then Ci is guaranteed to be happy in
(see
figure
reflec11:Fig:fighappy(a)). We need to
focus only on cases with
.
The
induction step: We assume correctness up until i and show how to
obtain Ci+1 and ti+1 if
.
We
have to consider the following cases: Case 1. The
interval ti is defined and
R(ti) <R(vi+1). Continue with
Ci+1 = Ci and
ti+1 = ti. See figure
11.11(b).
Case 2. The interval
ti is not defined or
.
a)R(vij) < R(vi+1) and
.
Ci+1 is obtained by adding vi+1 to Ci and
ti+1 =
ti. See figure 11.11(c).
b)R(vij) < R(vi+1) and
L(vi+1) > R(vi1).
The clique Ci+1
consists of vi+1 alone and
ti+1 = ti. See figure
11.11(d). c)R(vi+1) < R(vij). As in the previous case
.
In this case ti+1 is set to vij,
the last interval in Ci. See figure 11.11(e).
Figure 11.11:
The various cases of the algorithm for finding a happy
clique. The topmost interval is always ti. The three thick
intervals comprise Ci. The dotted interval corresponds to
vi+1.
The fact that Ci is happy in
the subgraph induced by
follows from this
invariant. It is straightforward to see that the clique Cl
that the algorithm stops with, is happy.
The running time of the algorithm is proportional to the
number of oriented vertices traversed since a constant
amount of work is performed for each such vertex.
Next:Computing the Unoriented Degrees Up:An Algorithm for Sorting Previous:Implicit Representation of theItshack Pe`er 1999-03-16