Question

What's the topological ordering of the following, and please explain. A graph with n vertices labeled...

What's the topological ordering of the following, and please explain.

A graph with n vertices labeled 0, 1, 2, ..., n-1where each of the vertices from 1 to n-1 has a single outgoing edge that points to vertex 0.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
The vertex which has no incoming edges is the one which comes first.

Vertices from 1, 2, ..., n-1 has no incoming edges.
And vertex 0 has incoming edges from 1, 2, ..., n-1

So, We have to visit all 1, 2, ..., n-1 to visit 0 in the topological order.

The topological ordering is
1, 2, ..., n-1, 0
Add a comment
Know the answer?
Add Answer to:
What's the topological ordering of the following, and please explain. A graph with n vertices 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