# Maximum Plane Trees in Multipartite Geometric Graphs

## Abstract

A geometric graph is a graph whose vertices are points in the plane and whose edges are straight-line segments between the points. A plane spanning tree in a geometric graph is a spanning tree that is non-crossing. Let R and B be two disjoint sets of points in the plane such that $$R\cup B$$ is in general position, and let $$n=|R\cup B|$$. Assume that the points of R are colored red and the points of B are colored blue. A bichromatic plane spanning tree is a plane spanning tree in the complete bipartite geometric graph with bipartition (RB). In this paper we consider the maximum bichromatic plane spanning tree problem, which is the problem of computing a bichromatic plane spanning tree of maximum total edge length.

1. 1.

For the maximum bichromatic plane spanning tree problem, we present an approximation algorithm with ratio 1 / 4 that runs in $$O(n\log n)$$ time.

2. 2.

We also consider the multicolored version of this problem where the input points are colored with $$k>2$$ colors. We present an approximation algorithm that computes a plane spanning tree in a complete k-partite geometric graph, and whose ratio is 1 / 6 if $$k=3$$, and 1 / 8 if $$k\geqslant 4$$.

3. 3.

We also revisit the special case of the problem where $$k=n$$, i.e., the problem of computing a maximum plane spanning tree in a complete geometric graph. For this problem, we present an approximation algorithm with ratio 0.503; this is an extension of the algorithm presented by Dumitrescu and Tóth (Discrete Comput Geom 44(4):727–752, 2010) whose ratio is 0.502.

4. 4.

For points that are in convex position, the maximum bichromatic plane spanning tree problem can be solved in $$O(n^3)$$ time. We present an $$O(n^5)$$-time algorithm that solves this problem for the case where the red points lie on a line and the blue points lie on one side of the line.

This is a preview of subscription content, log in to check access.

## References

1. 1.

Alon, N., Rajagopalan, S., Suri, S.: Long non-crossing configurations in the plane. Fund. Inf. 22(4), 385–394 (1995). (also in Proceedings of the 9th ACM Symposium on Computational Geometry (SoCG), pp. 257–263, 1993)

2. 2.

Biniaz, A., Bose, P., Eppstein, D., Maheshwari, A., Morin, P., Smid, M.: Spanning trees in multipartite geometric graphs. Algorithmica (2017). https://doi.org/10.1007/s00453-017-0375-4

3. 3.

Borgelt, M.G., van Kreveld, M.J., Löffler, M., Luo, J., Merrick, D., Silveira, R.I., Vahedi, M.: Planar bichromatic minimum spanning trees. J. Discrete Algorithms 7(4), 469–478 (2009)

4. 4.

Dumitrescu, A., Tóth, C.D.: Long non-crossing configurations in the plane. Discrete Comput. Geom. 44(4), 727–752 (2010). (also in Proceedings of the 27th International Symposium on Theoretical Aspects of Computer Science (STACS), pp. 311–322, 2010)

5. 5.

Monma, C.L., Paterson, M., Suri, S., Yao, F.F.: Computing Euclidean maximum spanning trees. Algorithmica 5(3), 407–419 (1990)

## Acknowledgements

We would like to thank an anonymous referee whose comments improved the readability of the paper. Funding was provide by NSERC and NSF (Grant CCF-1228639)

## Author information

Authors

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

A preliminary version of this paper has been accepted to Algorithms and Data Structures Symposium (WADS), 2017.

The work of Ahmad Biniaz has been done while he was at Carleton University.

## Appendix: Proof of $$f(x,\alpha ) \geqslant 0$$

### Appendix: Proof of $$f(x,\alpha ) \geqslant 0$$

We want to show that

\begin{aligned} f(x,\alpha ) = \sqrt{1 + x^2 - 2x\cos \left( \pi /3 - \alpha \right) } + \sqrt{1 + x^2 - 2x\cos \alpha } - x \geqslant 0 \end{aligned}

for all $$\sqrt{3}/2\leqslant x \leqslant \sqrt{3}$$ and $$0\leqslant \alpha \leqslant \frac{\pi }{6}$$. From elementary trigonometry, we have

\begin{aligned} \cos \left( \frac{\pi }{3} - \alpha \right) = \frac{1}{2}\cos \alpha + \frac{\sqrt{3}}{2}\sin \alpha , \end{aligned}

from which $$f(x,\alpha )$$ can be re-written as

\begin{aligned} f(x,\alpha ) = \sqrt{1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha } + \sqrt{1 + x^2 - 2x\cos \alpha } - x . \end{aligned}

Let us solve the equation $$f(x,\alpha ) = 0$$, which corresponds to

\begin{aligned} \sqrt{1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha } + \sqrt{1 + x^2 - 2x\cos \alpha } = x . \end{aligned}

By squaring on both sides, we find

\begin{aligned}&2 + 2x^2 - 3x\cos \alpha -\sqrt{3}\,x\sin \alpha \\&\quad +2\sqrt{1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha }\sqrt{1 + x^2 - 2x\cos \alpha } = x^2, \end{aligned}

which we write as

\begin{aligned}&2\sqrt{1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha }\sqrt{1 + x^2 - 2x\cos \alpha }\\&\quad = -2 -x^2 + 3x\cos \alpha +\sqrt{3}\,x\sin \alpha . \end{aligned}

Squaring once more, we find

\begin{aligned}&4\left( 1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha \right) \left( 1 + x^2 - 2x\cos \alpha \right) \\&\quad = \left( -2 -x^2 + 3x\cos \alpha +\sqrt{3}\,x\sin \alpha \right) ^2, \end{aligned}

which is equivalent to

\begin{aligned}&4\left( 1 + x^2 - x\cos \alpha -\sqrt{3}\,x\sin \alpha \right) \left( 1 + x^2 - 2x\cos \alpha \right) \\&\quad - \left( -2 -x^2 + 3x\cos \alpha +\sqrt{3}\,x\sin \alpha \right) ^2 = 0 , \end{aligned}

which can be factored into

\begin{aligned} 3x^2\left( x-\left( \cos \alpha +\frac{1}{\sqrt{3}}\sin \alpha \right) \right) ^2 = 0 . \end{aligned}

Since $$x > 0$$ and

\begin{aligned} f\left( \cos \alpha +\frac{1}{\sqrt{3}}\sin \alpha ,\alpha \right) = 0, \end{aligned}

we have that $$f(x,\alpha ) = 0$$ if and only if $$x = \cos \alpha +\frac{1}{\sqrt{3}}\sin \alpha$$. Therefore, on its domain, f is equal to 0 precisely on the curve $$x = \cos \alpha +\frac{1}{\sqrt{3}}\sin \alpha$$ and nowhere else. Thus, below this curve, f is everywhere positive or everywhere negative. Since $$f\left( \frac{\sqrt{3}}{2},\frac{\pi }{6}\right) = 1-\frac{\sqrt{3}}{2} > 0$$, f is everywhere positive below the curve. Similarly, since $$f(\sqrt{3},0) = \sqrt{4-\sqrt{3}} - 1 > 0$$, f is everywhere positive above the curve. Therefore, $$f(x,\alpha ) \geqslant 0$$ for all $$\sqrt{3}/2\leqslant x \leqslant \sqrt{3}$$ and $$0\leqslant \alpha \leqslant \frac{\pi }{6}$$.

## Rights and permissions

Reprints and Permissions