How to Use
Select graph:
- Test: Permutation?
- π: Find permutation
- Inversions: Edge list
Inversions
An inversion of π: pair (i,j) with i
Recognition
G is permutation iff both G and Ḡ are comparability graphs. O(n+m) via modular decomposition + transitive orientation of G and Ḡ simultaneously. Also: LBFS-based algorithms.
Step-by-Step Instructions
- 1Select graph.
- 2Check permutation.
- 3Find π.
- 4Count inversions.
- 5Solve problems.