# Is there a name for this graph transformation (remove a 'thru' node)

I have a directed graph, eg:

$$A\to B\to C$$

$A$ and $C$ may have multiple in- and out-edges, but B has exactly one in- and one out-edge.

I want to remove node $B$ and replace the edges $(A,B)$ and $(B,C)$ with a single edge $(A,C)$.

Is there a name for this operation? In particular a name or algorithm for finding all nodes such as $B$ and removing them from the graph.

You're contracting the edge $(A,B)$ (or, equivalently, $(B,C)$).
To contract an edge $(x,y)$ is to delete the vertex $y$ and make all its neighbours except $x$ itself be neighbours of $x$ instead.