the last agentin erizo the cheapest path from ajo to any town you know about that doesn' have an agent is now $ to erizovia danza and colina you dispatch an agent to erizobut she reports that there are no routes from erizo to towns without agents (there' route to bordobut bordo has an agent table shows the final line in your notebookall you've done is add star to the erizo entry to show there' an agent there table step agents in ajobordodanzacolinaand erizo from ajo to bordo colina danza erizo step (via ajoinf (via ajoinf step (via ajo) (via bordo (via ajoinf step (via ajo) (via danza (via ajo) (via danzastep (via ajo) (via danza) (via ajo) (via colinastep (via ajo) (via danza) (via ajo) (via colina)when there' an agent in every townyou know the fares from ajo to every other town so you're done with no further calculationsthe last line in your notebook shows the cheapest routes from ajo to all other towns this narrative has demonstrated the essentials of dijkstra' algorithm the key points are each time you send an agent to new townyou use the new information provided by that agent to revise your list of fares only the cheapest fare (that you know aboutfrom the starting point to given town is retained you always send the new agent to the town that has the cheapest path from the starting point (not the cheapest edge from any town with an agentas in the minimum