For more than half a century, researchers around the world have struggled with an algorithmic problem known as the “single source shortest path problem”. Essentially, the problem is to develop a mathematical recipe that best finds the shortest route between a node and all other nodes in a network where there may be links with negative weights.
Sound complicated? Possibly. In fact, however, this type of calculation is already used in a variety of apps and technologies that we rely on to find our way around – for example when Google Maps guides us through landscapes and through cities.
Now researchers at the Institute of Computer Science at the University of Copenhagen have managed to solve this problem the shortest path problem from one sourcea mystery that has baffled researchers and experts for decades.
“We discovered an algorithm that solves the problem in almost linear time in the fastest possible way. It is a fundamental algorithmic problem that has been studied and taught around the world since the 1950s. This was one of the reasons that prompted us to find a solution,” explains associate professor Christian Wulff-Nilsen, who obviously finds it difficult to leave an unsolved algorithmic problem alone.
Faster calculations for electric car routing
Last year, Wulff-Nilsen made another breakthrough in the same area, resulting in a result on how to find the shortest path in a network that changes over time. His solution to the latest mystery builds on this work.
The researcher believes that solving the single-source shortest-path problem could pave the way for algorithms that not only help electric cars calculate the fastest route from A to B on the fly, but do it in the most energy-efficient way .
“We add a dimension that previous algorithms don’t have. This dimension lets us look at what we call negative weights. A practical example of this can be the hills in a road network, which is good to know you have an electric car charging downhill,” explains Wulff-Nilsen.
Facts about the single source shortest path problem
- The goal of the shortest route from a source The problem is finding the shortest paths from a given starting node to all other nodes in a network.
- The network is represented as a graph made up of nodes and connections between them, called edges.
- Each edge has a direction (this can be used to represent one-way streets, for example) and a weight that expresses how expensive it is to drive along that edge. If all edge weights are non-negative, the problem can be solved in almost linear time using a classical Dijkstra algorithm.
- The new result solves the problem in almost the same time as Dijkstra’s algorithm, but also allows negative edge weights.
“In principle, the algorithm could be used to alert actors such as central banks when speculators speculate on buying and selling different currencies. Much of this is now done with computers. But because our algorithm is so fast, it could perhaps be used to detect loopholes before they are exploited,” says Christian Wulff-Nilsen.
The researcher emphasizes that there are already systems for calculating currencies and routes for electric cars. But solving the single source shortest path problem has allowed the researchers to create an excellent algorithm that is almost unbeatable in terms of speed. At the same time, its simplicity makes it easy to adapt to the various needs of society.
Honored in the US
Work on solving the problem did not go unnoticed. In fact, Christian Wulff-Nilsen and his colleagues have already been contacted by people around the world to congratulate them and learn more about how they made it.
At the same time, the research article detailing their discovery won a Best Paper Award at the FOCS (Foundation of Computer Science) conference in Denver, Colorado. Alongside STOC, it is the most renowned conference in theoretical computer science. The FOCS conference took place from October 31 to November 3, 2022.
“People from all over the world attend this conference to see how the best results are presented,” says Christian Wulff-Nilsen.
The research was carried out in collaboration between Christian Wulff-Nilsen from the Department of Computer Science, Danupon Nanongkai from the Max Planck Institute and their American colleague Aaron Bernstein from Rutgers University.