Consider the Philadelphia as the starting node. As this node is connected with only one node Pittsburgh with a distance of 320. So, a connection should be made between both nodes. Set S will have { Philadelphia, Pittsburgh } and Set V-S will have { Toledo, Detroit, Ann Arbor, Chicago, Ft. Wayne, Indianapolis, Cleveland, Columbus }. This can be shown as:
Now ,select the smallest distance edge form seleced nodes. At this stage set S will have { Philadelphia, Pittsburgh, Cleveland } and Set V-S will have {Toledo, Detroit, Ann Arbor, Chicago, Ft. Wayne, Indianapolis, Columbus }. At this stage it is Cleveland and will be connected to Pittsburg.
Now ,select the smallest distance edge form selected nodes. At this stage set S will have { Philadelphia, Pittsburgh, Cleveland, Toledo} and Set V-S will have { Detroit, Ann Arbor, Chicago, Ft. Wayne, Indianapolis, Columbus }. At this stage it is Toledo and will be connected to Cleveland.
Now ,select the smallest distance edge