Hi all,
I have some problems with something that may be called "graph".
My program produces the results that look like the picture as follow

In this picture, there are 4 results which each result is composed of data node. There is only one direction from left to right, no loop.
The first question is, what kind of this graph? Directed graph or else?
Afther I have the results. I need to do something to get new result like the picture as following. Someone said me "factorize", I don't know.

So, the second quesiton, Which technique or algorithm or methodology are used for "factorize".
thanks