Skip to content

Commit

Permalink
Update 05.Graph-Topological-Sorting.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed May 9, 2024
1 parent 8487306 commit 537e798
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
图的拓扑排序是针对有向无环图(DAG)来说的,无向图和有向有环图没有拓扑排序,或者说不存在拓扑排序。

![](https://qcdn.itcharge.cn/images/20230504153551.png)
![有向无环图](https://qcdn.itcharge.cn/images/202405092308713.png)

如上图中的有向无环图(DAG)所示,$v_1 \rightarrow v_2 \rightarrow v_3 \rightarrow v_4 \rightarrow v_5 \rightarrow v_6$ 是该图的一个拓扑序列。与此同时,$v_1 \rightarrow v_2 \rightarrow v_3 \rightarrow v_4 \rightarrow v_6 \rightarrow v_5$ 也是该图的一个拓扑序列。也就是说,对于一个有向无环图来说,拓扑序列可能不止一个。

Expand Down

0 comments on commit 537e798

Please sign in to comment.