Are there any cases when adjacency matrix should have entries other than 0 and 1?
closed as unclear what you're asking by David Richerby, R B, Juho, D.W.♦, Luke Mathieson Dec 22 '14 at 23:46
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Yes, because the
(i,j)th entry simply talks about whether or not there exists an edge from vertex
i to vertex
j, and represents existence by a
1 and non-existence by a
However, many graph representations store the edge weight instead of
1s in the matrix. This way, a single matrix can compactly represent both the edges and their weights.