Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- edges = {1 -> 2, 1 -> 3, 1 -> 6, 2 -> 3, 3 -> 4, 3 -> 5};
- g1 = Graph[edges, VertexShapeFunction -> "Name", ImageSize -> Medium];
- g2 = VertexDelete[g1, _?(VertexOutDegree[g, #] == 0 &)];
- Row[{g1, g2}, Spacer[10]]
Add Comment
Please, Sign In to add comment