find all possible paths starting from a specific node and ending at specific node

5 vues (au cours des 30 derniers jours)
Hoda
Hoda le 7 Juil 2013
I want to find all possible paths starting from a specific node and ending at specific node. I tried http://www.mathworks.de/matlabcentral/fileexchange/27438-find-all-the-possible-paths-between-a-start-and-an-end-node-of-a-graph but it did not work on my case. Because as noted,The main Limitation of this function is that, as the total number of node increases, the execution time also increases. The total number of nodes is also limited to 20, due to memory considerations .The total number of nodes in my problem exceed this limitation I couldn't upload the image that shows what I want. Anyway, I'll try to explain. Among nodes
0 1 2 3 4 5 6 7 8 9
The paths I want to find are, for example, will start from 2 to 9. The possible paths produced by the algorithm should be
2-7-9
2-4-6-8-9
2-4-6-9
For node-1 my next possibility would be node-2 only, so I will not try node 0 and and node -3. Because of some special rules I set, only node-2 fits for node-1. Next nodes for node-2, node-4 and node-7 are selected. For node-4, only node-6 is suitable. For node-6, node 8 and node 9 are suitable. On the other hand, for node-7, the next node would be 9 only.for node-8, the next node would be 9 only,as well.
I want all possiblities according to the rule not the shortest one only. I do not want make you confused and bored. The general way to solve this problem is important for me.
Thanks in advance

Réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by