This preview shows page 1. Sign up to view the full content.
Unformatted text preview: distance d. Each vertex v at distance d is adjacent to some vertex w at distance d1. Hence, when expanding from w, we will see v. If v is visited it must have been bound by some other w at distance d1; else it is unvisited. In either case we set vs distance to d Since no vertex at distance d is dequeued until all vertices at distance d1 have been dequeued (by IH&FIFO), all verticeis at distance d will have been enqueued by the time last vertex at distance d1 is processed. Conclude that all verticies at dist d are enqueued before any vertex dist > d. Cost Initial: (n) Loop: (n) for enqueue, dequeue = = (m) Added all together gives us (n+m)...
View
Full
Document
This note was uploaded on 12/05/2011 for the course ENGINEERIN 131 taught by Professor Cytron during the Spring '11 term at Washington University in St. Louis.
 Spring '11
 Cytron
 Computer Science, Algorithms, Data Structures

Click to edit the document details