If you have ever used a navigation service to find optimal route and estimate time to destination, you've used algorithms on graphs. Graphs arise in various real-world situations as there are road networks, computer networks and, most recently, social networks! If you're looking for the fastest time to get to work, cheapest way to connect set of computers into a network or efficient algorithm to automatically find communities and opinion leaders in Facebook, you're going to work with graphs and algorithms on graphs.
In this course, you will first learn what a graph is and what are some of the most important properties. Then you'll learn several ways to traverse graphs and how you can do useful things while traversing the graph in some order. We will then talk about shortest paths algorithms — from the basic ones to those which open door for 1000000 times faster algorithms used in Google Maps and other navigational services. You will use these algorithms if you choose to work on our Fast Shortest Routes industrial capstone project. We will finish with minimum spanning trees which are used to plan road, telephone and computer networks and also find applications in clustering and approximate algorithms.

審閱

MM

An awesome overview of the graph algorithms. Some assignments are really challenging, but luckily forums are a great place where people have already faced them. A definitive recommendation!

GS

Dec 03, 2019

Filled StarFilled StarFilled StarFilled StarFilled Star

very well planned course and fairly challenging assignments. Would recommend this to anyone working as developer who does not have formal education in data structures and algorithms.

從本節課中

Advanced Shortest Paths Project (Optional)

In this module, you will learn Advanced Shortest Paths algorithms that work in practice 1000s (up to 25000) of times faster than the classical Dijkstra's algorithm on real-world road networks and social networks graphs. You will work on a Programming Project based on these algorithms. You will find the shortest paths on the real maps of parts of US and the shortest paths connecting people in the social networks. We encourage you not only to use the ideas from this module's lectures in your implementations, but also to come up with your own ideas for speeding up the algorithm! We encourage you to compete on the forums to see whose implementation is the fastest one :)

教學方

Alexander S. Kulikov

Michael Levin

Daniel M Kane

Neil Rhodes

腳本

So now we've proven that theorem. And we can implement the algorithm as follows. We do the alternating turns of forward search and the backwards search until we meet at some point v. And we remember which vertices are processed in forward search and which vertices are processed in the backward search. Then, we take all those vertices which are processed at least in one of them, and for each of those vertices, we minimize the sum of distance estimate of the forward surge plus the distance estimate of the backwards surge. And for the node for which this sum is minimal, we know that there is a shortest path going through this vertex. And its length is equal to the sum of these two distance estimates. And then to reconstruct the path itself, we can reconstruct the shortest path from the source vertex to this middle vertex in the forward search. And separately, we reconstruct the path from this vertex to target vertex t in the backward search. And then just join those two parts into a single shortest path from s to t. I won't show you the psuedocode in the lecture, but you can see it in the slides which are uploaded. So in conclusion, a few remarks. First, the worst-case running time of Bidirectional Dijkstra is the same asymptotically as for the regular Dijkstra algorithm. And we saw that it can differ, for example, twice for route networks, but this is not an asymptotic difference. And speedup in practice depends on the graph, so for the route networks it's roughly 2x speed up. But for social networks, it can be thousands of times faster. From the other hand, the memory consumption is somewhat worse, but again, it is not asymptotically worse. It's just 2x to store two copies of G, the G and the reversed G. And also we'll need to store some auxiliary arrays for forward search and for backwards search, so twice the memory for those also, so roughly 2x memory consumption. And you'll see the actual speedup on social network's graphs in one of the problems of the Programming Assignment of this project.