Compressing nodes in a graph

66 Views Asked by At

I want to compress the nodes in a directed graph that only have one in vertex and one out vertex. Is there a term for this? For example:

$stuff \rightarrow 1 \rightarrow 2 \rightarrow 3 \rightarrow 4 \rightarrow stuff$

becomes

$ stuff \rightarrow 1234 \rightarrow stuff$

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, this is (a special case of) what is known as edge contraction.