                         Fully Dynamic Euclidean Bi-Chromatic Matching in Sublinear Update Time

   • If the total cost of non-µ∗ edges of C is larger then that of the µ∗ edges, then if this cycle is removed from the path, we
     would get a smaller cost augmenting path between x and y.

   • If the total cost of non µ∗ edges of C is smaller then that of the µ∗ edges, then the matching (µ∗ \ C) ∪ (C \ µ∗ ) (the
     matching received by augmenting µ∗ by C) is of smaller cost then µ∗ and is a perfect matching of A, B.



Theorem E.3. (Bellman, 1958) Belman-Ford: There exists an algorithm which given a graph G = (V, E) and distance
function c : E → R where G doesn’t contain a negative length cycle with respect to distance measure c, returns a shortest
path between two vertices of V in time O(|V | · |E|)

Augment-Matching Procedure We are now ready to describe the procedure which augments the implicit matchings
under vertex updates, while making sure only a small number edges are affected by the update.
Recall that an implicit matching γ ∗ [Yv ] of v ∈ T corresponds to a matching of the aggregated versions of points Yv . Assume
that points (x, y) are inserted into Yv . Define the following simple graph G = (V, E) and corresponding edge distance
function c: define V to consist of p2 nodes, VC representing the center pints of the sub-cells of v, and two additional nodes
x′ , y ′ .
Without loss of generality assume x and y are red and blue respectively. Add an edge between x′ and all nodes of vC ∈ VC
to E where v corresponds to a sub-cell of v containing only blue points in Yv (recall that the points of Yv in every sub-cell
of v are monochromatic). Set c((x′ , vC )) to correspond to the distance between the centers of sub-cells of x′ and vC .
Similarly, add an edge between y ′ and all nodes of vC ∈ VC to E where v corresponds to a sub-cell of v containing only red
points in Yv , and set c((x′ , vC )) to correspond to the distance between the centers of sub-cells of x′ and vC .
In addition add an edge to E between any two sub-cell center nodes vC , wC if their sub-cells contain points of the opposite
color. Set c((vC , wC )) to be the distance between the respective sub-cell centers if there isn’t an edge between the centers in
γ ∗ [Yv ], and otherwise set it to be the negative of this distance.
By construction, a path between x′ , y ′ in G corresponds to an augmenting path of γ ∗ [Yv ] between x, y. By Claim E.2, the
shortest x′ , y ′ in G corresponds to a minimum cost augmenting path between x, y with respect to γ ∗ [Yv ]. Observe that a
negative length cycle of G could be used to reduce the cost of γ ∗ [Yv ] which was assumed to be optimal, hence no such cycle
should exist.
Finally, due to Claim E.1 we may augment γ ∗ [Yv ] to be a min cost perfect matching of the aggregated versions of Yv ∪ {x, y}
with such a shortest x′ , y ′ path.
Constructing graph G may take O(|V | + |E|) = O(p2 ) time. We may find the shortest path in O(p3 ) time by Theorem E.3.
Any shortest path in G can be of length O(p2 ) as G doesn’t contain negative length cycles. Hence, we can update the
implicit matching of Yv in O(p3 ) time. Once the the updated implicit matching is computed we can transform it to an
explicit matching of Yv ∪ {x, y} in time O(p2 ) since the difference between the old and updated state of γ ∗ [Yv ] (and hence
the corresponding explicit matching) is only O(p2 ) edges. We state this formally by the following lemma:
Lemma E.4. Let T be a p-tree and v a node in T , γ ∗ [Yv ] the implicit matching corresponding to node v, and x, y ∈/ Yv
two points of opposite colors. AUGMENT-M ATCHING(γ ∗ [Yv ], x, y) returns an optimal implicit matching of the aggregated
versions of Yv ∪ {x, y}, in O(p3 ) time.

Note that while Lemma E.4 can be easily be extended to point pair deletions, there is no need for this. Assume we want
to update an implicit matching γ ∗ [Yv ] when points (x, y) are deleted from Yv . Let the neighbors of x, y under γ ∗ [Yv ] be
x′ , y ′ . We may remove edges (x, x′ ) and (y, y ′ ) from γ ∗ [Yv ] and re-insert point pair (x′ , y ′ ) using AUGMENT-M ATCHING
to simulate this deletion.

E.2. Dynamic Algorithm
We now describe I NITIALIZE, the update procedures I NSERT and D ELETE, as well as Q UERY-R ECOURSE. The procedure
Q UERY-C OST is the same as in the basic algorithm. We will only describe how to do point insertions, as the procedure
for point deletions is almost identical. Similarly as before, given p-tree T , our goal is to maintain sets Ev , Yv′ (A), Yv′ (B),
difference ηv , matching γ ∗ [Yv ], but also matchings µ′ [Yv ] and µv , together with its corresponding cost c(µv ) for all the

                                                               21
