Advertisement
Guest User

Untitled

a guest
May 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. input = {
  2. 13 -> 7, 7 -> 0, 0 -> 16, 16 -> 2, 2 -> 15,
  3. 10 -> 5, 5 -> 12, 12 -> 18, 18 -> 15,
  4. 17 -> 18,
  5. 15 -> 6, 6 -> 8, 8 -> 4,
  6. 9 -> 8,
  7. 4 -> 19, 19 -> 11, 11 -> 1, 1 -> 20, 20 -> 3, 3 -> 4,
  8. 14 -> 19};
  9. GraphPlot[input, VertexLabeling -> True]
  10.  
  11. output = {
  12. 13 -> 15,
  13. 10 -> 18,
  14. 18 -> 15,
  15. 17 -> 18,
  16. 15 -> 8,
  17. 8 -> 4,
  18. 9 -> 8,
  19. 4 -> 19,
  20. 19 -> 4,
  21. 14 -> 19};
  22. GraphPlot[output, VertexLabeling -> True]
  23.  
  24. segments = {
  25. {13, 7, 0, 16, 2, 15},
  26. {10, 5, 12, 18},
  27. {18, 15},
  28. {17, 18},
  29. {15, 6, 8},
  30. {9, 8},
  31. {8, 4},
  32. {4, 19},
  33. {14, 19},
  34. {19, 11, 1, 20, 3, 4}
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement