Working with Graph Algorithms in Python
This course focuses on how to represent a graph using three common classes of graph algorithms - the topological sort to sort vertices by precedence relationships, the shortest path algorithm, and finally the spanning tree algorithms.
What you'll learn
A graph is the underlying data structure behind social networks, maps, routing networks and logistics, and a whole range of applications that you commonly use today. In this course, Working with Graph Algorithms in Python, you'll learn different kinds of graphs, their use cases, and how they're represented in code. First, you'll dive into understanding the pros and cons of adjacency matrices, adjacency lists, adjacency sets, and know when you would choose one data structure over another. Next, you'll explore common graph algorithms, such as the topological sort, used to model dependencies in tasks, build components, and manage projects. Additionally, you'll cover how to find the shortest path in a graph, the core algorithm for mapping technologies. Lastly, you'll be introduced to spanning tree algorithms, which are used to find a path and covers all nodes with minimum cost, the fundamental algorithm behind figuring flight paths, and bus routes. By the end of this course, you'll have a better understanding of these principles and the necessary skills to implement them into simple, easy to follow Python code.
Table of contents
- Version Check 0m
- Prerequisites and Course Overview 3m
- Modeling Relationships Using Graphs 4m
- Directed and Undirected Graphs 2m
- Undirected Graphs, Trees, and Forests 4m
- Directed Graphs and Precedence Relationships 3m
- The Adjacency Matrix 3m
- Demo: Representing a Graph as an Adjacency Matrix 8m
- The Adjacency List and the Adjacency Set 3m
- Demo: Representing a Graph as an Adjacency Set 4m
- Comparing Graph Data Structures 3m
- Breadth-first and Depth-first Graph Traversal 5m
- Demo: Implementing Breadth-first Traversal in Python 3m
- Demo: Implementing Depth-first Traversal in Python 3m
- What Is the Shortest Path Between Two Nodes? 2m
- Unweighted and Weighted Graphs 4m
- Backtracking Using the Distance Table 5m
- Building the Distance Table 5m
- Demo: Implementing the Unweighted Shortest Path Algorithm in Python 6m
- Understanding Dijkstra's Algorithm 3m
- Building the Distance Table in Dijkstra's Algorithm 6m
- Demo: Implementing Dijkstra's Algorithm in Python 7m
- Introducing Spanning Tree Algorithms 2m
- Understanding the Minimum Spanning Tree 3m
- Understanding Prim's Algorithm to Generate a Minimum Spanning Tree 5m
- Demo: Implementing Prim's Algorithm in Python 5m
- Understanding Kruskal's Algorithm to Generate a Minimum Spanning Tree 5m
- Demo: Implementing Kruskal's Algorithm in Python 6m