In graph theory, a perfect graph is a graph in which the chromatic number equals the size of the maximum clique, both in the graph itself and in every induced subgraph. In all graphs, the chromatic number is greater than or equal to the size of the maximum clique, but they can be far apart. A graph is perfect when these numbers are equal, and remain equal after the deletion of arbitrary subsets of vertices.
The perfect graphs include many important families of graphs and serve to unify results relating colorings and cliques in those families. For instance, in all perfect graphs, the graph coloring problem, maximum clique problem, and maximum independent set problem can all be solved in polynomial time, despite their greater complexity for non-perfect graphs. In addition, several important minimax theorems in combinatorics, including Dilworth's theorem and Mirsky's theorem on partially ordered sets, Kőnig's theorem on matchings, and the Erdős–Szekeres theorem on monotonic sequences, can be expressed in terms of the perfection of certain associated graphs.
The perfect graph theorem states that the complement graph of a perfect graph is also perfect. The strong perfect graph theorem characterizes the perfect graphs in terms of certain forbidden induced subgraphs, leading to a polynomial time algorithm for testing whether a graph is perfect.
A clique in an undirected graph is a subset of its vertices that are all adjacent to each other, such as the subsets of vertices connected by heavy edges in the illustration. The clique number is the number of vertices in the largest clique: two in the illustrated seven-vertex cycle, and three in the other graph shown. A graph coloring assigns a color to each vertex so that each two adjacent vertices have different colors, also shown in the illustration. The chromatic number of a graph is the minimum number of colors in any coloring. The colorings shown are optimal, so the chromatic number is three for the 7-cycle and four for the other graph shown. The vertices of any clique must have different colors, so the chromatic number is always greater than or equal to the clique number. For some graphs, they are equal; for others, such as the ones shown, they are unequal. The perfect graphs are defined as the graphs for which these two numbers are equal, not just in the graph itself, but in every induced subgraph obtained by deleting some of its vertices.[1]
The perfect graph theorem asserts that the complement graph of a perfect graph is itself perfect. The complement graph has an edge between two vertices if and only if the given graph does not. A clique, in the complement graph, corresponds to an independent set in the given. A coloring of the complement graph corresponds to a clique cover, a partition of the vertices of the given graph into cliques. The fact that the complement of a perfect graph is also perfect implies that, in itself, the independence number (the size of its maximum independent set), equals its clique cover number (the fewest number of cliques needed in a clique cover). More strongly, the same thing is true in every induced subgraph of the complement graph. This provides an alternative and equivalent definition of the perfect graphs: they are the graphs for which, in each induced subgraph, the independence number equals the clique cover number.[2][3]
The strong perfect graph theorem gives a different way of defining perfect graphs, by their structure instead of by their properties. It is based on the existence of cycle graphs and their complements within a given graph. A cycle of odd length, greater than three, is not perfect: its clique number is two, but its chromatic number is three. By the perfect graph theorem, the complement of an odd cycle of length greater than three is also not perfect. The complement of a length-5 cycle is another length-5 cycle, but for larger odd lengths the complement is not a cycle; it is called an anticycle. The strong perfect graph theorem asserts that these are the only forbidden induced subgraphs for the perfect graphs: a graph is perfect if and only if its induced subgraphs include neither an odd cycle nor an odd anticycle of five or more vertices. In this context, induced cycles that are not triangles are called "holes", and their complements are called "antiholes", so the strong perfect graph theorem can be stated more succinctly: a graph is perfect if and only if it has neither an odd hole nor an odd antihole.[4]
These results can be combined in another characterization of perfect graphs: they are the graphs for which the product of the clique number and independence number is greater than or equal to the number of vertices, and for which the same is true for all induced subgraphs. Because the statement of this characterization remains invariant under complementation of graphs, it implies the perfect graph theorem. One direction of this characterization follows easily from the original definition of perfect: the number of vertices in any graph equals the sum of the sizes of the color classes in an optimal coloring, and is less than or equal to the number of colors multiplied by the independence number. In a perfect graph, the number of colors equals the clique number, and can be replaced by the clique number in this inequality. The other direction can be proved directly,[5][6] but it also follows from the strong perfect graph theorem: if a graph is not perfect, it contains an odd cycle or its complement, and in these subgraphs the product of the clique number and independence number is one less than the number of vertices.[7]
The theory of perfect graphs developed from a 1958 result of Tibor Gallai that in modern language can be interpreted as stating that the complement of a bipartite graph is perfect;[8] this result can also be viewed as a simple equivalent of Kőnig's theorem, a much earlier result relating matchings and vertex covers in bipartite graphs. The first formulation of the concept of perfect graphs more generally was in a 1961 paper by Claude Berge, in German,[9] and the first use of the phrase "perfect graph" appears to be in a 1963 paper of Berge.[10] In these works he unified Gallai's result with several similar results by defining perfect graphs, and he conjectured both the perfect graph theorem and the strong perfect graph theorem. In formulating these concepts, Berge was motivated by the concept of the Shannon capacity of a graph, by the fact that for (co-)perfect graphs it equals the independence number, and by the search for minimal examples of graphs for which this is not the case.[11] Until the strong perfect graph theorem was proven, the graphs described by it (that is, the graphs with no odd hole and no odd antihole) were called Berge graphs.[12]
The perfect graph theorem was proven by László Lovász in 1972,[2] who in the same year proved the stronger inequality between the number of vertices and the product of the clique number and independence number, without benefit of the strong perfect graph theorem.[5] In 1991, Alfred Lehman won the Fulkerson Prize, sponsored jointly by the Mathematical Optimization Society and American Mathematical Society, for his work on generalizations of the theory of perfect graphs to logical matrices.[13] The conjectured strong perfect graph theorem became the focus of research in the theory of perfect graphs for many years,[12] until its proof was announced in 2002 by Maria Chudnovsky, Neil Robertson, Paul Seymour, and Robin Thomas,[14] and published by them in 2006.[4] This work won its authors the 2009 Fulkerson Prize.[15] The perfect graph theorem has a short proof,[5][6] but the proof of the strong perfect graph theorem is long and technical, based on a deep structural decomposition of Berge graphs. Related decomposition techniques have also borne fruit in the study of other graph classes, and in particular for the claw-free graphs.[16] The symmetric characterization of perfect graphs in terms of the product of clique number and independence number was originally suggested by Hajnal and proven by Lovász.[5]
Many well-studied families of graphs are perfect,[12] and in many cases the fact that these graphs are perfect corresponds to a minimax theorem for some kinds of combinatorial structure defined by these graphs. Examples of this phenomenon include the perfection of bipartite graphs and their line graphs, associated with Kőnig's theorem relating maximum matchings and vertex covers in bipartite graphs, and the perfection of comparability graphs, associated with Dilworth's theorem and Mirsky's theorem on chains and antichains in partially ordered sets. Other important classes of graphs, defined by having a structure related to the holes and antiholes of the strong perfect graph theorem, include the chordal graphs, Meyniel graphs, and their subclasses.
In bipartite graphs (with at least one edge) the chromatic number and clique number both equal two. Their induced subgraphs remain bipartite, so bipartite graphs are perfect.[12] Other important families of graphs are bipartite, and therefore also perfect, including for instance the trees and median graphs.[17] By the perfect graph theorem, maximum independent sets in bipartite graphs have the same size as their minimum clique covers. The maximum independent set is complementary to a minimum vertex cover, a set of vertices that touches all edges. A minimum clique cover consists of a maximum matching (as many disjoint edges as possible) together with one-vertex cliques for all remaining vertices, and its size is the number of vertices minus the number of matching edges. Therefore, this equality can be expressed equivalently as an equality between the size of the maximum matching and the minimum vertex cover in bipartite graphs, the usual formulation of Kőnig's theorem.[18][19]
A matching, in any graph , is the same thing as an independent set in the line graph , a graph that has a vertex for each edge in and an edge between two vertices in for each pair of edges in that share an endpoint. Line graphs have two kinds of cliques: sets of edges in with a common endpoint, and triangles in . In bipartite graphs, there are no triangles, so a clique cover in corresponds to a vertex cover in . Therefore, in line graphs of bipartite graphs, the independence number and clique cover number are equal. Induced subgraphs of line graphs of bipartite graphs are line graphs of subgraphs, so the line graphs of bipartite graphs are perfect.[19] Examples include the rook's graphs, the line graphs of complete bipartite graphs. Every line graph of a bipartite graph is an induced subgraph of a rook's graph.[20]
Because line graphs of bipartite graphs are perfect, their clique number equals their chromatic number. The clique number of the line graph of a bipartite graph is the maximum degree of any vertex of the underlying bipartite graph. The chromatic number of the line graph of a bipartite graph is the chromatic index of the underlying bipartite graph, the minimum number of colors needed to color the edges so that touching edges have different colors. Each color class forms a matching, and the chromatic index is the minimum number of matchings needed to cover all edges. The equality of maximum degree and chromatic index, in bipartite graphs, is another theorem of Dénes Kőnig.[21] In arbitrary simple graphs, they can differ by one; this is Vizing's theorem.[19]
The underlying graph of a perfect line graph is a line perfect graph. These are the graphs whose biconnected components are bipartite graphs, the complete graph , and triangular books, sets of triangles sharing an edge. These components are perfect, and their combination preserves perfection, so every line perfect graph is perfect.[19]
The bipartite graphs, their complements, and the line graphs of bipartite graphs and their complements form four basic classes of perfect graphs that play a key role in the proof of the strong perfect graph theorem. According to the structural decomposition of perfect graphs used as part of this proof, every perfect graph that is not already in one of these four classes can be decomposed by partitioning its vertices into subsets, in one of four ways, called a 2-join, the complement of a 2-join, a homogeneous pair, or a skew partition.[3]
A partially ordered set is defined by its set of elements, and a comparison relation that is reflexive (for all elements , ), antisymmetric (if and , then , and transitive (if and , then ). Elements and are comparable if or , and incomparable otherwise. For instance, set inclusion ( ) partially orders any family of sets. The comparability graph of a partially ordered set has the set elements as its vertices, with an edge connecting any two comparable elements. Its complement is called an incomparability graph. Different partial orders may have the same comparability graph; for instance, reversing all comparisons changes the order but not the graph.[22]
Finite comparability graphs (and their complementary incomparability graphs) are always perfect.[23] A clique, in a comparability graph, comes from a subset of elements that are all pairwise comparable; such a subset is called a chain, and it is linearly ordered by the given partial order. An independent set comes from a subset of elements no two of which are comparable; such a subset is called an antichain. For instance, in the illustrated partial order and comparability graph, is a chain in the order and a clique in the graph, while is an antichain in the order and an independent set in the graph. Thus, a coloring of a comparability graph is a partition of its elements into antichains, and a clique cover is a partition of its elements into chains. Dilworth's theorem, in the theory of partial orders, states that for every finite partial order, the size of the largest antichain equals the minimum number of chains into which the elements can be partitioned. In the language of graphs, this can be stated as: every finite comparability graph is perfect. Similarly, Mirsky's theorem states that for every finite partial order, the size of the largest chain equals the minimum number of antichains into which the elements can be partitioned, or that every finite incomparability graph is perfect. These two theorems are equivalent via the perfect graph theorem, but Mirsky's theorem is easier to prove directly than Dilworth's theorem: if each element is labeled by the size of the largest chain in which it is maximal, then the subsets with equal labels form a partition into antichains, with the number of antichains equal to the size of the largest chain overall.[24] Every bipartite graph is a comparability graph. Thus, Kőnig's theorem can be seen as a special case of Dilworth's theorem, connected through the theory of perfect graphs.[25]
A permutation graph is defined from a permutation on a totally ordered sequence of elements (conventionally, the integers from to ), which form the vertices of the graph. The edges of a permutation graph connect pairs of elements whose ordering is reversed by the given permutation. These are naturally incomparability graphs, for a partial order in which whenever occurs before in both the given sequence and its permutation. The complement of a permutation graph is another permutation graph, for the reverse of the given permutation. Therefore, as well as being incomparability graphs, permutation graphs are comparability graphs. In fact, the permutation graphs are exactly the graphs that are both comparability and incomparability graphs.[26] A clique, in a permutation graph, is a subsequence of elements that appear in increasing order in the given permutation, and an independent set is a subsequence of elements that appear in decreasing order. In any perfect graph, the product of the clique number and independence number are at least the number of vertices; the special case of this inequality for permutation graphs is the Erdős–Szekeres theorem.[24]
The interval graphs are the incomparability graphs of interval orders, orderings defined by sets of intervals on the real line with whenever interval is completely to the left of interval . In the corresponding interval graph, there is an edge from to whenever the two intervals have a point in common. Coloring these graphs can be used to model problems of assigning resources to tasks (such as classrooms to classes) with intervals describing the scheduled time of each task.[27] Both interval graphs and permutation graphs are generalized by the trapezoid graphs.[28] Systems of intervals in which no two are nested produce a more restricted class of graphs, the indifference graphs, the incomparability graphs of semiorders. These have been used to model human preferences under the assumption that, when items have utilities that are very close to each other, they will be incomparable.[29] Intervals where every pair is nested or disjoint produce trivially perfect graphs,[30] the comparability graphs of ordered trees. In them, the independence number equals the number of maximal cliques.[31]
A split graph is a graph that can be partitioned into a clique and an independent set. It can be colored by assigning a separate color to each vertex of a maximal clique, and then coloring each remaining vertex the same as a non-adjacent clique vertex. Therefore, these graphs have equal clique numbers and chromatic numbers, and are perfect.[32] A broader class of graphs, the unipolar graphs can be partitioned into a clique and a cluster graph, a disjoint union of cliques. These include also the bipartite graphs, for which the cluster graph is just a single clique. The unipolar graphs and their complements together form the class of generalized split graphs. Almost all perfect graphs are generalized split graphs, in the sense that the fraction of perfect -vertex graphs that are generalized split graphs goes to one in the limit as grows arbitrarily large.[33]
Other limiting properties of almost all perfect graphs can be determined by studying the generalized split graphs. In this way, it has been shown that almost all perfect graphs contain a Hamiltonian cycle. If is an arbitrary graph, the limiting probability that occurs as an induced subgraph of a large random perfect graph is 0, 1/2, or 1, respectively as is not a generalized split graph, is unipolar or co-unipolar but not both, or is both unipolar and co-unipolar.[34]
Several families of perfect graphs can be characterized by an incremental construction in which the graphs in the family are built up by adding one vertex at a time, according to certain rules, which guarantee that after each vertex is added the graph remains perfect.
If the vertices of a chordal graph are colored in the order of an incremental construction sequence using a greedy coloring algorithm, the result will be an optimal coloring. The reverse of the vertex ordering used in this construction is called an elimination order.[45] Similarly, if the vertices of a distance-hereditary graph are colored in the order of an incremental construction sequence, the resulting coloring will be optimal.[46] If the vertices of a comparability graph are colored in the order of a linear extension of its underlying partial order, the resulting coloring will be optimal. This property is generalized in the family of perfectly orderable graphs, the graphs for which there exists an ordering that, when restricted to any induced subgraph, causes greedy coloring to be optimal.[47] The cographs are exactly the graphs for which all vertex orderings have this property.[48] Another subclass of perfectly orderable graphs are the complements of tolerance graphs, a generalization of interval graphs.[49]
The strongly perfect graphs are graphs in which, in every induced subgraph, there exists an independent set that intersects all maximal cliques. In the Meyniel graphs or very strongly perfect graphs, every vertex belongs to such an independent set. The Meyniel graphs can also be characterized as the graphs in which every odd cycle of length five or more has at least two chords.[50]
A parity graph is defined by the property that between every two vertices, all induced paths have equal parity: either they are all even in length, or they are all odd in length. These include the distance-hereditary graphs, in which all induced paths between two vertices have the same length,[51] and bipartite graphs, for which all paths (not just induced paths) between any two vertices have equal parity. Parity graphs are Meyniel graphs, and therefore perfect: if a long odd cycle had only one chord, the two parts of the cycle between the endpoints of the chord would be induced paths of different parity. The prism over any parity graph (its Cartesian product with a single edge) is another parity graph, and the parity graphs are the only graphs whose prisms are perfect.[52]
Perfect graphs are closely connected to the theory of linear programming and integer programming. Both linear programs and integer programs are expressed in canonical form as seeking a vector that maximizes a linear objective function , subject to the linear constraints and . Here, is given as a matrix, and and are given as two vectors. Although linear programs and integer programs are specified in this same way, they differ in that, in a linear program, the solution vector is allowed to have arbitrary real numbers as its coefficients, whereas in an integer program these unknown coefficients must be integers. This makes a very big difference in the computational complexity of these problems: linear programming can be solved in polynomial time, but integer programming is NP-hard.[1]
When the same given values , , and are used to define both a linear program and an integer program, they commonly have different optimal solutions. The linear program is called an integral linear program if an optimal solution to the integer program is also optimal for the linear program. (Otherwise, the ratio between the two solution values is called the integrality gap, and is important in analyzing approximation algorithms for the integer program.) Perfect graphs may be used to characterize the (0, 1) matrices (that is, matrices where all coefficients are 0 or 1) with the following property: if is the all-ones vector, then for all choices of the resulting linear program is integral.[1]
As Václav Chvátal proved, every matrix with this property is (up to removal of irrelevant "dominated" rows) the maximal clique versus vertex incidence matrix of a perfect graph. This matrix has a column for each vertex of the graph, and a row for each maximal clique, with a coefficient that is one in the columns of vertices that belong to the clique and zero in the remaining columns. The integral linear programs encoded by this matrix seek the maximum-weight independent set of the given graph, with weights given by the vector .[1][53]
For a matrix defined in this way from a perfect graph, the vectors satisfying the system of inequalities , form an integral polytope. It is the convex hull of the indicator vectors of independent sets in the graph, with facets corresponding to the maximal cliques in the graph. The perfect graphs are the only graphs for which the two polytopes defined in this way from independent sets and from maximal cliques coincide.[53]
In all perfect graphs, the graph coloring problem, maximum clique problem, and maximum independent set problem can all be solved in polynomial time. The algorithm for the general case involves the Lovász number of these graphs. The Lovász number of any graph can be determined by labeling its vertices by high dimensional unit vectors, so that each two non-adjacent vertices have perpendicular labels, and so that all of the vectors lie in a cone with as small an opening angle as possible. Then, the Lovász number is , where is the half-angle of this cone. Despite this complicated definition, an accurate numerical value of the Lovász number can be computed using semidefinite programming, and for any graph the Lovász number is sandwiched between the chromatic number and clique number. Because these two numbers equal each other in perfect graphs, they also equal the Lovász number. Thus, they can be computed by approximating the Lovász number accurately enough and rounding the result to the nearest integer.[54][55]
The solution method for semidefinite programs, used by this algorithm, is based on the ellipsoid method for linear programming. It leads to a polynomial time algorithm for computing the chromatic number and clique number in perfect graphs. However, solving these problems using the Lovász number and the ellipsoid method is complicated and has a high polynomial exponent.[54][55] More efficient combinatorial algorithms are known for many special cases.[56]
This method can also be generalized to find the maximum weight of a clique, in a weighted graph, instead of the clique number. A maximum or maximum weight clique itself, and an optimal coloring of the graph, can also be found by these methods, and a maximum independent set can be found by applying the same approach to the complement of the graph. For instance, a maximum clique can be found by the following algorithm:[54]
The algorithm for finding an optimal coloring is more complicated, and depends on the duality theory of linear programs, using this clique-finding algorithm as a separation oracle.[54]
Beyond solving these problems, another important computational problem concerning perfect graphs is their recognition, the problem of testing whether a given graph is perfect. For many years the complexity of recognizing Berge graphs and perfect graphs were considered separately (as they were not yet known to be equivalent) and both remained open. They were both known to be in co-NP; for Berge graphs, this follows from the definition,[57] while for perfect graphs it follows from the characterization using the product of the clique number and independence number.[6] After the strong perfect graph theorem was proved, Chudnovsky, Cornuéjols, Liu, Seymour, and Vušković discovered a polynomial time algorithm for testing the existence of odd holes or anti-holes. By the strong perfect graph theorem, this can be used to test whether a given graph is perfect, in polynomial time.[58]
Generalizing the perfect graphs, a graph class is said to be χ-bounded if the chromatic number of the graphs in the class can be bounded by a function of their clique number. The perfect graphs are exactly the graphs for which this function is the identity, both for the graph itself and for all its induced subgraphs.[59]
The equality of the clique number and chromatic number in perfect graphs has motivated the definition of other graph classes, in which other graph invariants are set equal to each other. For instance, the domination perfect graphs are defined as graphs in which, in every induced subgraph, the smallest dominating set (a set of vertices adjacent to all remaining vertices) equals the size of the smallest independent set that is a dominating set. These include, for instance, the claw-free graphs.[60]