CSE 2321 Lecture 34: Lecture 34

4 views5 pages
Hedge 34
Breadth First Search BFS
BFS Intuition Explore outward from source
vertex sof agraph Ga Cr Ein all
possible directions adding vertices one
layer dlevel at atime
EFIFE
BFS is used for both detected undirected
graphs
BFS AlgorithmOutline
Lo s
Lall neighbors of Lo
be all veshues that do not belong to Lo
og Lin and that have an edge to a
vertex in L
Lit All vertices that do not belong
to an earlier layer and that have an
edge to avertex in Li
Note
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in
Ex use BFS to determine the smallest
of layers or hops bwthe vertices
starting from vertex s
AI7
undirected
23
I
458
I
6
Solution seoLo
i23L
M
2425 27fLz
z19
613
r
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.