MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

October 24, 20232 min read

Making Dijkstra Faster by Throwing Away PointsMaking Dijkstra Faster by Throwing Away Points

A line simplification step before the search cuts memory use and computation time on resource limited phones.

  • Conference
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01The idea behind the fix
  2. 02What the team found

Open a map app and ask for directions. Behind that tap, an algorithm walks through a graph of roads to find the shortest path. Most of the time it feels instant, but on a cheap phone with a dense route network it can crawl.

The Dijkstra algorithm is the workhorse of routing, and its cost scales with the data it receives. Every extra point on a route line is another node to examine. A bus line that curves through a city can carry hundreds of points that describe the shape of the road rather than a real decision point.

01/02

The idea behind the fix

The team applied the Douglas-Peucker algorithm as a cleaning step before routing. The method walks along a line and removes points that sit close to the straight segment between their neighbours. What remains is a simpler line with the same overall shape. Feed that simpler graph into Dijkstra and there is far less to compute.

A graph structure of the kind routing algorithms traverse. Image: Logan Essex, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 01A graph structure of the kind routing algorithms traverse. Image: Logan Essex, CC BY-SA 4.0, via Wikimedia Commons.

To test the idea, the researchers used public transport routes in Malang City, Indonesia. They measured how long the algorithm took and how much memory it used on an Android device, repeating each measurement many times so that a single slow run could not distort the result.

02/02

What the team found

  • Running line simplification before Dijkstra reduced both the time needed to compute a route and the memory the process consumed.
  • The gain came from the data preparation step, not from a rewrite of the search algorithm itself.
A street in Malang City, the study area. Photo: sugeng widodo, CC BY-SA 3.0, via Wikimedia Commons.
Fig. 02A street in Malang City, the study area. Photo: sugeng widodo, CC BY-SA 3.0, via Wikimedia Commons.

The result matters because the same trade-off shows up everywhere. Routing libraries are tuned for servers with plenty of headroom, while phones have far less. Anything that shrinks the input before the search begins buys performance without touching the parts of the system that already work.

Public transport on a Malang street. Photo: Mujiono Ma'ruf, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 03Public transport on a Malang street. Photo: Mujiono Ma'ruf, CC BY-SA 4.0, via Wikimedia Commons.

Source

  1. Muhammad Yasir Anshari Haq, Riswan Septriayadi Sianturi, and Aryo Pinandito (2023). Enhancing the Efficiency of Navigation Systems: Dijkstra Algorithm Optimization Through Integration of Douglas-Peucker Line Simplification Technique. Proceedings of the 8th International Conference on Sustainable Information Engineering and Technology.

    DOI10.1145/3626641.3626950 (opens in a new tab)

Next articleCutting the Points That Slow Down a Route Finder(Keep scrolling)(Read it next)(Loading)

For anyone building transit or delivery apps, the lesson is cheap to apply. Simplify the line geometry before you search it. The picture on screen stays the same, and the device has less work to do on every single request.