lec0425-GraphImplementations - Announcements: MP 7...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Announcements: MP 7 available. Due 5/2, 11:59p. Today: Graphs - Weiss, Chapter 9 Implementation Traversal Q: if this graph is simple and connected, how many edges does it have? A: at least ________, at most _________ Graphs: Toward implementation(ADT) Data: Vertices Edges + some structure that reflects the connectivity of the graph X V W Z Y b e d f g h Functions: (merely a smattering) insertVertex(pair keyData) insertEdge(vertex v1, vertex v2, pair keyData) removeEdge(edge e); removeVertex(vertex v); incidentEdges(vertex v); areAdjacent(vertex v1, vertex v2); origin(edge e); destination(edge e); Graphs: Edge List (a first implementation) v u w a c b z d a b c d u v w z Some functions well compare: insertVertex(vertex v) removeVertex(vertex v) areAdjacent(vertex v, vertex u) incidentEdges(vertex v) Graphs: Adjacency Matrix v u w a c b z d a b c d u v w z u v w z u v w z Some functions well compare: insertVertex(vertex v) removeVertex(vertex v) areAdjacent(vertex v, vertex u) incidentEdges(vertex v) Graphs: Adjacency List...
View Full Document

Page1 / 12

lec0425-GraphImplementations - Announcements: MP 7...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online