Notes 16 - Week 16: Graphs Chapters 30 and 31. We have...

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

View Full Document Right Arrow Icon
Week 16: Graphs Chapters 30 and 31. We have already studies special cases of graphs: linked lists and trees Definitions : A graph is a collection of vertices and edges that connect the vertices in pairs. Edges with direction are directed ; graphs with direction are digraphs Undirected edges go in both directions. A path is a sequence of edges connecting two vertices A simple path repeats no vertex A cycle is a graph where the first vertex = the last vertex Weights are values on edges (i.e. miles if a map, voltage if a wiring diagram, etc.) Task 1: Do #1 on page 794 and check your answer in the appendix. More definitions : A connected graph has a path from / to every vertex. A complete graph has edges connecting every pair of vertices. (there will be pow(v,2) edges needed) Two vertices are adjacent (neighbors) if they are connected by an edge A tree is a graph with no cycles A forest is a collection of trees. Task 2:
Background image of page 1

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

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

This note was uploaded on 01/23/2012 for the course CS 111C taught by Professor Metzler during the Spring '11 term at City College of San Francisco.

Page1 / 4

Notes 16 - Week 16: Graphs Chapters 30 and 31. We have...

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

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