The main is to make a summary of the graph algorithm.
The most basic idea of graph algorithm is that the DFS and BFS,DFS groups are used to investigate the structure of the graph, and BFS is generally used to solve the problem of the shortest path without permission.
Topological ordering relies on the DFS algorithm, the topological sort can solve the event dependency, the strong connected branch problem and the single source shortest path problem.
The Euler circuit can be resolved using DFS.
The existence of Hamilton loops can be solved by topological sequencing.
The solution of strong connected branch problem can use the method of topological sort, can use Tarjan, and both will use DFS.
The minimum spanning tree problem can be solved using Kruskal or prim.
Single source Shortest path problem can be solved by using Bellman-ford or Dijkstra, but Dijkstra can not solve the negative weight loop problem, both of which depend on path-path relaxation technology. The loop-free graph can speed up the Bellman-ford solution using topological sequencing.
Single source Shortest path problem can also be extended to solve the differential constraint system.
The multi-source shortest path can be solved by using matrix multiplication or Floyd-warshell, both of which are dynamic programming solutions.
The idea of the closure transfer problem is that if you only consider whether it is available, then you can use the path as a 0,1 representation, and the recursion of the path with or operations. The solution is still dependent on the previous algorithm.
- In addition, it is important to use backtracking for different scenarios to reduce path searches.
A preliminary summary of graph algorithm