Week 08 - November 04¶
Class Description¶
This week we tackle graph theory and algorithms. Graphs model relationships in everything from social networks to road systems to computer networks. You'll learn to implement classic algorithms (BFS, DFS, Dijkstra's shortest path) and work with real-world datasets.
Key Connection: Graph theory provides algorithms → OOP provides implementations → Stacks/Queues power the algorithms → File I/O enables working with real data.
Key Learning Objectives:
- Understand graph representations (adjacency lists, adjacency matrices, edge lists)
- Design object-oriented graph systems with Graph, Node, and Edge classes
- Implement breadth-first search (BFS) using queues
- Implement depth-first search (DFS) using stacks
- Apply Dijkstra's algorithm for shortest paths
- Load graphs from CSV and JSON files
- Work with real-world graph datasets
Before Class¶
Videos to Watch Before Class¶
CS 5002 - Module 9: Graphs¶
Review: CS 5001 - File I/O (if needed)¶
- Lesson 7.6: Files as an Example [13:18]
- Lesson 7.7: Collecting Data [14:45]
Review: CS 5001 - Stacks and Queues (if needed)¶
- Lesson 11.5: Python's Built-In Support for Stacks [4:38]
- Lesson 11.10: Python's Built-In Support for Queues [8:11]
Additional Resources (To Be Added)¶
- Graph File Formats: Edge lists (CSV), adjacency lists (JSON), loading and validating graph data