Lecture 17 CSE 331 Oct 8, 2010. HW 4 due today Q1 and Q2 in one pile Q3 in another pile I will not take any HW after 1:15pm.

Slides:



Advertisements
Similar presentations
What is a graph ? G=(V,E) V = a set of vertices E = a set of edges edge = unordered pair of vertices
Advertisements

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.
Depth-First Search1 Part-H2 Depth-First Search DB A C E.
Graphs CSC 220 Data Structure. Introduction One of the Most versatile data structures like trees. Terminology –Nodes in trees are vertices in graphs.
Graph Algorithms What is a graph? V - vertices E µ V x V - edges directed / undirected Why graphs? Representation: adjacency matrix adjacency lists.
Graph Searching CSE 373 Data Structures Lecture 20.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 4.
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.
Lecture 41 CSE 331 Dec 10, HW 10 due today Q1 in one pile and Q 3+4 in another I will not take any HW after 1:15pm.
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.
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,
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 9 Instructor: Paul Beame.
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.
CS344: Lecture 16 S. Muthu Muthukrishnan. Graph Navigation BFS: DFS: DFS numbering by start time or finish time. –tree, back, forward and cross edges.
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 39 CSE 331 Dec 9, Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday.
Tirgul 7 Review of graphs Graph algorithms: – BFS (next tirgul) – DFS – Properties of DFS – Topological sort.
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.
Spring 2015 Lecture 10: Elementary Graph Algorithms
Graph Introduction, Searching Graph Theory Basics - Anil Kishore.
Runtime O(VE), for +/- edges, Detects existence of neg. loops
1 Chapter 22: Elementary Graph Algorithms II. 2 About this lecture Depth First Search DFS Tree and DFS Forest Properties of DFS Parenthesis theorem (very.
COSC 2007 Data Structures II
Depth-First Search Lecture 21: Graph Traversals
Graphs & Paths Presentation : Part II. Graph representation Given graph G = (V, E). May be either directed or undirected. Two common ways to represent.
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.
Hw. 6: Algorithm for finding strongly connected components. Original digraph as drawn in our book and in class: Preorder label : Postorder label Nodes:
CSC 213 – Large Scale Programming Lecture 31: Graph Traversals.
Nattee Niparnan. Graph  A pair G = (V,E)  V = set of vertices (node)  E = set of edges (pairs of vertices)  V = (1,2,3,4,5,6,7)  E = ((1,2),(2,3),(3,5),(1,4),(4,
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Lecture 16 CSE 331 Oct 5, 2011.
Graph Algorithms BFS, DFS, Dijkstra’s.
Lecture 20 CSE 331 Oct 15, 2010.
Lecture 17 CSE 331 Oct 3, 2014.
CS120 Graphs.
Lecture 15 CSE 331 Oct 5, 2012.
Lecture 15 CSE 331 Sep 29, 2014.
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.
Lecture 13 CSE 331 Sep 27, 2017.
Lecture 13 CSE 331 Sep 24, 2013.
Depth-First Search D B A C E Depth-First Search Depth-First Search
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.
Lecture 31 CSE 331 Nov 12, 2010.
Lecture 11 CSE 331 Sep 23, 2011.
Lecture 15 CSE 331 Oct 3, 2011.
Lecture 11 CSE 331 Sep 19, 2014.
Lecture 24 CSE 331 Oct 24, 2014.
Graph Traversal Lecture 18 CS 2110 — Spring 2019.
Lecture 17 CSE 331 Oct 7, 2011.
Lecture 15 CSE 331 Oct 4, 2010.
Lecture 10 Graph Algorithms
Lecture 13 CSE 331 Sep 28, 2016.
Presentation transcript:

Lecture 17 CSE 331 Oct 8, 2010

HW 4 due today Q1 and Q2 in one pile Q3 in another pile I will not take any HW after 1:15pm

Solutions to HW 4+ graded HW 3 At the end of the lecture

HW 5 Has been posted

Sample mid term Has been posted: a blog post soon Don’t read too much into the content

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)

A theory workshop this weekend

DFS(u) u is explored For every unexplored neighbor v of u DFS(v) A DFS run Every non- tree edge is between a node and its ancestor DFS tree

HW 4 due today Q1 and Q2 in one pile Q3 in another pile I will not take any HW after 1:15pm

Questions?

Connected components are disjoint Either Connected components of s and t are the same or are disjoint Algorithm to compute ALL the connected components? Run BFS on some node s. Then run BFS on t that is not connected to s

Today’s agenda Run-time analysis of BFS (DFS)

Stacks and Queues Last in First out First in First out

But first… How do we represent graphs?

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

m ≤ n(n-1)/2: why?