Given an adjacency matrix, is there a way to determine if the graph will be a tree or a graph (whether or not there is a cycle).
For example, given the adjacency matrix:
0 1 0 1
1 0 0 1
0 0 0 1
1 1 1 0
This is not a tree since there is a cycle between Vertex 1, Vertex 2 and Vertex 4.
Whereas given the adjacency matrix:
0 0 0 1
0 0 0 1
0 0 0 1
1 1 1 0
This is a tree since there is no cycle.
One way to approach this is to perform a BFS but I think there might be a visual difference between an adjacency matrix of a graph and of a tree.
Any help would be appreciated!