Comparability Graph Checker

transitive orientation

CheckersFreeNo Signup
4.5(758 reviews)
All Tools

Loading tool...

About Comparability Graph Checker

A comparability graph checker testing if edges can be transitively oriented: if a→b and b→c then a→c. Equivalently: G is the incomparability graph of a poset. Perfect graphs. O(n+m) via modular decomposition. Client-side.

Comparability Graph Checker Features

  • Comparability test
  • Transitive orient
  • Poset
  • Perfect
  • O(n+m)
Comparability graph: edges can be transitively oriented (if a→b and b→c, then a→c). Equivalently: graph of a partial order. Co-comparability = permutation graph. Perfect: χ=ω. Recognizable in O(n+m) via modular decomposition.

How to Use

Select graph:

  • Test: Comparability?
  • Orient: Transitive
  • Poset: Partial order

Transitive Orientation

Can edges be directed so transitivity holds? Gallai (1967): G is comparability iff every odd cycle has two consecutive edges forming a 'triangle'. Modular decomposition gives O(n+m) algorithm.

Dilworth's Theorem

For posets (comparability graphs): max antichain = min chain cover. Graph-theoretically: α(G) = χ̄(G) (independence number = clique cover of complement). Beautiful duality theorem connecting order theory and graph theory.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Check comparability.
  3. 3Find orientation.
  4. 4Build poset.
  5. 5Apply Dilworth.

Comparability Graph Checker — Frequently Asked Questions

What's a transitive orientation?+

Direct each edge so if a→b and b→c then edge ac exists and a→c. This makes the orientation a partial order. Not all graphs have one: C_5 is not a comparability graph.

What's the connection to posets?+

Comparability graphs = underlying undirected graphs of Hasse diagrams (transitively closed). Two elements comparable in the poset iff they're adjacent. Incomparability graph = co-comparability = complement.

How do co-comparability graphs relate?+

Co-comparability (complement of comparability) = permutation graphs. Interval ⊂ co-comparability ∩ comparability would be too restrictive. The interplay between comparability and co-comparability is rich.

Share this tool: