Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input = {
- 13 -> 7, 7 -> 0, 0 -> 16, 16 -> 2, 2 -> 15,
- 10 -> 5, 5 -> 12, 12 -> 18, 18 -> 15,
- 17 -> 18,
- 15 -> 6, 6 -> 8, 8 -> 4,
- 9 -> 8,
- 4 -> 19, 19 -> 11, 11 -> 1, 1 -> 20, 20 -> 3, 3 -> 4,
- 14 -> 19};
- GraphPlot[input, VertexLabeling -> True]
- output = {
- 13 -> 15,
- 10 -> 18,
- 18 -> 15,
- 17 -> 18,
- 15 -> 8,
- 8 -> 4,
- 9 -> 8,
- 4 -> 19,
- 19 -> 4,
- 14 -> 19};
- GraphPlot[output, VertexLabeling -> True]
- segments = {
- {13, 7, 0, 16, 2, 15},
- {10, 5, 12, 18},
- {18, 15},
- {17, 18},
- {15, 6, 8},
- {9, 8},
- {8, 4},
- {4, 19},
- {14, 19},
- {19, 11, 1, 20, 3, 4}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement