Q24Comprehension3 Marks3 Sep 2023
Passage
Consider a graph generated from rows of the "Scores" table that is represented by a matrix . Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.
```
M = createMatrix(n, n)
foreach i in rows(M){
foreach j in columns(M){
M[i][j] = []
}
}
L = ["Chemistry", "Mathematics", "Physics"]
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
foreach Subject in L{
if(X.Subject > Y.Subject){
M[X.SeqNo][Y.SeqNo] = M[X.SeqNo][Y.SeqNo] ++ [Subject]
}
if(X.Subject < Y.Subject){
M[Y.SeqNo][X.SeqNo] = M[Y.SeqNo][X.SeqNo] ++ [Subject]
}
}
}
Move all rows from Table 3 to Table 1
}
```
For each pair of vertices and with , choose the correct statement about .