⍝ ⍵-permutation of vertices of graph ⍺: g←(2 3)3(2 4)(1 5)3 g ⍝ graph "g" ┌───┬─┬───┬───┬─┐ │2 3│3│2 4│1 5│3│ └───┴─┴───┴───┴─┘ g gperm 2 1 3 4 5 ⍝ first two vertices reversed ┌─┬───┬───┬───┬─┐ │3│1 3│1 4│2 5│3│ └─┴───┴───┴───┴─┘ g gperm ⌽⍳⍴g ⍝ all vertices reversed ┌─┬───┬───┬─┬───┐ │3│5 1│4 2│3│4 3│ └─┴───┴───┴─┴───┘ ⍝∇ gperm Back to: code Back to: Workspaces