Live Online training

# Graph Data Structures and Algorithms from Scratch

## What you'll learn-and how you can apply it

By the end of this live online course, you’ll understand:

• The fundamentals of graph theory
• The fundamental data structure underlying graph databases, graph neural networks, and many other topics in data and computer science
• The fundamentals of graph algorithms and how to implement them
• What problems can be solved with graph algorithms

And you’ll be able to:

• Implement data structures to represent graphs
• Implement and use graph algorithms to solve problems
• Visualize important characteristics of graphs
• Translate real-world problems into graph problems
• Use NetworkX proficiently

## This training course is for you because...

• You want to understand how graph algorithms will perform on different graphs.
• You want to develop an intuition for the properties of different graphs.
• You want to become proficient with NetworkX so that you can put graph algorithms into practice.

Prerequisites

• A working knowledge of Python (e.g., stacks and queues)

Recommended follow-up:

• Julian Zucker is a machine learning engineer at Klaviyo, where he uses functional programming concepts to productionize ML models. Previously, he developed an open source time series database at Pivotal and created large-scale data processing systems for analytics at PayPal. He’s published several papers, including one in AAAI about a novel method of resolving ambiguity in orderings of directed graphs. He’s the lead maintainer of an open source library that implements social choice methods, built on top of the NetworkX graph library. ## Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Graph theory (30 minutes)

• Presentation: What’s a graph?—nodes and vertices, edges, edges with weights, directed versus undirected graphs, naming conventions
• Jupyter Notebook exercise: Solve graph theory problems—How many nodes are in some sample graphs?; What’s the shortest path in some sample graphs, both unweighted and weighted?; Which of these graphs are directed, and which undirected?; How many cycles are in these graphs?
• Q&A

Graph data structures (25 minutes)

• Group discussion: The pros and cons of both approaches
• Jupyter Notebook exercise: Write down the adjacency matrix and list for a given graph; implement an adjacency matrix and list
• Q&A

Break (5 minutes)

Graph properties (55 minutes)

• Presentation: Graph properties and their uses
• Group discussion: When might you need to use these properties?
• Jupyter Notebook exercise: Implement code to compute and visualize several properties of graphs
• Q&A

Break (5 minutes)

Graph algorithms: Part 1 (55 minutes)

• Presentation: Search algorithms—motivating problems (trip planning, finding files), breadth-first search (BFS), depth-first search (DFS), modified BFS for weighted graphs
• Discussion: When would you want to choose BFS instead of DFS, or vice versa?
• Q&A

Break (5 minutes)

Graph algorithms: Part 2 (20 minutes)

• Presentation: Pseudocode for generic search algorithm, BFS, and DFS
• Jupyter Notebook exercise: Implement BFS and DFS
• Q&A

Graph extensions and applications (30 minutes)

• Presentation: Hypergraphs; graph databases; graph features for machine learning; call graphs; bipartite graphs; win graphs; and social modeling.

Wrap-up and Q&A (10 minutes)