Guest User

Untitled

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