Skip to main contentSkip to Xpert Chatbot

UCSanDiegoX: Graph Algorithms

Learn how to use algorithms to explore graphs, compute shortest distance, min spanning tree, and connected components.

Graph Algorithms
6 weeks
8–10 hours per week
Self-paced
Progress at your own speed
Free
Optional upgrade available

There is one session available:

17,243 already enrolled! After a course session ends, it will be archivedOpens in a new tab.
Starts Nov 22

About this course

Skip About this course

If you have ever used a navigation service to find the 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, water and electricity supply 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, part of the Algorithms and Data Structures MicroMasters program, you will learn what a graph is and its most important properties. You’ll learn several ways to traverse graphs and how you can do useful things while traversing the graph in some order. We will also talk about shortest paths algorithms. 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.

At a glance

  • Language: English
  • Video Transcript: English
  • Associated programs:
  • Associated skills:Graph Algorithms, Connected Components, Spanning Tree Protocols, Algorithms, Computer Networks, Data Structures

What you'll learn

Skip What you'll learn
  • Graph exploration and decomposition into connected components
  • Shortest paths algorithms, including breadth-first search, Dijkstra’s algorithm and Bellman-Ford algorithm
  • Minimum spanning tree algorithms

Modules 1 and 2: Decomposition of 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 hot in Facebook, you're going to work with graphs and algorithms on graphs. In this module, you will learn ways to represent a graph as well as basic algorithms for decomposing graphs into parts. In the programming assignment of this module, you will apply the algorithms that you’ve learned to implement efficient programs for exploring mazes, analyzing Computer Science curriculum, and analyzing road networks. In the first week of the module, we focus on undirected graphs.

Modules 3 and 4: Shortest Paths
In this module you will study algorithms for finding Shortest Paths in Graphs. These algorithms have lots of applications. When you launch a navigation app on your smartphone like Google Maps or Yandex.Navi, it uses these algorithms to find you the fastest route from work to home, from home to school, etc. When you search for airplane tickets, these algorithms are used to find a route with the minimum number of plane changes. Unexpectedly, these algorithms can also be used to determine the optimal way to do currency exchange, sometimes allowing to earn huge profit! We will cover all these applications, and you will learn Breadth-First Search, Dijkstra's Algorithm and Bellman-Ford Algorithm. These algorithms are efficient and lay the foundation for even more efficient algorithms which you will learn and implement in the Shortest Paths Capstone Project to find best routes on real maps of cities and countries, find distances between people in Social Networks. In the end you will be able to find Shortest Paths efficiently in any Graph.

Module 5: Minimum Spanning Trees
In this module, we study the minimum spanning tree problem. We will cover two elegant greedy algorithms for this problem: the first one is due to Kruskal and uses the disjoint sets data structure, the second one is due to Prim and uses the priority queue data structure. In the programming assignment for this module you will be computing an optimal way of building roads between cities and an optimal way of partitioning a given set of objects into clusters (a fundamental problem in data mining).

Module 6: Flows in Networks
Network flows show up in many real-world situations in which a good needs to be transported across a network with limited capacity. You can see it when shipping goods across highways and routing packets across the internet. In this unit, we will discuss the mathematical underpinnings of network flows and some important flow algorithms. We will also give some surprising examples on seemingly unrelated problems that can be solved with our knowledge of network flows.

Learner testimonials

Skip Learner testimonials

“Fantastic course! The course material is neither too difficult nor too easy. The programming task is challenging and I like the way the test cases not shown to us because it pushed me to think of strange or rare cases. I really learned a lot from this course!”
-- Previous Student

Who can take this course?

Unfortunately, learners residing in one or more of the following countries or regions will not be able to register for this course: Iran, Cuba and the Crimea region of Ukraine. While edX has sought licenses from the U.S. Office of Foreign Assets Control (OFAC) to offer our courses to learners in these countries and regions, the licenses we have received are not broad enough to allow us to offer this course in all locations. edX truly regrets that U.S. sanctions prevent us from offering all of our courses to everyone, no matter where they live.

This course is part of Algorithms and Data Structures MicroMasters Program

Learn more 
Expert instruction
8 graduate-level courses
Self-paced
Progress at your own speed
9 months
8 - 10 hours per week

Interested in this course for your business or team?

Train your employees in the most in-demand topics, with edX For Business.