# Finding all the pathways from vertex s to vertex t

Suppose that we have a complete graph with n=5 vertices:

vertexset={1,2,3,4,5}


We want to identify the set of all the paths (acyclic), for example, from 1 to 4: 1->2->3>4 or 1->3->4 or 1->4 etc. Needless to say, for small n, the paths can be manually identified. I have a large n and my graph is not complete. So, the question is: how one can identify all the (acyclic) paths from s to t in a directed graph.

• FindPath[g, s, t, Infinity, All]? – Carl Woll Oct 6 '18 at 0:45
• @CarlWoll: Thanks for your answer. It works for me. I hope you would not mind if I have a follow question. Therefore, I edited my question to formulate the main question. Thanks again. – Tugrul Temel Oct 6 '18 at 13:17
• @CarlWoll: I will post a separate question not to confuse others with my previous question. – Tugrul Temel Oct 6 '18 at 13:45