Motorcycle graphs: Stochastic properties motivate an efficient yet simple implementation

  • Authors:
  • Stefan Huber;Martin Held

  • Affiliations:
  • Universität Salzburg, Salzburg, Austria;Universität Salzburg, Salzburg, Austria

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this article, we study stochastic properties of a geometric setting that underpins random motorcycle graphs and use it to motivate a simple but very efficient algorithm for computing motorcycle graphs. An analysis of the mean trace length of n random motorcycles suggests that, on average, a motorcycle crosses only a constant number of cells within a &sqrt; n × &sqrt; n rectangular grid, provided that the motorcycles are distributed sufficiently uniformly over the area covered by the grid. This analysis motivates a simple algorithm for computing motorcycle graphs: We use the standard priority-queue--based algorithm and enhance it with geometric hashing by means of a rectangular grid. If the motorcycles are distributed sufficiently uniformly, then our stochastic analysis predicts an O(n log n) runtime. Indeed, extensive experiments run on 22,000 synthetic and real-world datasets confirm a runtime of less than 10−5 n log n seconds for the vast majority of our datasets on a standard PC. Further experiments with our software, Moca, also confirm the mean trace length and average number of cells crossed by a motorcycle, as predicted by our analysis. This makes Moca the first implementation that is efficient enough to be applied in practice for computing motorcycle graphs of large datasets. Actually, it is easy to extend Moca to make it compute a generalized version of the original motorcycle graph, thus enabling a significantly larger field of applications.