o($n \log n$) algorithm for a noncrossing matching in plane

83 Views Asked by At

I am thinking about the algorithm for the following well-known mathematical problem.

  • $n$ red points and $n$ blue points in the plane in general position are given. Find the matching $\{r_1, b_1\}, \ldots, \{r_n, b_n\}$ such that no two line segments $r_ib_i$ and $r_jb_j$ cross.

I came up with the following divide and conquer method:

  1. Draw a line $\ell$ which simultaneously divides red points and blue points equally (Ham Sandwich Theorem guarantees the exitence).
  2. Solve the problem recursively for each side of $\ell$

Surprisingly, there are O($n$) algorithm for Step 1 (see http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2002/DanielleMacNevin/algorithm-pg1.html). Therefore the time complexity is O($n \log n$) in total.

Is there a faster algorithm than this?