I'm going to compare all 1 hop connections that connect to node 1,
3, 4, and 2, and the link cost values is 2, 5, 5, and 3.
Among these, the minimum one is 2, so therefore I select it.
And it becomes a member of set M and now it is connected to my shortest path tree.
The first node is connected.
Now, when I calculate the next set of values and
I'm going to do a comparison to add the lowest cost one,
I need to make sure that the connection over here although it's a 2,
to connect to node 3 by node 1, it goes through this link value of 2.
So actually, the 2 plus 2 results in a value of 4.
So it should be represented as a 4.
So it's a 4, a 5, a 5, and a 3.
So therefore, among these, 3 is the least cost, so,
therefore, node 2 is added to the shortest path tree and
node 2 is added to set M right here.
In the next step, we see the other numbers.
And among them, the value 4 at the top is the lowest cost.
So therefore, node 3 is added on and then we compare
again we see that 9, 5 9 and 13 are compared.
The least cost, the minimum cost is this one right here 5 which
connects to node 4 so, therefore,
it is added to the shortest path tree and node 4 is added to set M right here.
Then, among the other options, we compare again.
And the least cost, which is the link cost of number 9,
which connects node number 6 to the shortest path tree is selected and,
therefore, it is added here, what you see right here, number 6.
Then, we do another comparison and
you see that there is a value over there which is 12, 10, and 13.
10 is a minimum one over there which connects to note 7.
So therefore, that link is connected to the shortest path tree and
you see right here, note 7 is included inside set M.