                         Fully Dynamic Euclidean Bi-Chromatic Matching in Sublinear Update Time

nodes v in T which is the key difference from the basic algorithm presented in the main body of the paper. We first begin by
describing the initialization procedure.

Initialization The procedure I NITIALIZE is almost the same as in the basic version of the algorithm. However, in the
advanced algorithm, at each node v of T , we also convert the implicit matching to its corresponding explicit matching.
                 S us to maintain the complete matching of a subtree corresponding rooted at each of its nodes, defined as
This further allows
µv := µ′ [Yv ] ∪ u∈Cv µu , here Cv denotes the children of node v in p-tree T .

Handling Insertions Without loss of generality, we assume that we are inserting a red point a to A. As in the basic
algorithm, I NSERT proceeds in two steps: updating the restricted p-tree and updating the matchings at each affected node.
We define the recursive procedure I NSERT-U PDATE(v, a) for three types of nodes in T : new subroots, non-marginal leaf
nodes, and non-marginal internal nodes.
If a leaf v is the new subroot of T , the I NSERT-U PDATE(v, a) procedure is the same as in the dynamic algorithm presented
in Algorithm 1.
For non-marginal leaf nodes v, the procedure I NSERT-U PDATE(v, a) checks if there exists a pair of points of opposite color
at v, and if so, augments the matching at v.
For non-marginal internal nodes v, we have two cases: the excess set Eu of its affected child u either increases by one red
point a′ , or decreases by one blue point b′ . In the first case, we proceed similarly as in the leaves. Namely, if there exists a
pair of points of opposite color at v, and if so, augments the matching at v. In the second case, we first have to check if the
blue point b′ was a part of a matching at v. If so, we first have to break that matching. After this, we proceed similarly to the
first case.
Finally, we prove the following theorem:
Theorem 1.1. For any 0 < ε ≤ 1, there exists a fully dynamic algorithm that maintains an expected O(1/ε)-approximate
solution to the Euclidean bi-chromatic matching problem defined on the point-sets A, B ⊂ R2 , |A| = |B|, while pairs of
points are inserted into and deleted from A, B in O(nε · ε−1 ) worst-case update time. Here, n denotes the maximum size of
A throughout the update sequence.


Proof of Theorem 1.1. As the proof of this theorem is very similar to the proof of Theorem 4.1, we only note the key
differences between these two algorithms.
Running time: Compared to the basic algorithm, the running time of I NITIALIZE only increases by the time required to
convert implicit matchings at nodes of T to their corresponding matchings of the input points, and therefore also store the
complete matchings of the subtrees. By Lemma 3.2, this takes an additional O(n) time, making the total run time of the
procedure still O(n1+ε ).
Now we discuss updates. As mentioned before, the difference between the basic and the advanced update algorithm is that
now, instead of recomputing the entire implicit matching at each affected node (using AUGMENT-M ATCHING), we use
AUGMENT-M ATCHING procedure to augment both the implicit and the aggregated matching, if needed. The computation
of AUGMENT-M ATCHING takes O(p3 ) time by Lemma E.4, so we again obtain that O(nε )/ε is running time required for
the update procedure of this algorithm.
Regarding queries, in the advanced algorithm, we can easily report the perfect matching by simply returning the complete
matching of a subtree at root r of T , that is µr . Further, we obtain a more efficient algorithm for reporting the recourse of
the matching. Namely, note that the aggregated matching at each affected node changes only along the augmenting path
found in AUGMENT-M ATCHING. Since the length of this path is at most p2 , the total recourse is at most O(p2 · log          U
                                                                                                                         log p ),
                              ε
              ε
which is O(n /ε) for p = n 10 .
Correctness: In terms of correctness of the approximation, the advanced and basic versions of the algorithms behave exactly
the same. That is, the advanced algorithm also satisfies the following. For any Yv for v ∈ T points of Yv are matched
exclusively to each other. Further, for leaf v ∈ T the matching of Yv is computed via an optimal algorithm, for any non-leaf
v ∈ T the matching of Yv is computed by the implicit-explicit matching procedures. Finally, for any cell of the grid, the
number of points not matched within that cell exactly corresponds to the the color dis-balance of the points present in that
cell (see the similar argument concerning the basic algorithm see Section D.2). As argued in the analysis presented in
Section C, the algorithm correctness only relies on these properties of the output matching.

                                                               22
