Perfect graph (source code)

= Perfect graph
{title2=$\chi(H)=\omega(H)$}

A perfect graph is a finite <simple graph> $G$ for which every <induced subgraph> $H$ satisfies
$$
\chi(H)=\omega(H),
$$
where $\chi$ is the <chromatic number> and $\omega$ is the <clique number>. A clique always needs distinct colors, so perfection says this lower bound is attained throughout the induced-subgraph family. Equality for $G$ alone is not enough.

Every <bipartite graph> is perfect: any induced subgraph with an edge has clique number and chromatic number two, while a nonempty edgeless induced subgraph has both equal to one. The empty graph uses zero for both. A five-cycle is not perfect, because it needs three colors but has no clique larger than an edge.

The hereditary condition makes perfection useful in coloring and combinatorial optimization: deleting vertices preserves it automatically. It does not say that an arbitrary greedy vertex order will find an optimal coloring.