{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture27

# lecture27 - COMP 250 Winter 2010 27 graphs 1 denitions...

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

COMP 250 Winter 2010 27 - graphs 1: definitions March 19, 2010 Graphs You are familiar with data structures such as arrays and lists (linear), and trees (non-linear). We next consider a more general non-linear data structure, known as graphs. Like the previous data structures, a graph is a set of nodes V , each node having references to other nodes. In the case of graphs, a reference from one node to another is called an edge. The set of edges is denoted E , and so the graph may be written as a pair G = ( V,E ). In a (rooted) tree, we saw that the references were either to a child or parent node. In a general graph, there is no notion of child and parent. Every node can potentially reference every other node. Examples of graphs include transportation networks. For example, V V might be a set of airports and E might be direct flights between airports. In computer system, V might be a set of computers and E might be a direct communication link between them. Or V might be a set of html documents on a web site and E might be defined by URLs (links) between documents.

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 / 2

lecture27 - COMP 250 Winter 2010 27 graphs 1 denitions...

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

View Full Document
Ask a homework question - tutors are online