Which of these adjacency matrices represents a simple graph?

Category: QuestionsWhich of these adjacency matrices represents a simple graph?
Editor">Editor Staff asked 1 month ago

Which of these adjacency matrices represents a simple graph?
 
(a) [ [1, 0, 0], [0, 1, 0], [0, 1, 1] ]
 
(b) [ [1, 1, 1], [1, 1, 1], [1, 1, 1] ]
 
(c) [ [0, 0, 1], [0, 0, 0], [0, 0, 1] ]
 
(d) [ [0, 0, 1], [1, 0, 1], [1, 0, 0] ]
 
My enquiry is from Adjacency Matrix in portion Graph of Data Structures & Algorithms I
 
The question was posed to me in an international level competition.

1 Answers
Editor">Editor Staff answered 1 month ago

Correct answer is (d) [ [0, 0, 1], [1, 0, 1], [1, 0, 0] ]
 
The explanation is: A simple graph must have no-self loops, should be undirected.