Download presentation
Presentation is loading. Please wait.
1
Route Optimization Problems and Google Maps
Will Cranford
2
Abstract Abstract: The focus of this presentation is the Shortest Path problem as well as the Travelling Salesman problem. I will consider suitable algorithms to solve these problems, computational limits on these algorithms, and data-driven approaches to solving these problems. Outside applications will also be examined.
3
Importance In 2016, the U.S. spent $1.4 trillion on transportation (7.5% of GDP). Small changes in efficiency make big impact.
4
Theoretical Underpinnings
Edsger Dijkstra created a simple algorithm in 1959 which guarantees an optimal solution to any shortest path problem.
5
Dijkstra’s Algorithm Divide nodes into three sets:
Set 1 contains all nodes for which the minimum path is known. Set 2 contains all nodes which are adjacent to the nodes in set 1 Set 3 contains the remaining nodes.
6
Dijkstra’s Algorithm Steps: Add the starting point to set 1.
A. Consider the node just added to set 1. Remove all nodes from set 3 which are adjacent to the node just added to set 1 and add them to set 2. B. Connecting nodes in set 1 with exactly one node in set 2, find the path of least time from the starting point. Remove the node from set 2 which is the end point of the shortest path, and add it to set 1. C. Go back to step A, unless the destination has been added to set 1, in which case the shortest path has been found.
7
Another Visualization
8
Computers How do you represent a graph on a computer?
One possible solution: Runtime: O(E+V*log(V))
9
Other Algorithms A* algorithm: Uses heuristics to find solution quickly. Bidirectional Search: Works forward from the start and backwards from the end simultaneously.
10
A* Algorithm
11
Stochasticity Lengths between nodes are never certain.
Variance introduced from traffic, road conditions. What is objective: lowest expected value or highest probability of getting to the destination on time? Also have to factor in difficulty of route.
12
Google Maps Data driven approach.
GPS allows Google to track position and velocity of all Google Maps users. Acquisition of Waze in 2013. Machine Learning?
13
Application Solving the Rubik’s cube:
Each state is a node, each rotation is a branch. 18 branches extending from each node (3 rotations per face, 6 faces)
14
Traveling Salesman Problem
What if you want to visit multiple destinations in one trip, and return to your starting point? (Order doesn’t matter)
15
Matrix Representation
# Cities city_names = ["New York", "Los Angeles", "Chicago", "Minneapolis", "Denver", "Dallas", "Seattle", "Boston", "San Francisco", "St. Louis", "Houston", "Phoenix", "Salt Lake City"] # Distance matrix dist_matrix = [ [ 0, 2451, 713, 1018, 1631, 1374, 2408, 213, 2571, 875, 1420, 2145, 1972], # New York [2451, 0, 1745, 1524, 831, 1240, 959, 2596, 403, 1589, 1374, 357, 579], # Los Angeles [ 713, 1745, 0, 355, 920, 803, 1737, 851, 1858, 262, 940, 1453, 1260], # Chicago [1018, 1524, 355, 0, 700, 862, 1395, 1123, 1584, 466, 1056, 1280, 987], # Minneapolis [1631, 831, 920, 700, 0, 663, 1021, 1769, 949, 796, 879, 586, 371], # Denver [1374, 1240, 803, 862, 663, 0, 1681, 1551, 1765, 547, 225, 887, 999], # Dallas [2408, 959, 1737, 1395, 1021, 1681, 0, 2493, 678, 1724, 1891, 1114, 701], # Seattle [ 213, 2596, 851, 1123, 1769, 1551, 2493, 0, 2699, 1038, 1605, 2300, 2099], # Boston [2571, 403, 1858, 1584, 949, 1765, 678, 2699, 0, 1744, 1645, 653, 600], # San Francisco [ 875, 1589, 262, 466, 796, 547, 1724, 1038, 1744, 0, 679, 1272, 1162], # St. Louis [1420, 1374, 940, 1056, 879, 225, 1891, 1605, 1645, 679, 0, 1017, 1200], # Houston [2145, 357, 1453, 1280, 586, 887, 1114, 2300, 653, 1272, 1017, 0, 504], # Phoenix [1972, 579, 1260, 987, 371, 999, 701, 2099, 600, 1162, 1200, 504, 0]] # Salt Lake City
16
Solving the TSP The Travelling Salesman problem is classified as NP-hard. Many algorithms only approximate the optimal path. Record algorithm: found optimal solution for 85,000 nodes
17
Applications of TSP Using a machine to drill holes in a circuit board (need optimal path)
18
Applications of TSP Solution:
19
Applications of TSP 3D printing. Supermarket shopping.
Warehouse product access.
20
Vehicle Routing Problem
A wrinkle to TSP: What if you have multiple vehicles that you can deploy across the country? (Vehicle Routing Problem) Look to minimize the maximum length of the vehicle’s trips.
21
Further Ideas What if you look to minimize cost (labor, gas, tolls, repair) as well as time? How will self-driving cars change things?
22
Recap Examined Dijkstra’s algorithm to solve the Shortest Path problem. Looked at how this algorithm would be transferred to a computer. Examined other algorithms, such as A*. Expanded to the Travelling Salesman problem. Considered applications of the TSP. ANY QUESTIONS?
23
Sources elegant-algorithm-that-makes-google-maps-possible m3.ma.tum.de/foswiki/pub/MN0506/WebHome/dijkstra.pdf
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.