A Bit About Dijkstra’s

A Bit of Mathematics

Note that a min-priority queue uses a non-decreasing list of numbers to prioritize vertices. That is, if two vertices have same key, then one of them is chosen at random. In other words, the algorithm depends entirely on the ordering of integers, about which we study in Lattice theory (does words like poset/toset ring a bell?).

Try running the algorithm on the following graph:

Note that it is similar to G we used in sample execution; but w(s,t) = 5.

After Round 1 of Loop execution, which vertex will you choose next? Run it choosing y first and then t. Do we get the correct result?

Pages: Contents<< Previous 12 Next Page>>

Advertisement

One Comment Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.