{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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: See figures 30-4, 30-5 and 30-6.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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
Ask a homework question - tutors are online