Is there any function that gives the smallest basic cycles of a Graph?

6 views (last 30 days)
Is there any function that gives the smallest basic cycles of a Graph.i have use cyclebasis but the cycles are not the smallest
  8 Comments
Antonio Agüero Ramón-Llin
xni(1)=1; xnf(1)=2; xt(1)=1.2
xni(2)=2; xnf(2)=3; xt(2)=0.5
xni(3)=3; xnf(3)=4; xt(3)=1.0
xni(4)=3; xnf(4)=5; xt(4)=1.0
xni(5)=5; xnf(5)=1; xt(5)=0.5
xni(6)=5; xnf(6)=6; xt(6)=1.0
xni(7)=6; xnf(7)=7; xt(7)=1.0
xni(8)=7; xnf(8)=8; xt(8)=1.0
xni(9)=1; xnf(9)=9; xt(9)=1.2
xni(10)=9; xnf(10)=6; xt(10)=0.5
xni(11)=7; xnf(11)=10; xt(11)=0.5
xni(12)=9; xnf(12)=10; xt(12)=1.2
The graph is defined by s=xni; t=xnf
try to apply cyclebasis and check the cycles
Antonio Agüero Ramón-Llin
s=xni; t=xnf;
G=graph(s,t);
Cy=cyclebasis(G)
results :
Cy =
3×1 cell array
{[ 1 2 3 5]}
{[1 5 6 7 10 9]} (the "smallest" independent cycles should have the three of them 4 vertex, this one has 6 is also independent but not "smallest")
{[ 1 5 6 9]}

Sign in to comment.

Accepted Answer

Matt J
Matt J on 7 Oct 2023
  6 Comments
Antonio Agüero Ramón-Llin
To obtain coordinates of vertices is pgon(1).vertices
And to obtain the vertices numbers?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!