19-GraphsII - 6/15/2011 Graph Definitions CS/ENGRD 2110...

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

View Full Document Right Arrow Icon
6/15/2011 1 CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2011 Thorsten Joachims Lecture 19: Shortest Paths Graph Definitions A directed graph (or digraph ) is a pair (V, E) where V is a set E is a set of ordered pairs (u,v) where u,v in V Usually require u v (i.e., no self-loops) An element of V is called a vertex (pl. vertices ) or node An element of E is called an edge or arc |V| = size of V, often denoted n |E| = size of E, often denoted m 2 b a c d e f Some Graph Terminology Vertices u and v are called the source and sink of the directed edge (u,v), respectively Vertices u and v are called the endpoints of (u,v) Two vertices are adjacent if they are connected by an edge The outdegree of a vertex u in a directed graph is the number of edges for which u is the source The indegree of a vertex v in a directed graph is the number of edges for which v is the sink The degree of a vertex u in an undirected graph is
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.

Page1 / 2

19-GraphsII - 6/15/2011 Graph Definitions CS/ENGRD 2110...

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