gr.anim - gr0 GRAPHS Hanan Samet Computer Science...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
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]
Image of page 1

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

View Full Document Right Arrow Icon
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 0 , V 1 , …, V ): path of length n from V 0 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 0 to V 0 (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
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 4
gr4 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
Image of page 5

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

View Full Document Right Arrow Icon
gr4 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 2 r • Free subtree
Image of page 6
gr4 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 2 r • Free subtree 3 z • Given: connected graph G n nodes (5) m edges (8) • Cyclomatic Number
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern