This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Lecture 16 CSE 331 Oct 5, 2011 Announcement by Sean Online Office hours Tonight 9:3010:30pm On Friday, Oct 7 hoursathon Atri: 2:003:00 (Bell 123) JiunJie: 4:005:00 (Commons 9) Jesse: 5:006:00 (Bell 224) The microphone experiment A mid term tip You’ll reap the benefits of spending a bit of extra time on reading the questions Today’s agenda Quick recap of run time analysis for BFS and DFS Helping you schedule your activities for the day O(m+n) BFS Implementation BFS( s ) CC[s] = T and CC[w] = F for every w≠ s Set i = 0 Set L = {s} While L i is not empty L i+1 = Ø For every u in L i For every edge (u,w) If CC[w] = F then CC[w] = T Add w to L i+1 i++ Array Array Linked List Linked List Input graph as Adjacency list Input graph as Adjacency list Version in KT also computes a BFS tree Version in KT also computes a BFS tree All the layers as one BFS( s ) CC[s] = T and CC[w] = F for every w≠ s Set i = 0 Set L = {s} While L i is not empty L i+1 = Ø For every u in L i For every edge...
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.
 Fall '11
 RUDRA

Click to edit the document details