Cograph Recognition Checker

P₄-free recognition

CheckersFreeNo Signup
4.6(347 reviews)
All Tools

Loading tool...

About Cograph Recognition Checker

A cograph recognition checker testing if a graph is P₄-free (no induced path on 4 vertices). Cographs = recursively built by complement and disjoint union. Cotree decomposition. χ = ω for cographs (perfect). O(n+m) recognition. Client-side.

Cograph Recognition Checker Features

  • P₄-free test
  • Cotree
  • χ = ω
  • O(n+m)
  • Decomposition
Cograph: P₄-free graph (no induced path of 4 vertices). Equivalent: built recursively from single vertices by complement and disjoint union. Has cotree decomposition. Perfect: χ=ω. Recognizable in O(n+m). Important in algorithm design.

How to Use

Select graph:

  • Test: P₄-free?
  • Cotree: Decomposition
  • Perfect: χ=ω

Cotree Decomposition

Every cograph has a cotree: binary tree with leaves = vertices. Internal nodes labeled 0 (disjoint union) or 1 (join/complement). Two vertices adjacent iff their LCA is labeled 1. Unique canonical cotree.

Properties

Cographs are perfect (χ=ω). Complement of cograph is cograph. Many NP-hard problems polynomial on cographs via cotree DP: clique, coloring, Hamiltonian path, domination. Widely studied graph class.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Check P₄-free.
  3. 3Build cotree.
  4. 4Find χ=ω.
  5. 5Solve problems.

Cograph Recognition Checker — Frequently Asked Questions

What's P₄-free mean?+

No four vertices form an induced path a-b-c-d. Equivalently: every connected induced subgraph has diameter ≤ 2. Very restrictive but includes many practical graphs.

Why are cographs important?+

Many NP-hard problems become polynomial: maximum clique, minimum coloring, Hamiltonian path, maximum independent set. The cotree provides O(n) algorithms via bottom-up dynamic programming.

How are cographs built?+

Start with single vertices. At each step: take disjoint union (no edges between parts) or join (all edges between parts). Any graph built this way is a cograph, and every cograph can be built this way.

Share this tool: