1 | initial version |

There seem not to be an existing method in Sage for doing that out of the box, so you should write your own algorithm. If you are lazy, you can still use the following slow brute force method, depending on the size of your graph:

```
sage: G = graphs.PetersenGraph()
sage: allp = G.all_paths(0,4)
sage: m = min(len(p) for p in allp) ; m
2
sage: [p for p in allp if len(p) == m]
[[0, 4]]
```

2 | No.2 Revision |

There seem not to be an existing method in Sage for doing that out of the box, so you should write your own algorithm. If you are lazy, you can still use the following slow brute force method, depending on the size of your graph:

`sage: G = `~~graphs.PetersenGraph()
~~graphs.GrotzschGraph()
sage: allp = ~~G.all_paths(0,4)
~~G.all_paths(1,4)
sage: m = min(len(p) for p in allp) ; m
2
sage: [p for p in allp if len(p) == m]
~~[[0, ~~[[1, 0, 4], [1, 10, 4]]

3 | No.3 Revision |

There seem not to be an existing method in Sage for doing that out of the box, so you should write your own algorithm. If you are lazy, you can still use the following slow brute force method, depending on the size of your graph:

```
sage: G = graphs.GrotzschGraph()
sage: allp = G.all_paths(1,4)
sage: m = min(len(p) for p in allp) ; m
```~~2
~~3
sage: [p for p in allp if len(p) == m]
[[1, 0, 4], [1, 10, 4]]

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.