Lecture 17

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

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

View Full Document Right Arrow Icon
Lecture 17: Graphs and Unweighted Shortest Paths
Background image of page 1

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

View Full DocumentRight Arrow Icon
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).
Background image of page 2
Graph Example 1 3 2 4 Undirected graph with 4 vertices and 4 edges (1,3) and (3,1) designate the same edge
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
The same graph can be drawn many different ways 1 3 2 4 4 2 1 3
Background image of page 5

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

View Full DocumentRight Arrow Icon
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
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/09/2009 for the course CS 2134 taught by Professor Hellerstein during the Spring '07 term at NYU Poly.

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