gr.anim - gr0 Copyright © 1997 Hanan Samet These notes may...

Info iconThis preview shows pages 1–8. 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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight 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: gr0 Copyright © 1997 Hanan Samet These notes may not be reproduced by any means (mechanical or elec- tronic or any other) without the express written permission of Hanan Samet GRAPHS Hanan Samet Computer Science Department and Center for Automation Research and Institute for Advanced Computer Studies University of Maryland College Park, Maryland 20742 e-mail: [email protected] gr1 GRAPH (G) • Generalization of a tree 1. no longer a distinguished node called the root • implies no need to distinguish between leaf and nonleaf nodes 2. two nodes can be linked by more than one sequence of edges • Formally: set of vertices (V) and edges (E) joining them, with at most one edge joining any pair of vertices • (V , V 1 , …, V ): path of length n from V to V (chain) • Simple Path: distinct vertices (elementary chain) • Connected: path between any two vertices of G • Cycle: simple path of length ≥ 3 from V to V (length in terms of edges) • Planar: curves intersect only at points of graph • Degree: number of edges intersecting at the node • Isomorphic: if there is a one-to-one correspondence between nodes and edges of two graphs A B C D E A B C D n n Copyright © 1998 by Hanan Samet gr2 SAMPLE GRAPH PROBLEM • Given n people at a party who shake hands, show that at the party’s end, an even number of people have shaken hands with an odd number of people • Theorem: For any graph G an even number of nodes have an odd degree • Proof: 1. each edge joins 2 nodes 2. each edge contributes 2 to the sum of degrees 3. sum of degrees is even 4. thus an even number of nodes with odd degree Copyright © 1998 by Hanan Samet gr3 FREE TREES • Connected graph with no cycles • Given G as a free tree with n vertices 1. Connected, but not so if any edge is removed 2. One simple path from V to V´ ( V ≠ V´ ) 3. No cycles and n – 1 edges 4. G is connected with n – 1 edges • Differences from regular trees: 1. No identification of root 2. No distinction between terminal and branch nodes A B C D E F G Copyright © 1998 by Hanan Samet gr4 8 1 b FREE SUBTREES • Definition: set of edges such that all the vertices of the graph are connected to form a free tree • Ex: distribution of telephone networks London C pl C lr C ln Paris C pr Rio de Janeiro C nr New York C pb C br C bn Buenos Aires Copyright © 1998 by Hanan Samet gr4 8 1 b FREE SUBTREES • Definition: set of edges such that all the vertices of the graph are connected to form a free tree • Ex: distribution of telephone networks London C pl C lr C ln Paris C pr Rio de Janeiro C nr New York C pb C br C bn Buenos Aires Copyright © 1998 by Hanan Samet gr4 2 r • Free subtree Copyright © 1998 by Hanan Samet gr4 8 1 b FREE SUBTREES • Definition: set of edges such that all the vertices of the graph are connected to form a free tree • Ex: distribution of telephone networks London C pl C lr C ln Paris C pr Rio de Janeiro C nr New York C pb C br C bn Buenos Aires Copyright © 1998 by Hanan Samet...
View Full Document

This note was uploaded on 01/13/2012 for the course CMSC 420 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 30

gr.anim - gr0 Copyright © 1997 Hanan Samet These notes may...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online