Lecture 27
Learning objectives
After this class, you should be able to:
- Define a graph (undirected and directed), a vertex/node, and an edge.
- Given the figure of a graph, give its set of vertices and set of edges.
- Given the set of vertices and set of edges of a graph, draw a figure to show the graph.
- Given a graph, show its representations using an adjacency list, and adjacency matrix, and an incidence matrix. Also give the space required for each of those representations.
- Given a graph, show the order in which which nodes are visited in the following traversals: (i) depth first search and (ii) breadth first search. Also give the time complexities for the traversals.
Reading assignment
- Chapter 8, up to (and including) section 8.2, class notes.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Give the set of vertices and edges for
graph 2
shown in class.
- Give the adjacency list, adjacency matrix, and incidence matrix representations for
graph 1
shown in class.
- Show the orders in which nodes are visited in (i) depth first and (ii) breadth first traversals of
graph 1
. When multiple neighbors of a node may be traversed, choose the smaller-numbered neighbor first.
- Questions on next lecture's material
- None. Start preparing for the final exam.
Last modified: 30 Nov 2004