Algorithm to convert many instances of unidirectional lists to a graph? I feel like I'm missing something basic.
I have instances of a list compromising of unique graph nodes / elements visited. Lists happen in order, but follow graph based rules (can be cyclical, only some connections are allowed, there are optional nodes in a graph, some nodes always happen in unison, etc). How can I derive the graph represented by billions of instances of these lists? And maybe even sub-graphs nested within?
e.g. list instance #1: A -&gt; B -&gt; D -&gt; E 
e.g. list instance #2: A -&gt; F -&gt; K
e.g. list instance #3: A-&gt; B-&gt; K &gt; B -&gt; D -&gt; E 

e.g. graph vertices derived from these lists:
A -&gt; B
B -&gt; D 
B -&gt; K
D -&gt; E 
F -&gt; K

This feels like a solved compsci problem that I'm trying rearticulate. Like, I get that I can always calculate the vertices (either by weight / likelihood to occur, or as booleans if they occurred). But that feels like I'm missing a lot of nested complexity and trying to reinvent the wheel. Is there an esteblished approach to this problem?
You can find the smallest graph that is consistent with those walks from the graph as follows: start with an empty graph; for each pair of vertices that are adjacent in a list, e.g., $A \to B$, add the corresponding edge $A \to B$ to the graph.  The resulting graph is one that could have led to those walks, and is the smallest such.
You can't guarantee to uniquely and correctly reconstruct the original graph.  If you are unlucky, there could be some vertex in the graph that was just never visited by any walk, and then it won't appear in the reconstruction.  If walks are chosen randomly and you have enough of them, the probability of this happening might be low enough that you are willing to accept this risk.