Q31Comprehension4 Marks3 Sep 2023
Passage
Consider a graph generated from rows of "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.
```
D = {}
while(Table 1 has more rows){
Read the first row X in Table 1
D[X.SeqNo] = ["P": X.Physics, "C": X.Chemistry, "M": X.Mathematics]
Move X to Table 2
}
Ph = getAdjMatrix(D, "P")
Ch = getAdjMatrix(D, "C")
Ma = getAdjMatrix(D, "M")
Procedure getAdjMatrix(D, Subject)
n = length(keys(D))
M = createMatrix(n, n)
foreach i in rows(M){
foreach j in columns(M){
if(i != j){
diff = D[i][Subject] - D[j][Subject]
if(10 <= diff and diff <= 20){
M[i][j] = 1
}
}
}
}
return(M)
End getAdjMatrix
```
Choose the correct statement(s) based on given pseudocode. It is a Multiple Select Question.