The 2-dimensional topology tree Given a restricted partition of order k we
2.8. The c-structure In this section we address the following problem Given
the c-nodes of a cluster graph (see section 2.5) or the c-nodes of a shared graph G(s) for a new shared vertex s (see section 2.6.1), determine which c-nodes are CV-split by an update operation. For this problem we give in this subsection a data structure, called c-structure and show in the next subsection that in a phase O(m/k) splits of c- node occur because of violation of condition (a) or (b) (called CV-splits). Additionally
we show that the e-nodes of a shared graph ˜G(s) for an old shared vertex s (see
section 2.6.2) fulfill the conditions of a c-node and therefore the same data structure and proof apply.
First we recall the definitions of c-node and e-node; next we show that an e-node also fulfills the conditions of a c-node, and then we define the c-structure exactly .
Let H = H1 for c-nodes in cluster graphs and H = H2 for c-nodes in shared
graphs. Given a node C in H with ancestor A a c-node represents a maximal set X of nodes of H such that
(a) every node C ∈ X is a neighbor of C,
(b) all nodes in X are connected in H \ C,
(c) all nodes in X have the same ancestor which is different from A, (d) at the creation of C, the set X contains only one node, and
(e) at each previous point in time since the creation of C all nodes of H that
contain the vertices in ∪C∈XC existing at this time are represented by the
same c-node.
We show next that every e-node in the graph ˜G(s) of an old shared vertex s fulfills
the conditions of a c-node with H = H2. Thus the amortization lemma of the next
Lemma 2.41. Every e-node in the graph ˜G(s) of an old shared vertex s fulfills the conditions of a c-node with H = H2.
Proof. By definition every e-node fulfills conditions (a)–(d) of a c-node. We only have to show that it also fulfills condition (e).
Let X be an e-node. By definition the vertices in ∪C∈XC used to belong to the
same node Coldof H2and since the split of Cold, the graph G(s) was not modified and
the connected components of H2\ Cs did not change. Thus, before the last change
in G(s) or H2\ Csthe nodes in X belonged to the same node of H2 and thus were
represented by the same e-node.
Assume by contradiction that the nodes in X were represented by different e-
nodes at some point since the last change in G(s) or H2\ Cs. While the nodes were
represented by different e-nodes they either must violate condition (a) or (b) of an e-node, since conditions (c), (d), and (e) continue to hold. However, now they fulfill
conditions (a) and (b), i.e., either G(s) or H2\ Cs must have changed, which is a
contradiction.
Thus, e-nodes are just a special case of c-nodes and we will just use the term c-node in the following to denote c-nodes as well as e-nodes.
A c-node of C is CV-split iff conditions (a) or (b) of a c-node are no longer fulfilled. Given the high-level graph H and its data structures the c-structure maintains the c-nodes of each node in H under the following operations:
(1) c-split (C, C1, C2, u, v), where C is a node of H split by the delete(u, v) or
insert(u, v) operation, C1 and C2 are the two nodes of H created by the split. Split
the node C into C1and C2.
(2) c-add (C1, C2), where C1 and C2 are nodes of H. Add one edge between C1
and C2.
(3) c-remove (C1, C2), where C1 and C2 are nodes of H. Remove the edge
between C1 and C2 and return a (possibly empty) list of CV-split c-nodes and for
each newly created c-node return its element list.
We use the following data structure for the c-structure, which uses O((m/k)2)
space.
(T1) For each node of H we keep a list of its c-nodes. For each c-node we keep a list of its elements. For each node in H we keep a list of all the c-nodes it belongs to. The position of the node in the list of the c-node and the position of the c-node in the list of the node point to each other.
We keep two c-structures, namely, one with H = H1 to determine the CV-splits
in c-nodes of the cluster graphs, and one with H = H2 to determine the CV-splits in
c-nodes of the shared graph for new shared vertices.
2.8.1. Implementing the c-structure. We implement the operations as fol-
lows.
c-split (C, C1, C2, u, v): This requires (i) updating the c-nodes of C and (ii) up-
dating the c-nodes containing C. (i) Discard all c-nodes of C. Each neighbor of C1
(resp., C2) forms a 1-element c-node for C1(resp., C2). (ii) Use (T1) to determine all
c-nodes X to which C belongs. Replace C by either C1or C2or both in X, depending
on which of the new nodes are incident to D. Note that all nodes in X still fulfill (a), (c), (d), and (e) of a c-node. By Lemma 2.8 all nodes continue to fulfill (b) as well.
c-add (C1, C2): If C1 and C2 have the same ancestor, do nothing. Otherwise,
search the c-nodes to which C1 belongs to determine whether C2 is one of them. If
not, add to the c-nodes of C2 a 1-element c-node consisting of C1. Repeat with the
c-remove (C1, C2): If C1 and C2have the same ancestor, do nothing. Otherwise,
determine the c-node of C2 to which C1belongs and remove C1from it. If this c-node
becomes empty, discard it. If the c-node is modified, output it and its new element
list. Repeat with the roles of C1and C2exchanged. Finally determine all articulation
points D on π(C1, C2) in the (updated) graph H using (HL4). Test as follows for each
c-node X of D whether (b) is violated, and if so, how to partition X. Using (HL3)
determine for each node C in X the tree neighbor of D on π(C, D) and bucketsort
the node according to the blockid of “its” tree neighbor using (HL4) and (HL6). This results in either one or two nonempty buckets. In the former case (b) is not violated. In the latter case, split the list of X according to the two buckets and report the CV-split of X and return the two resulting lists.
To analyze the running time note that the intersection of two different c-nodes of C is empty. The time spent by a c-split or c-add operation is linear in the number of c-nodes of a node in H, which is O(m/k). In c-remove we spend the time O(m/k) to determine all articulation points and then the following time per articulation point D: O(log n) per non-tree neighbor of D to bucketsort it and constant time to remove it from the bucket again. Since the nodes D are articulation points on a path in H, this sums up to O((m/k) log n) by Lemma 2.1. Additionally the c-remove operation
spends time O(m/k) to update the c-nodes of C1 and the c-nodes of C2. Thus, the
total time spent is O((m/k) log n).
2.8.2. Updating the c-structure. At the beginning of a phase each c-node
consists of one node: every neighbor of a node in H forms its own c-node.
Whenever an edge is inserted in G and H changes, then first the data structures of H are updated and then a c-add and potentially afterward a constant number of c-split’s are executed in the c-structure. Whenever an edge is deleted from G and H changes, then first the data structures of H are updated and then potentially a constant number of c-split’s and afterward a c-remove are executed in the c-structure. If an internal tree edge of a cluster C is deleted, then this implies that first the cluster is split at this tree edge and afterward the tree edge is deleted. Each operation can be implemented in time O((m/k) log n). Since there are only a constant number of them per update in G, this gives a total time of O((m/k) log n) to update the c-structure.
Theorem 2.42. The c-structure
(1) can be updated in time O((m/k) log n) after each update in G, and returns all the c-nodes CV-split by the update and the resulting c-nodes, and
(2) can be built in time O(m).