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 (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...
View Full Document