1. Metrics

Define two distance functions d1, d2 : R^2 × R^2 → R on Euclidean plane R^2 by the formulas

for x = (x1, x2), y = (y1, y2) ∈ R^2

2. Topology

Let X, Y be nonempty sets and f : X → Y be an arbitrary map. Given a topology T on Y , show that the family of sets
f^(−1)(T ) = {f^(−1)(V ) : V ∈ T }
is a topology on X.

3. Jordan curve

Recall the Jordan Curve Theorem which says that every simple closed curve in the plane decomposes R^2 into two.

4. Homeomorphisms

Give explicit homeomorphisms to show that the following spaces with topologies inherited from the respective containing Euclidean spaces are homeomorphic:

5. Union-Find

Implement the Union-Find datastructure/algorithm in Python.