lecture27

lecture27 - COMP 250 Winter 2010 27 - graphs 1: definitions...

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

View Full Document Right Arrow Icon

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

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

This note was uploaded on 09/25/2011 for the course COMP 250 taught by Professor Blanchette during the Spring '08 term at McGill.

Page1 / 2

lecture27 - COMP 250 Winter 2010 27 - graphs 1: definitions...

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