{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 17

# Lecture 17 - Lecture 17 Graphs and Unweighted Shortest...

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

Lecture 17: Graphs and Unweighted Shortest Paths

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

View Full Document
Graph Graphs in computer science are not like the graphs you draw in physics lab. Mathematically, a graph consists of a set V of vertices , and a set E of edges . An edge of the graph is a pair (v,w), where v and w are vertices in V. Vertices are also often called nodes . It’s often convenient to draw a picture of a graph (see next slide).
Graph Example 1 3 2 4 Undirected graph with 4 vertices and 4 edges (1,3) and (3,1) designate the same edge

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

View Full Document
Many applications Communications: Nodes : computers Edges: direct connections between computers Transportation: Nodes: cities Edges: roads, air routes, train tracks, etc. Social Nodes: people Edges: friendships, common interests, etc.
The same graph can be drawn many different ways 1 3 2 4 4 2 1 3

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

View Full Document
Directed Graph Example 1 3 2 4 Each edge has a direction, shown by an arrow Edge (v,w) goes FROM vertex v, TO vertex w v w v w
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 13

Lecture 17 - Lecture 17 Graphs and Unweighted Shortest...

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

View Full Document
Ask a homework question - tutors are online