symrcm implementation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

symrcm implementation

Petr Pařík

Hi all,

I am somewhat puzzled by the symrcm function implementation in Octave and I would appreciate any clarification.

In the attached example symrcm gives [92 91 93 ... 3 1 2], but how did it choose the starting node 2? The algorithm for finding the starting node starts with node 1 and then proceeds to find the most distant node using the breadth-first search, which might be one of 91, 92 & 93 (nodes on the last level). And looking at find_starting_node() in I really can't see any way it could return node 2, which is adjacent to node 1.

Please, what am I missing here?

Best regards,

Petr Parik

sample.m (132K) Download Attachment