263 views

Write the adjacency matrix representation of the graph given in below figure.

edited | 263 views

 p1 p2 p3 p4 p5 p1 0 1 0 0 1 p2 0 0 0 1 0 p3 1 0 0 0 0 p4 0 0 1 0 1 p5 0 1 0 0 0
answered by (313 points)
selected by
0
Sir can i put p1 to p1 1.p1 to p1 is also a path
0
If self loop is in p1 then we can write .
put $1$ in all places in adjacency marix according to direction given in edges for ex $p1$ to $p5$ there is path going so put $1$ in $p1$ row and $p5$ col but don't put $1$ in $p5$ to $p1$ because there is no path
answered by Active (1.3k points)
edited by

+1 vote