Q11Comprehension5 Marks13 Apr 2025
Passage
Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G. Answer the given subquestions.

Consider the below pseudocode:
What will be the value of count at the end of the execution?
```
Procedure updateMatrix(M)
count = 0
tempMat = M
foreach i in ListV{
foreach j in ListV{
foreach k in ListV{
if(M[i][j] == 1 and M[j][k] == 1){
if(M[k][i] == 1){
count = count + 1
}
}
}
}
}
return(count)
End updateMatrix
```