Home > other >  Python networkx related problems
Python networkx related problems

Time:10-03

Establish a 15 # 15 grid graph, then deleted random edges makes n (nodes), m (edges) meet n=m + 1, again through the greedy algorithm to find the a, b
the shortest path between two pointsQ 1, due to random delete, will cause the point a, b does not exist between the possibility of any path, I think of the solution is that if the edge for some, the only path between two points is deleted in the random group does not contain the edge, but don't know how to implement the code, or have other method to meet you

2, path to have the arrow to the said, but if you use nx. The Digraph, can cause to the edges of the figure are, there is no command is similar to "add direkted edges", how to satisfy the figure 3, hope leaders help
  • Related