How do I split a node in an undirected graph into two new nodes so that two edges that allowed a path through the original node would now be two dead ends? I need to preserve the properties of the original node into the new nodes. Here is an example:
| |
4---1---2---3---5 => 4---1---2 2---3---5
| |
(one graph) (two disjointed graphs)