Question

For the following graph, give the result of any one breadth-first traversal beginning at A, where the label of a vertex is pr

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In breadth first search, first visit all adjacent vertices of A.

If adjacent of A is traversed in order B and then D. Then first adjacent of D will be visited and then adjacent of D. Then adjacent of B's adjacent will be first visited and then adjacent of D's adjacent. This is how BFS(Breadth First Search) traversal is done.

BFS traversal is performed using Queue. First enqueue A and it's adjacent. Dequeuing of a vertex is done only when all it's adjacent vertex is done. A dequeue operation means that vertex is visited.

One of the possible BFS traversal is :

A B D C E F

Another possible BFS traversal is :

A D B C E F

If you have any questions comment down and please? upvote thanks...

Add a comment
Know the answer?
Add Answer to:
For the following graph, give the result of any one breadth-first traversal beginning at A, where...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT