Lecture 18 CSE 331 Oct 11, 2010. Mid term Next Monday in class.

Slides:



Advertisements
Similar presentations
Graphs CSE 331 Section 2 James Daly. Reminders Homework 4 is out Due Thursday in class Project 3 is out Covers graphs (discussed today and Thursday) Due.
Advertisements

Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u
Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u
Graph Search Methods Spring 2007 CSE, POSTECH. Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u. A search method.
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 11 / 11 / Veterans Day Instructor: Michael Eckmann.
Lecture 38 CSE 331 Dec 7, The last few days Today: Solutions to HW 9 (end of lecture) Wednesday: Graded HW 9 (?), Sample final, Blog post on the.
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 40 CSE 331 Dec 8, Finals 3:35-6:05pm KNOX 104 Tue, Dec 14 Blog post on the finals up.
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.
Graph & BFS Lecture 22 COMP171 Fall Graph & BFS / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D.
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,
Lecture 39 CSE 331 Dec 6, On Friday, Dec 10 hours-a-thon Atri: 2:00-3:30 (Bell 123) Jeff: 4:00-5:00 (Bell 224) Alex: 5:00-6:30 (Bell 242)
Lecture 15 CSE 331 Oct 7, Mid-term stuff Chapters 1-3 in [KT] Sample mid-term (and graded HW3) at the END of class The web version has the correct.
Lecture 14 CSE 331 Oct 5, Extra lectures on proofs Tuesday 5-6pm (Jeff) Wednesday 4:30-6pm (Atri) Commons 9 Prefer my name to Professor/Dr. Rudra.
Lecture 17 CSE 331 Oct 8, HW 4 due today Q1 and Q2 in one pile Q3 in another pile I will not take any HW after 1:15pm.
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.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
CISC220 Fall 2009 James Atlas Nov 13: Graphs, Line Intersections.
Lecture 39 CSE 331 Dec 9, Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday.
Lecture 13 CSE 331 Oct 2, Announcements Mid term in < 2 weeks Graded HW2 at the END of the class.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
Lecture 18 CSE 331 Oct 12, HW 5 due today Q1, Q2 and Q3 in different piles I will not take any HW after 1:15pm.
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.
Graph Representations And Traversals. Graphs Graph : – Set of Vertices (Nodes) – Set of Edges connecting vertices (u, v) : edge connecting Origin: u Destination:
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
Graph Theory Def: A graph is a set of vertices and edges G={V,E} Ex. V = {a,b,c,d,e} E = {ab,bd,ad,ed,ce,cd} Note: above is a purely mathematical definition.
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Code: BCA302 Data Structures with C Prof. (Dr.) Monalisa Banerjee By.
Lecture 16 CSE 331 Oct 5, 2011.
CSE 373 Topological Sort Graph Traversals
Lecture 11 Graph Algorithms
Graph Algorithms BFS, DFS, Dijkstra’s.
Lecture 20 CSE 331 Oct 15, 2010.
Lecture 15 CSE 331 Oct 3, 2016.
Lecture 15 CSE 331 Oct 5, 2012.
Lecture 15 CSE 331 Sep 29, 2014.
Lecture 15 CSE 331 Oct 3, 2016.
Lecture 14 CSE 331 Sep 30, 2016.
Lecture 12 CSE 331 Sep 26, 2016.
Lecture 12 CSE 331 Sep 25, 2017.
Lecture 14 CSE 331 Sep 30, 2011.
Lecture 17 CSE 331 Oct 10, 2012.
Lecture 13 CSE 331 Oct 1, 2012.
Chapter 22: Elementary Graph Algorithms I
Yan Shi CS/SE 2630 Lecture Notes
Lecture 13 CSE 331 Sep 27, 2017.
Algorithms Lecture # 30 Dr. Sohail Aslam.
Lecture 19 CSE 331 Oct 13, 2010.
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 16 CSE 331 Oct 8, 2012.
Lecture 16 CSE 331 Oct 2, 2013.
Algorithms Lecture # 29 Dr. Sohail Aslam.
Lecture 15 CSE 331 Oct 3, 2011.
Lecture 11 CSE 331 Sep 19, 2014.
Lecture 11 CSE 331 Sep 21, 2017.
Lecture 12 CSE 331 Sep 22, 2014.
Graph Implementation.
Graphs G = (V, E) V are the vertices; E are the edges.
Graph Traversal Lecture 18 CS 2110 — Spring 2019.
Lecture 17 CSE 331 Oct 7, 2011.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Lecture 11 CSE 331 Sep 22, 2016.
Lecture 15 CSE 331 Oct 4, 2010.
Lecture 10 Graph Algorithms
Lecture 13 CSE 331 Sep 28, 2016.
Presentation transcript:

Lecture 18 CSE 331 Oct 11, 2010

Mid term Next Monday in class

Mid term entry Has been posted on the blog Don’t read too much into the content of the sample mid-term

On Friday, Oct 15 hours-a-thon Atri: 2:00-3:30 (Bell 123) Jeff: 3:30-5:00 (Commons 9) Alex: 5:00-6:30 (Bell 224)

Feedback forms Am still going through them Images are more confusing then exact definitions Lectures are vague (not precise/well planned)

Graph representations Adjacency matrix Adjacency List (u,v) in E? O(1)O(n) [ O(n v ) ] All neighbors of u? O(n)O(n u ) Space?O(n 2 )O(m+n) Better for sparse graphs and traversals

2 # edges = sum of # neighbors 2m = Σ u in V n u Give 2 pennies to each edge u v Rest of the graph n u =4 n v =3 Total # of pennies = 2m Each edges gives one penny to its end points # of pennies u receives = n u

Questions?

Today’s agenda Run-time analysis of BFS

Breadth First Search (BFS) 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