Skip to main content
QUICK REVIEW

[Paper Review] Efficient Yao Graph Construction

Daniel Funke, Peter Sanders|arXiv (Cornell University)|Jan 1, 2023
Data Management and AlgorithmsComputer Science1 citations
TL;DR

This paper presents the first publicly available implementation of Chang et al.'s optimal O(n log n) algorithm for constructing Yao graphs, using a novel two-part priority queue to efficiently manage static and dynamic events in a sweepline algorithm. The implementation achieves at least a tenfold performance improvement over existing libraries like CGAL, while also introducing a simple, grid-based alternative that outperforms CGAL for medium-sized inputs and is easily parallelizable.

ABSTRACT

Yao graphs are geometric spanners that connect each point of a given point set to its nearest neighbor in each of $k$ cones drawn around it. Yao graphs were introduced to construct minimum spanning trees in $d$ dimensional spaces. Moreover, they are used for instance in topology control in wireless networks. An optimal \Onlogn time algorithm to construct Yao graphs for given point set has been proposed in the literature but -- to the best of our knowledge -- never been implemented. Instead, algorithms with a quadratic complexity are used in popular packages to construct these graphs. In this paper we present the first implementation of the optimal Yao graph algorithm. We develop and tune the data structures required to achieve the O(n log n) bound and detail algorithmic adaptions necessary to take the original algorithm from theory to practice. We propose a priority queue data structure that separates static and dynamic events and might be of independent interest for other sweepline algorithms. Additionally, we propose a new Yao graph algorithm based on a uniform grid data structure that performs well for medium-sized inputs. We evaluate our implementations on a wide variety synthetic and real-world datasets and show that our implementation outperforms current publicly available implementations by at least an order of magnitude.

Motivation & Objective

  • To implement Chang et al.'s theoretically optimal O(n log n) algorithm for Yao graph construction, which had not been previously realized in practice.
  • To bridge the gap between theoretical algorithms and practical performance by designing efficient data structures and algorithmic adaptations for real-world inputs.
  • To evaluate and compare the new implementation against existing libraries, particularly CGAL’s O(n²) cone-based spanner implementation.
  • To develop a complementary grid-based algorithm that is simple, parallelizable, and efficient for medium-sized inputs.
  • To demonstrate that complex geometric algorithms can be optimized for practical performance without sacrificing theoretical bounds.

Proposed method

  • Adapt the sweepline algorithm from computational geometry, using a two-part priority queue that separates static input points from dynamic intersection events to improve efficiency.
  • Design a custom priority queue that optimizes event processing by decoupling static and dynamic events, enhancing performance in geometric sweep-line operations.
  • Implement geometric operations such as cone boundary handling, enclosing region search, and point-in-cone queries with careful numerical robustness considerations.
  • Introduce a uniform grid-based algorithm that pre-maps grid neighborhoods to cones, reducing unnecessary cell visits and enabling efficient, parallelizable construction.
  • Use multiple geometric kernels (inexact, EPIC, EPEC) to evaluate robustness and performance trade-offs under different numerical precision requirements.
  • Conduct extensive experiments on diverse synthetic and real-world datasets to measure scalability, distribution sensitivity, and relative performance against CGAL and naive algorithms.

Experimental results

Research questions

  • RQ1Can Chang et al.'s O(n log n) theoretical algorithm for Yao graph construction be successfully implemented and optimized for practical use?
  • RQ2How does the performance of the new sweepline-based implementation compare to existing O(n²) implementations like CGAL’s cone-based spanners?
  • RQ3What are the performance characteristics and bottlenecks of the optimal algorithm under different input distributions and numerical precision requirements?
  • RQ4Can a simple grid-based alternative achieve competitive performance while being more amenable to parallelization?
  • RQ5To what extent does the choice of geometric kernel affect runtime and correctness, especially near cone boundaries?

Key findings

  • The proposed sweepline-based implementation outperforms CGAL’s O(n²) implementation by at least an order of magnitude across all tested datasets.
  • The algorithm’s runtime is relatively insensitive to input distribution, with only minor variations observed across synthetic and real-world datasets.
  • The number of events processed remains relatively constant across distributions, indicating that the algorithm’s performance is stable and predictable.
  • The grid-based algorithm performs well on medium-sized inputs and is trivially parallelizable over input points, offering a practical alternative for certain workloads.
  • For exact constructions, especially when points lie on cone boundaries, the EPEC kernel is necessary to ensure correctness, though it incurs a 100x performance penalty compared to the inexact kernel.
  • The algorithm’s performance degrades only slightly on inputs with high cone boundary density (e.g., circle distribution), while the grid-based method fails catastrophically on such inputs due to excessive empty cells.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.