Activity 01
Pairs Coding: Build Adjacency Representations
Pairs draw a sample graph of 6 nodes, then code both adjacency matrix and list versions in Python. They add edges, print structures, and compare space usage by counting non-zero entries. Discuss trade-offs based on graph density.
Compare adjacency matrix and adjacency list representations for graphs.
Facilitation TipDuring Pairs Coding, start with small undirected graphs so students see symmetry in adjacency matrices without getting overwhelmed by direction.
What to look forPresent students with a small graph drawn on the board. Ask them to identify whether an adjacency matrix or an adjacency list would be more memory efficient for this specific graph and to justify their choice in one sentence.