Introduction - If you have any usage issues, please Google them yourself
The adjacency matrix of the graph and traversal
A. Problem description
Construct a graph to achieve the depth first traversal or breadth first traversal of the graph with adjacency matrix.
2. The experiment purpose
1. Master the basic concept of graph and the storage structure of adjacency matrix.
2. The algorithm of the adjacency matrix storage structure is realized.
3. Master graph is implemented in the adjacency matrix storage structure.
3. The experimental requirements
1. Determine the number of vertices and the number of edges, establish adjacency matrix, achieve depth first traversal or breadth first traversal, and call them in the main function.
2. Depth first traversing thoughts:
(1) access vertex v
(2) select a vertex w from the unvisited adjacent point of v and perform depth first traversal from w;
(3) repeat the above two steps until all vertices connected with v in the diagram are accessed.
Packet : 51622436tu_de_bian_li.rar filelist
图的邻接矩阵和遍历.txt