ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 01 Aug 2017 00:09:40 +0200Paths beginning with a certain vertexhttps://ask.sagemath.org/question/38452/paths-beginning-with-a-certain-vertex/So I have a graph $G$ and a distinguished vertex, labeled with $0$ say. I would like to create a list of all paths of length $k$ that start with $0$.
One way I see how to do this with subgraph_search is to change $0$ into a large clique (larger than the clique number of $G$) and then use subgraph_search_iterator to find all subgraphs with a large clique connected to a path of length $k-1$. However, this seems pretty inefficient. Is there a better way?
vukovTue, 01 Aug 2017 00:09:40 +0200https://ask.sagemath.org/question/38452/