Question

6) Below is an adjacency matrix for an undirected graph, size n- 8. Vertices are labeled 1 to 8 Rows are labeled 1 through 8,

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

Firstly we create graph and then using Breadth first search algorithm we find parent of each node ant its distance from source node.

In Breadth First Search we add only those neighbours of the dequeued node that are not already been dequeued and not present currently in the queue.

ux MI o 1 1 o 1 means eie Theze 2. 1

6b)

an andl add nelghbours 3 and add Again d ne

一Similar! eand add its meiyhess to here an mo al사

6 3 5 1 2. 2

Hope this helps
If you have any doubt feel free to comment
Thank You!!

Add a comment
Know the answer?
Add Answer to:
6) Below is an adjacency matrix for an undirected graph, size n- 8. Vertices are labeled...
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