How to find All possible paths from one node to another node......
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ld=[1 2 2;
1 3 2;
1 4 3;
2 3 3;
3 4 2;
4 5 4;
4 6 4;
5 6 3];
first two column represent edge (node connectivity) of graph and third column represent distance between that line. For example: I want to know all paths from 3 to 4.
My answer will be :
[3 4]
[3 1 4]
[3 2 1 4]
Please help me to solve this. I already use Dijkstra algorithm but Dijkstra algorithm is in xy plane or xyz plane, which is not like my problem.
1 commentaire
Walter Roberson
le 31 Mai 2016
In a duplicate copy of the question, Roger Stafford commented,
The Dijkstra algorithm is concerned with finding the shortest path between a pair of nodes, or the shortest between a given source node and all the other nodes, and that would involve your column three. However, your request is different - you want all possible paths between a pair of nodes - so the Dijkstra algorithm would be of no use to you in any case, nor is there any use for your column three.
If you have a graph with 246 nodes, the chances are that you would have an astronomically large number of possible paths between nodes. What would you do with such a list after you have obtained it?
Réponses (1)
Walter Roberson
le 30 Mai 2016
7 commentaires
Walter Roberson
le 31 Mai 2016
You might not have enough memory to find all of the paths, or it might simply be very busy calculating the paths.
You can also look at http://www.mathworks.com/matlabcentral/fileexchange/27438-find-all-the-possible-paths-between-a-start-and-an-end-node-of-a-graph but it warns that it bogs down when you get to about 20 nodes.
ankanna
le 19 Avr 2021
node = 3; ri=0.9;
L=(node*(node-1))/2;
configuration = dec2bin(0:(2^L-1))-'0';
alfak=configuration;
source node=1; destination node=3;
m = Limit on intermediate node;
2TR(alfak) == ri^m;
how to calculate two terminal reliability.
alfak Path 2TR(alfak)
1 r1r3 0.81
2 r1r3 0.81
3 r1r2r3 0.73
4 r1r3 0.81
5 None 0.00
6 r1r3 0.81
7 None 0.00
8 None 0.00
please help me to generate above and i want that 2terminal reliability at output.
Voir également
Catégories
En savoir plus sur Dijkstra algorithm dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!