code which counts the number of edges
How to write a code which counts the number of edges from a one vertex to another vertex in a directed bipartite graph?
How to write a code which counts the number of edges from a one vertex to another vertex in a directed bipartite graph?
Following up on vdelecroix's comment above, here's an example:
sage: G=graphs.PathGraph(5)
sage: G.distance(2,4)
2
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2013-03-28 14:20:38 +0100
Seen: 393 times
Last updated: Apr 01 '13
Do you mean the distance ?
yeah,you are right.
I don't know if I am right because in your question you specify that the graph "directed" and "bipartite"... what those two properties have to do with computing a distance in a graph ? Anyway, can you reformulate your question in a clearer way ?