For example I’ve a weakly linked graph like:
vertices = Vary[8];
g = Graph[vertices, { 2 > 1, 3 > 2, 4 > 3, 5 >6 , 7 > 6, 6> 2, 2 > 8}, VertexLabels > "Name"]
On the correct you possibly can see the adjacency matrix of the graph.
need
 I wish to have an algorithm that finds a causally constant path for a given graph.
For the graph proven above, the next are all examples of acceptable paths:
{ {4 > 3 > 2}, {5 > 6}, {7 > 6}, {6 > 2}, {2 > 1} }
{ {4 > 3 > 2}, {7 > 6}, {5 > 6}, {6 > 2}, {2 > 1} }
{ {7 > 6}, {5 > 6}, {6 > 2}, {4 > 3 > 2}, {2 > 1} }
{ {5 > 6}, {7 > 6}, {6 > 2}, {4 > 3 > 2}, {2 > 1} }
ie {2 > 1}
occurs after {6 > 2}
and {3 > 2}
and so forth.
 Having found such a path, I then wish to animate the traversal of this path on the graph and animate/manipulate it.
observations

it is simple to seek out the “endpointw” of this graph. it is the one with a row of all 0s, ie. row 1 and eight within the matrix.

it is simple to seek out the potential “start line” of this graph. it is those with related column of all zeros. ie 4,5 or 7 within the matrix. we are able to get the paths from these factors to an endpoint of curiosity utilizing:
path1 = FindPath[g, 4, 1, Infinity, All]
path2 = FindPath[g, 5, 1, Infinity, All]
path3 = FindPath[g, 7, 1, Infinity, All]
however these paths will intersect and upon intersection we should always solely proceed if different edge is already traversed. how can we examine that?

If establishing the trail backwards, the final step could be discovered by wanting on the its related column and seeing the cells with 1 in them. with an endpoint of 1, the final step is
2>1
. 
For two, it is
3>2
and6>2
. and so forth. typically, it is a perform of the shape:
previousEdges[edgeIndex_, adjM_]:= (# > edgeIndex) &/@ Flatten[Position[Normal[adjM[[All, edgeIndex]]],1]]
 equally we are able to go ahead by:
nextEdges[edgeIndex_, adjM_]:= (edgeIndex > # ) &/@ Flatten[Position[Normal[adjM[[edgeIndex]]],1]]
 for it to be simpler to observe the sequence of occasions, i wish to disallow the next paths:
{ {5 > 6}, {4 > 3 > 2}, {7 > 6}, {6 > 2}, {2 > 1} }
{ {7 > 6}, {4 > 3 > 2}, {5 > 6}, {6 > 2}, {2 > 1} }
although they’re completely legitimate informal paths.
potential technique

make specific all of the assumptions concerning the graph in our resolution. ie, a causal graph cannot be cyclic, ought to have no less than one endpoint, and so forth.

We’ve got to make the choice whether or not to assemble the trail backwards or forwards.

We might strive analysing the paths returned by findPath calls: we are able to outline a recursive perform with the next pseudocode:
findPath[paths_]:= Module[ {...},
findPathRec[{}, p_] :=p
findPathRec[remainingPaths_, {}]:= (
//choose the top edge, in one of many paths
findPathRec[headDropped, {head}]
)
findPathRec[remainingPaths_, traversed_]:= (
//have a look at the sting sitting on the head of the traversed path, see if there may be any path that has the "finish" of the sting in it. in that case, drop it from the remaining paths, prepend that to traversed and make an iterative name to findPathRec
)
findPathRec[paths, {}]
]
the place we name it with {path1, path2, path3} as described earlier.

alternatively we might use the adjacency matrix of the graph instantly and use
previousEdges/nextEdges
to assemble the trail based mostly on the graph 
as soon as we’ve a legitimate causallyconsistent path, we are able to present the vertices by:
path = { 5 > 6, 7 > 6, 6 > 2, 4 > 3, 3 > 2, 2 > 1 };
Animate[HighlightGraph[g, Subgraph[g, Take[path, k]]], {ok, 0,Size[path],1}]
the place we’d consider the trail as a substitute of hardcoding it as demonstrated above.