find all the paths between each couple of nodes in a graph
1 回表示 (過去 30 日間)
古いコメントを表示
how can I find all the possible paths between each couple of nodes in a graph? Thanks in advance
0 件のコメント
採用された回答
Walter Roberson
2011 年 3 月 12 日
Create the adjacency matrix and raise it to successive matrix powers.
If the graph is not a directed graph, then there will be an infinite number of possible paths. There might well be an infinite number anyhow.
For example,
A BCD BCD BCD BCD BCD BCD BCD BCD E is a quite plausible path between A and E if A->B, B->C, C->D, D->B and D->E
Perhaps you wanted to ask a slightly different question.
1 件のコメント
Ethan Fan
2021 年 9 月 22 日
if it is undirected graph, it is possible to find all possible simple path(which means not pass a repeated node from the start point to the destination )?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Undirected Graphs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!