CSE331 Lecture 12

CSE331 Lecture 12 - L j all nodes at distance j from s L j all nodes at distance j from s Exercise for you Prove that L j has all nodes at distance

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

View Full Document Right Arrow Icon
Lecture 12 CSE 331 Sep 26, 2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
Reminders HW 1 ready for pickup MID TERM IN 2 WEEKS (in class)
Background image of page 2
Determining connectivity in graphs s t Are s and t connected? http://www.cise.ufl.edu/research/sparse/matrices/Nasa/barth5.html
Background image of page 3

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

View Full DocumentRight Arrow Icon
Brute-force algorithm List all possible distinct vertex sequences between s and t Check if any is a path between s and t n! such sequences n! such sequences
Background image of page 4
Algorithm motivation al l al l
Background image of page 5

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

View Full DocumentRight Arrow Icon
Distance between u and v Length of the shortest length path between u and v Distance between RM and BO? 1
Background image of page 6
Questions?
Background image of page 7

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

View Full DocumentRight Arrow Icon
Breadth First Search (BFS) Is s connected to t ? Build layers of vertices connected to s L 0 = {s} Assume L 0 ,..,L j have been constructed L j+1 set of vertices not chosen yet but are connected to L j Stop when new layer is empty
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: L j : all nodes at distance j from s L j : all nodes at distance j from s Exercise for you Prove that L j has all nodes at distance j from s BFS Tree BFS naturally defines a tree rooted at s L j forms the j th “level” in the tree u in L j+1 is child of v in L j from which it was “discovered” 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1 1 2 2 3 3 L L 1 4 4 5 5 7 7 8 8 L 2 6 6 L 3 Add non-tree edges Add non-tree edges Connected Component Connected component (of s ) is the set of all nodes connected to s Algo to compute the connected component of s ? Today’s agenda Every edge in is between consecutive layers Computing Connected component...
View Full Document

This note was uploaded on 12/11/2011 for the course CSE 331 taught by Professor Rudra during the Fall '11 term at SUNY Buffalo.

Page1 / 13

CSE331 Lecture 12 - L j all nodes at distance j from s L j all nodes at distance j from s Exercise for you Prove that L j has all nodes at distance

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

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