The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+4 votes
336 views

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

asked in Graph Theory by Veteran (112k points)
edited by | 336 views

2 Answers

+4 votes
Best answer
  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 .
+3 votes
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.4k points)
edited by

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

44,240 questions
49,722 answers
163,928 comments
65,837 users