This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 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 (nonlinear). We next consider a more general nonlinear 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...
View
Full
Document
This note was uploaded on 09/25/2011 for the course COMP 250 taught by Professor Blanchette during the Spring '08 term at McGill.
 Spring '08
 BLANCHETTE
 Computer Science, Data Structures

Click to edit the document details