Lecture 13 CSE 331 Oct 1, 2012.

Slides:



Advertisements
Similar presentations
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
Advertisements

Lecture 13 CSE 331 Oct 2, Announcements Please turn in your HW 3 Graded HW2, solutions to HW 3, HW 4 at the END of the class Maybe extra lectures.
Lecture 16 CSE 331 Oct 9, Announcements Hand in your HW4 Solutions to HW4 next week Remember next week I will not be here so.
Lecture 12 CSE 331 Sep 30, Announcements Final exam: Dec 16, 11:45am-2:45pm, NSC 210 HW 2 solutions at the end of the lecture Mid term: Oct 16,
Breadth First Search (BFS) Part 2 COMP171. Graph / Slide 2 Shortest Path Recording * BFS we saw only tells us whether a path exists from source s, to.
CISC220 Fall 2009 James Atlas Nov 13: Graphs, Line Intersections.
Lecture 18 CSE 331 Oct 11, Mid term Next Monday in class.
Lecture 13 CSE 331 Oct 2, Announcements Mid term in < 2 weeks Graded HW2 at the END of the class.
Lecture 11 CSE 331 Sep 25, Homeworks Please hand in your HW 2 now HW 3 and graded HW 1 at the end of class.
Lecture 23 CSE 331 Oct 24, Reminder 2 points for Piazza participation 3 points for mini-project.
Lecture 5 CSE 331. Graphs Problem Statement Algorithm Problem Definition “Implementation” Analysis A generic tool to abstract out problems.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
Lecture 12 CSE 331 Sep 28, Upcoming Important Dates Tuesday Oct 8 (~1.5 weeks) Mini Project group compositions Monday Oct 12 (2 weeks) Quiz 1 Monday.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Graph Algorithms BFS, DFS, Dijkstra’s.
CSE 2331/5331 Topic 9: Basic Graph Alg.
Lecture 12 Graph Algorithms
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Lecture 23 CSE 331 Oct 26, 2016.
Unweighted Shortest Path Neil Tang 3/11/2010
CS120 Graphs.
Lecture 10 CSE 331 Sep 21, 2016.
Lecture 10 CSE 331 Sep 20, 2017.
Lecture 15 CSE 331 Oct 5, 2012.
Lecture 15 CSE 331 Sep 29, 2014.
CSE 421: Introduction to Algorithms
Lecture 21 CSE 331 Oct 21, 2016.
Lecture 21 CSE 331 Oct 20, 2017.
Lecture 14 CSE 331 Sep 30, 2016.
Lecture 13 CSE 331 Sep 29, 2010.
Lecture 12 CSE 331 Sep 26, 2016.
Lecture 12 CSE 331 Sep 25, 2017.
Lecture 14 CSE 331 Sep 30, 2011.
Lecture 24 CSE 331 Oct 25, 2013.
Lectures on Graph Algorithms: searching, testing and sorting
Elementary Graph Algorithms
Lecture 22 CSE 331 Oct 23, 2017.
Lecture 23 CSE 331 Oct 25, 2017.
Lecture 24 CSE 331 Oct 29, 2012.
Lecture 23 CSE 331 Oct 24, 2011.
Lecture 22 CSE 331 Oct 24, 2016.
Lecture 13 CSE 331 Sep 27, 2017.
CSE 421: Introduction to Algorithms
Lecture 13 CSE 331 Sep 24, 2013.
Richard Anderson Autumn 2016 Lecture 5
Lecture 14 CSE 331 Oct 3, 2012.
Lecture 12 CSE 331 Sep 28, 2012.
Lecture 12 CSE 331 Sep 26, 2011.
Lecture 14 CSE 331 Sep 29, 2017.
Lecture 22 CSE 331 Oct 15, 2014.
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
Lecture 11 CSE 331 Sep 23, 2011.
Algorithms Lecture # 29 Dr. Sohail Aslam.
Lecture 15 CSE 331 Oct 3, 2011.
Lecture 11 CSE 331 Sep 19, 2014.
Lecture 24 CSE 331 Oct 24, 2014.
Lecture 11 CSE 331 Sep 21, 2017.
Lecture 12 CSE 331 Sep 22, 2014.
Lecture 23 CSE 331 Oct 24, 2011.
Lecture 26 CSE 331 Nov 1, 2010.
CSE 417: Algorithms and Computational Complexity
Lecture 11 CSE 331 Sep 22, 2016.
Applications of BFS CSE 2011 Winter /17/2019 7:03 AM.
Richard Anderson Winter 2019 Lecture 6
Lecture 15 CSE 331 Oct 4, 2010.
Lecture 11 Graph Algorithms
Lecture 13 CSE 331 Sep 28, 2016.
Richard Anderson Autumn 2015 Lecture 6
Lecture 24 CSE 331 Oct 29, 2018.
Presentation transcript:

Lecture 13 CSE 331 Oct 1, 2012

Reminders HW 2 ready for pickup MID TERM IN 2.5 WEEKS (in class)

Determining connectivity in graphs http://www.cise.ufl.edu/research/sparse/matrices/Nasa/barth5.html s t Are s and t connected?

Brute-force algorithm List all possible distinct vertex sequences between s and t n! such sequences Check if any is a path between s and t

Algorithm motivation all

Distance between u and v Length of the shortest length path between u and v Distance between RM and BO? 1

Questions?

Breadth First Search (BFS) Which vertices is s connected to? Build layers of vertices connected to s Lj : all nodes at distance j from s L0 = {s} Assume L0,..,Lj have been constructed Lj+1 set of vertices not chosen yet but are connected to Lj Stop when new layer is empty

Exercise for you Prove that Lj has all nodes at distance j from s

BFS Tree BFS naturally defines a tree rooted at s Add non-tree edges Lj forms the jth “level” in the tree u in Lj+1 is child of v in Lj from which it was “discovered” 1 7 1 L0 2 3 L1 2 3 8 4 5 4 5 7 8 L2 6 6 L3

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