find all the paths between each couple of nodes in a graph

1 Ansicht (letzte 30 Tage)
elia
elia am 12 Mär. 2011
Kommentiert: Ethan Fan am 22 Sep. 2021
how can I find all the possible paths between each couple of nodes in a graph? Thanks in advance

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Mär. 2011
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 Kommentar
Ethan Fan
Ethan Fan am 22 Sep. 2021
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 )?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by