All possible branch structures starting from one point
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

Hi Guys, I have a problem regarding to find all possible trees in a structure starting from one point. I tried to illustrate it on the image attached.
The very left picture shows the nodes and the possible connections. In the end I would like to get the information of all possible branch structures. Is there a function in MATLAB or can anyone help me?
Thank you very much in advance! Jan
0 Kommentare
Antworten (1)
Guillaume
am 3 Aug. 2018
There isn't a dedicated function for that but it shouldn't be too difficult to write your own using matlab graph functions, in particular bfsearch or dfsearch:
g = graph([1 2 3 3 5], [2 3 4 5 6]);
plot(g);
T = bfsearch(g, 1, 'edgetonew') %should give you a start to build your structure
3 Kommentare
Guillaume
am 6 Aug. 2018
First, why do you want to do that. Perhaps, ultimately, you're after something that is easier to obtain.
Secondly, can your graph be biconnected? (i.e have loops) and is there an upper bound to the number of branches?
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!