Data structure notes 7 diagram
Preface
Data structure notes 6 trees and binary trees
Write a note about the picture. In fact, data structure is closely related to discrete mathematics
。
Mental framework
Basic concepts of graphs
Graph storage structure
Graph traversal algorithm operation and basic application
exercise
Multiple choice
\2. An undirected graph with n vertices is represented by an adjacency matrix. If the graph is a connected graph, then there are at least _______ non-zero elements in the adjacency matrix.
A)2(n-1) B)n-1 C)n*n D) n(n-1)
3. To connect a directed graph with n vertices, at least _______ edges are required.
A.nl B.n C.n + l D.2n
6. Which of the following methods can determine whether a directed graph has a loop (loop) ___.
A) Depth-first traversal B) Topological sort
C) Find the shortest path D) Find the critical path
FIG
True or False
() A directed acyclic graph topology sequence may not be unique.
() In an undirected graph with n nodes, if the number of edges is greater than n-1, the graph must be a connected graph
() The out degree of the i-th vertex in the directed graph is equal to the number of non-zero elements in the i-th row in the adjacency matrix
() An undirected graph with n vertices and at least n-1 edges must be a connected graph.
() The number of memory cells required to store a graph with the adjacency matrix method is related to the number of edges of the graph.
ABABB
Short answer
Given a directed graph, give the in-degree out-degree of the graph, adjacency matrix, adjacency list
Depth traversal, breadth traversal
The critical path of AOE network
Shortest path
Given the adjacency matrix, draw the adjacency table, write depth traversal, and breadth traversal.
to sum up
The focus of the graph test is on the four applications of traversal and graph.
Picture is also commonly used in life
Update address: GitHub
For more content, please pay attention: CSDN , GitHub , Nuggets