Hi, I am Madhav Wagle. I am final year student of computer science and am interested in the
Diameter, radius, eccentricities, and distances problem for gsoc 2020
I read the paper [d1] and implemented it in sage. The function is working correctly and the answer it gives matches the answers produced by the code the authors of [d1] provided on several random sparse graphs.
For example, for the below di-graph
the algorithm outputs
%time D.diameter(algorithm='aik') #'aik' is the name of the new algo (initials of the author's lastnames)
CPU times: user 270 µs, sys: 19 µs, total: 289 µs
Wall time: 302 µs
9
I have some doubts about my implementation though:
1)The above algorithm only works well for directed sparse graphs which aren't strongly connected, Is it fine to modify important and central functions like
simple_BFS()
just to accomodate the needs of this new algorithm?
In my implementation I have implemented all the BFS's as a part of the main algorithm function itself ( instead of funtion calls ), is that ok since it dosen't affect code readability negatively.