All possible branch structures starting from one point

조회 수: 4 (최근 30일)
Jan GimpelHenning
Jan GimpelHenning 2018년 8월 3일
댓글: Jan GimpelHenning 2018년 8월 6일
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

답변 (1개)

Guillaume
Guillaume 2018년 8월 3일
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
Guillaume
Guillaume 2018년 8월 6일
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?
Jan GimpelHenning
Jan GimpelHenning 2018년 8월 6일
Hi, that's very nice that you come back on this. So actually that's what I want to do. I need possible trees starting from a point due to a connectivity matrix, where the end point can be somewhere in the tree. The graph shouldn't have loops. I would like to set a upper bound, but for the maximum nodes per branch (e.g. 100). And the maximum number of junctions should be limited (in the example there is once junction).
Thank you again very much! Jan

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by