150 likes | 251 Vues
Explore graph theory concepts like vertices, edges, paths, cycles, connected graphs, and trees in CSE 331 lecture. Understand how to represent relationships between entities or elements using graphs, and learn about algorithms for checking connectivity in graphs. Discover the significance of rooted trees and the relationship between vertices and edges. Gain insights into connectivity algorithms and their applications in handling large graphs effectively.
E N D
Lecture 11 CSE 331 Sep 25, 2009
Homeworks Please hand in your HW 2 now HW 3 and graded HW 1 at the end of class
Graphs Representation of relationships between pairs of entities/elements # vertices = n #edges = m Edge Vertex
Paths , Sequence of (distinct) vertices connected by edges Connected Path length 3 , , ,
Connected Graphs Every pair of vertices has a path between them
Cycles Sequence of k vertices connected by edges, first k-1 are distinct , , ,
Tree Connected undirected graph with no cycles
A rooted tree How many rooted trees can an n vertex tree have? AC’s child=SG Pick any vertex as root SG’s parent=AC Let the rest of the tree hang under “gravity”
Rest of Today’s agenda Prove n vertex tree has n-1 edges Algorithms for checking connectivity
What about large graphs? s t Are s and t connected?
Brute-force algorithm? List all possible vertex sequences between s and t 2n such sequences Check if any is a path between s and t