Download presentation
Presentation is loading. Please wait.
1
Lecture 11 CSE 331 Sep 25, 2009
2
Homeworks Please hand in your HW 2 now HW 3 and graded HW 1 at the end of class
3
Graphs Representation of relationships between pairs of entities/elements Vertex Edge # vertices = n #edges = m # vertices = n #edges = m
4
Paths Sequence of (distinct) vertices connected by edges,,, Path length 3, Connected
5
Connected Graphs Every pair of vertices has a path between them
6
Cycles Sequence of k vertices connected by edges, first k-1 are distinct,,,
8
Tree Connected undirected graph with no cycles
9
Rooted Tree
10
A rooted tree Pick any vertex as root Let the rest of the tree hang under “gravity” How many rooted trees can an n vertex tree have? SG’s parent=AC AC’s chil d=S G
11
Rest of Today’s agenda Prove n vertex tree has n-1 edges Algorithms for checking connectivity
12
Checking by inspection
13
What about large graphs? s t Are s and t connected?
14
Brute-force algorithm? List all possible vertex sequences between s and t Check if any is a path between s and t 2 n such sequences
15
Algorithm motivation all
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.