Each PE checks whether the index of the PE that transmitted the data is the same as that of the start node in its adjacency RAM location currently addressed. If so, it adds the weight of the corresponding link to the received cost and compares the result with its previously stored cost value. If the newly computed cost is lesser, the cost of the PE is updated. Also the index of the PE, which transmitted the data, is assigned as the predecessor node. The PEs receive the data transmitted by another PE after a latency of one clock cycle and hence n +1 clock cycles are required for each iteration instead of n. At the end of a sufficient number of iterations, the cost of the shortestpath from the source node to each node and the predecessor node in the path are stored in the PE corresponding to the node.