Graph Coloring

11
 Graph coloring A proper vertex coloring of the Petersen graph with 3 colors, the minimum number possible. In grap h theory, graph col orin g isasp ec ia l caseof graph labeling; it is an assignment of labels traditionally called “colors” to elements of a  graph  subject to certain con- straints. In its simplest f orm, it is a way of coloring the vertices of a graph such that no two adjacent  vertices share the same color; this is called a  vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges share the same color, and a face coloring of a planar g raph assigns a color to each face or region so that no two faces that share a boundary have the same color. Vertex coloring is the starting point of the subject, and other coloring problems can be transformed into a vertex versio n. For example, an edge colori ng of a graph is just a vertex coloring of its line graph, and a face coloring of a plane graph is just a vertex coloring of its dual. However, non -ve rte x colori ng pr oblems areoftenstated and studi ed as is . That is partly for perspectiv e, and partly because some problems are best studied in non-vertex form, as for instance is edge coloring. The convention of using colors originates from coloring the countries of a map, where each face is literally col- ored . This was ge neralized to colo ring the f ace s of a graph embedded in the pla ne. By pla nar dua lit y it bec ame coloring the vertices, and in this form it generalizes to all graphs. In mathematical and computer representations, it is typical to use the rst few positive or nonnegative in- tegers as the “colors”. In general, one can use any nite set as the “color set”. The nature of the coloring problem de pe nd s on the numb er of co lors but not onwhat theyare. Graph coloring enjoy s many practical applications a s well as theoretic al challenge s. Besid e the classic al types of problems, diere nt limi tatio ns can also be set on the graph, or on the way a color is assigned, or even on the color itself. It has even reached popu larity with the gen- eral public in the form of the popular number puzzle Sudoku. Graph coloring is still a very active eld of re- search. Note: Many terms use d in this art icl e are de ned in Glossary of graph theory. 1 Hi sto ry See also:  History of the four color theorem and History of graph theory The rst results about graph coloring deal almost exclu- sively with planar graphs in the form of the coloring of maps . Whil e trying to colo r a map of the counti es of England, Francis Guthrie  postulated the four color con- jecture, noting that four colors were sucient to color the map so that no regions sha ring a common border re- cei ved the same color. Guthrie’s brothe r passed on the question to his mathematics teacher  Augustus de Mor- gan at  University College, who mentioned it in a letter to William Hamilton in 1852.  Arthur Cayley raised the problem at a meeting of the London Mathematical Soci- ety in 1879. The same year,  Alfred Kempe published a pap er tha t cla imed to estab lis h the re sult, and f or a de cad e the four color problem was considered solved. For his ac- complishment Kempe was elected a Fellow of the  Royal Society and later President of the London Mathematic al Society. [1] In 1890,  Heawood  pointed out that Kempe’s argument was wrong. How ever, in that pape r he pro ved the  five color theorem, saying that every planar map can be col- ored wi th no more than five colo rs, usin g ide as of Kempe. In the following century, a vast amount of work and the- ories were developed to reduce the number of colors to four, until the four color theorem was nally proved in 1976 by  Kenneth Appel  and  Wolfgang Haken. Th e proof went back to the ideas of Heawood and Kempe and largely disregarded the intervening developments. [2] The proof of the four color theorem is also noteworthy for be- ing the rst major computer-aided proof. In 1912,  Geor ge Da vid Bir kho  int rodu ced the 1

description

GRAPH

Transcript of Graph Coloring

  • Graph coloring

    A proper vertex coloring of the Petersen graph with 3 colors, theminimum number possible.

    In graph theory, graph coloring is a special case of graphlabeling; it is an assignment of labels traditionally calledcolors to elements of a graph subject to certain con-straints. In its simplest form, it is a way of coloring thevertices of a graph such that no two adjacent verticesshare the same color; this is called a vertex coloring.Similarly, an edge coloring assigns a color to each edgeso that no two adjacent edges share the same color, anda face coloring of a planar graph assigns a color to eachface or region so that no two faces that share a boundaryhave the same color.Vertex coloring is the starting point of the subject, andother coloring problems can be transformed into a vertexversion. For example, an edge coloring of a graph is justa vertex coloring of its line graph, and a face coloring of aplane graph is just a vertex coloring of its dual. However,non-vertex coloring problems are often stated and studiedas is. That is partly for perspective, and partly becausesome problems are best studied in non-vertex form, asfor instance is edge coloring.The convention of using colors originates from coloringthe countries of a map, where each face is literally col-ored. This was generalized to coloring the faces of agraph embedded in the plane. By planar duality it becamecoloring the vertices, and in this form it generalizes to allgraphs. In mathematical and computer representations, itis typical to use the rst few positive or nonnegative in-tegers as the colors. In general, one can use any niteset as the color set. The nature of the coloring problem

    depends on the number of colors but not on what they are.Graph coloring enjoys many practical applications as wellas theoretical challenges. Beside the classical types ofproblems, dierent limitations can also be set on thegraph, or on the way a color is assigned, or even on thecolor itself. It has even reached popularity with the gen-eral public in the form of the popular number puzzleSudoku. Graph coloring is still a very active eld of re-search.Note: Many terms used in this article are dened inGlossary of graph theory.

    1 HistorySee also: History of the four color theorem and Historyof graph theory

    The rst results about graph coloring deal almost exclu-sively with planar graphs in the form of the coloring ofmaps. While trying to color a map of the counties ofEngland, Francis Guthrie postulated the four color con-jecture, noting that four colors were sucient to colorthe map so that no regions sharing a common border re-ceived the same color. Guthries brother passed on thequestion to his mathematics teacher Augustus de Mor-gan at University College, who mentioned it in a letterto William Hamilton in 1852. Arthur Cayley raised theproblem at a meeting of the London Mathematical Soci-ety in 1879. The same year, Alfred Kempe published apaper that claimed to establish the result, and for a decadethe four color problem was considered solved. For his ac-complishment Kempe was elected a Fellow of the RoyalSociety and later President of the London MathematicalSociety.[1]

    In 1890, Heawood pointed out that Kempes argumentwas wrong. However, in that paper he proved the vecolor theorem, saying that every planar map can be col-ored with no more than ve colors, using ideas of Kempe.In the following century, a vast amount of work and the-ories were developed to reduce the number of colorsto four, until the four color theorem was nally provedin 1976 by Kenneth Appel and Wolfgang Haken. Theproof went back to the ideas of Heawood and Kempe andlargely disregarded the intervening developments.[2] Theproof of the four color theorem is also noteworthy for be-ing the rst major computer-aided proof.In 1912, George David Birkho introduced the

    1

  • 2 2 DEFINITION AND TERMINOLOGY

    chromatic polynomial to study the coloring problems,which was generalised to the Tutte polynomial by Tutte,important structures in algebraic graph theory. Kempehad already drawn attention to the general, non-planarcase in 1879,[3] and many results on generalisationsof planar graph coloring to surfaces of higher orderfollowed in the early 20th century.In 1960, Claude Berge formulated another conjectureabout graph coloring, the strong perfect graph conjecture,originally motivated by an information-theoretic conceptcalled the zero-error capacity of a graph introduced byShannon. The conjecture remained unresolved for 40years, until it was established as the celebrated strong per-fect graph theorem by Chudnovsky, Robertson, Seymour,and Thomas in 2002.Graph coloring has been studied as an algorithmic prob-lem since the early 1970s: the chromatic number problemis one of Karps 21 NP-complete problems from 1972,and at approximately the same time various exponential-time algorithms were developed based on backtrack-ing and on the deletion-contraction recurrence of Zykov(1949). One of the major applications of graph coloring,register allocation in compilers, was introduced in 1981.

    2 Denition and terminology

    This graph can be 3-colored in 12 dierent ways.

    2.1 Vertex coloring

    When used without any qualication, a coloring of agraph is almost always a proper vertex coloring, namelya labelling of the graphs vertices with colors such that notwo vertices sharing the same edge have the same color.Since a vertex with a loop (i.e. a connection directly backto itself) could never be properly colored, it is understoodthat graphs in this context are loopless.

    The terminology of using colors for vertex labels goesback to map coloring. Labels like red and blue are onlyused when the number of colors is small, and normally itis understood that the labels are drawn from the integers{1,2,3,...}.A coloring using at most k colors is called a (proper) k-coloring. The smallest number of colors needed to colora graph G is called its chromatic number, and is of-ten denoted (G). Sometimes (G) is used, since (G)is also used to denote the Euler characteristic of a graph.A graph that can be assigned a (proper) k-coloring is k-colorable, and it is k-chromatic if its chromatic num-ber is exactly k. A subset of vertices assigned to the samecolor is called a color class, every such class forms anindependent set. Thus, a k-coloring is the same as a par-tition of the vertex set into k independent sets, and theterms k-partite and k-colorable have the same meaning.

    2.2 Chromatic polynomial

    Main article: Chromatic polynomial

    The chromatic polynomial counts the number of ways agraph can be colored using no more than a given numberof colors. For example, using three colors, the graph inthe image to the right can be colored in 12 ways. Withonly two colors, it cannot be colored at all. With four col-ors, it can be colored in 24 + 412 = 72 ways: using allfour colors, there are 4! = 24 valid colorings (every as-signment of four colors to any 4-vertex graph is a propercoloring); and for every choice of three of the four col-ors, there are 12 valid 3-colorings. So, for the graph in theexample, a table of the number of valid colorings wouldstart like this:The chromatic polynomial is a functionP(G, t) that countsthe number of t-colorings ofG. As the name indicates, fora given G the function is indeed a polynomial in t. For theexample graph, P(G, t) = t(t 1)2(t 2), and indeed P(G,4) = 72.The chromatic polynomial includes at least as much infor-mation about the colorability of G as does the chromaticnumber. Indeed, is the smallest positive integer that isnot a root of the chromatic polynomial

    (G) = minfk : P (G; k) > 0g:

    2.3 Edge coloring

    Main article: Edge coloring

    An edge coloring of a graph is a proper coloring of theedges, meaning an assignment of colors to edges so thatno vertex is incident to two edges of the same color. An

  • 2.4 Total coloring 3

    All nonisomorphic graphs on 3 vertices and their chromatic poly-nomials. The empty graph E3 (red) admits a 1-coloring, the oth-ers admit no such colorings. The green graph admits 12 coloringswith 3 colors.

    edge coloring with k colors is called a k-edge-coloring andis equivalent to the problem of partitioning the edge setinto k matchings. The smallest number of colors neededfor an edge coloring of a graph G is the chromatic index,or edge chromatic number, (G). A Tait coloring is a

    3-edge coloring of a cubic graph. The four color theo-rem is equivalent to the assertion that every planar cubicbridgeless graph admits a Tait coloring.

    2.4 Total coloring

    Main article: Total coloring

    Total coloring is a type of coloring on the vertices andedges of a graph. When used without any qualication, atotal coloring is always assumed to be proper in the sensethat no adjacent vertices, no adjacent edges, and no edgeand its endvertices are assigned the same color. The totalchromatic number (G) of a graph G is the least numberof colors needed in any total coloring of G.

    2.5 Unlabeled coloringAn unlabeled coloring of a graph is an orbit of a coloringunder the action of the automorphism group of the graph.If we interpret a coloring of a graph on d vertices as a vec-tor inZd , the action of an automorphism is a permutationof the coecients of the coloring. There are analoguesof the chromatic polynomials which count the number ofunlabeled colorings of a graph from a given nite colorset.

    3 Properties

    3.1 Bounds on the chromatic number

    Assigning distinct colors to distinct vertices always yieldsa proper coloring, so

    1 (G) n:

    The only graphs that can be 1-colored are edgeless graphs.A complete graph Kn of n vertices requires (Kn) = ncolors. In an optimal coloring there must be at least one ofthe graphs m edges between every pair of color classes,so

    (G)((G) 1) 2m:

    If G contains a clique of size k, then at least k colors areneeded to color that clique; in other words, the chromaticnumber is at least the clique number:

    (G) !(G):

    For interval graphs this bound is tight.

  • 4 3 PROPERTIES

    The 2-colorable graphs are exactly the bipartite graphs,including trees and forests. By the four color theorem,every planar graph can be 4-colored.A greedy coloring shows that every graph can be coloredwith one more color than the maximum vertex degree,

    (G) (G) + 1:Complete graphs have (G) = n and (G) = n 1 ,and odd cycles have (G) = 3 and (G) = 2 , so forthese graphs this bound is best possible. In all other cases,the bound can be slightly improved; Brooks theorem[4]states that

    Brooks theorem: (G) (G) for a con-nected, simple graph G, unless G is a completegraph or an odd cycle.

    3.2 Graphs with high chromatic numberGraphs with large cliques have a high chromatic number,but the opposite is not true. The Grtzsch graph is anexample of a 4-chromatic graph without a triangle, andthe example can be generalised to the Mycielskians.

    Mycielskis Theorem (Alexander Zykov1949, Jan Mycielski 1955): There existtriangle-free graphs with arbitrarily highchromatic number.

    From Brookss theorem, graphs with high chromaticnumber must have high maximum degree. Another localproperty that leads to high chromatic number is the pres-ence of a large clique. But colorability is not an entirelylocal phenomenon: A graph with high girth looks locallylike a tree, because all cycles are long, but its chromaticnumber need not be 2:

    Theorem (Erds): There exist graphs of arbi-trarily high girth and chromatic number.

    3.3 Bounds on the chromatic indexAn edge coloring ofG is a vertex coloring of its line graphL(G) , and vice versa. Thus,

    0(G) = (L(G)):

    There is a strong relationship between edge colorabilityand the graphs maximum degree (G) . Since all edgesincident to the same vertex need their own color, we have

    0(G) (G):Moreover,

    Knigs theorem: 0(G) = (G) if G is bi-partite.

    In general, the relationship is even stronger than whatBrookss theorem gives for vertex coloring:

    Vizings Theorem: A graph of maximal de-gree has edge-chromatic number or +1.

    3.4 Other properties

    A graph has a k-coloring if and only if it has an acyclicorientation for which the longest path has length at most k;this is the GallaiHasseRoyVitaver theorem (Neetil& Ossona de Mendez 2012).For planar graphs, vertex colorings are essentially dual tonowhere-zero ows.About innite graphs, much less is known. The followingare two of the few results about innite graph coloring:

    If all nite subgraphs of an innite graph G are k-colorable, then so is G, under the assumption of theaxiom of choice. This is the de BruijnErds theo-rem of de Bruijn & Erds (1951).

    If a graph admits a full n-coloring for every n n0,it admits an innite full coloring (Fawcett 1978).

    3.5 Open problems

    The chromatic number of the plane, where two points areadjacent if they have unit distance, is unknown, althoughit is one of 4, 5, 6, or 7. Other open problems concern-ing the chromatic number of graphs include the Hadwigerconjecture stating that every graph with chromatic num-ber k has a complete graph on k vertices as a minor, theErdsFaberLovsz conjecture bounding the chromaticnumber of unions of complete graphs that have at exactlyone vertex in common to each pair, and the Albertsonconjecture that among k-chromatic graphs the completegraphs are the ones with smallest crossing number.When Birkho and Lewis introduced the chromatic poly-nomial in their attack on the four-color theorem, theyconjectured that for planar graphs G, the polynomialP (G; t) has no zeros in the region [4;1) . Although it isknown that such a chromatic polynomial has no zeros inthe region [5;1) and that P (G; 4) 6= 0 , their conjectureis still unresolved. It also remains an unsolved problemto characterize graphs which have the same chromaticpolynomial and to determine which polynomials are chro-matic.

  • 4.4 Greedy coloring 5

    4 Algorithms

    4.1 Polynomial timeDetermining if a graph can be colored with 2 colorsis equivalent to determining whether or not the graphis bipartite, and thus computable in linear time usingbreadth-rst search. More generally, the chromatic num-ber and a corresponding coloring of perfect graphs canbe computed in polynomial time using semidenite pro-gramming. Closed formulas for chromatic polynomialare known for many classes of graphs, such as forests,chordal graphs, cycles, wheels, and ladders, so these canbe evaluated in polynomial time.If the graph is planar and has low branchwidth (or is non-planar but with a known branch decomposition), then itcan be solved in polynomial time using dynamic program-ming. In general, the time required is polynomial in thegraph size, but exponential in the branchwidth.

    4.2 Exact algorithmsBrute-force search for a k-coloring considers each of thekn assignments of k colors to n vertices and checks foreach if it is legal. To compute the chromatic number andthe chromatic polynomial, this procedure is used for ev-ery k = 1; : : : ; n1 , impractical for all but the smallestinput graphs.Using dynamic programming and a bound on the num-ber of maximal independent sets, k-colorability can bedecided in time and space O(2:445n) .[6] Using the prin-ciple of inclusionexclusion and Yatess algorithm forthe fast zeta transform, k-colorability can be decided intime O(2nn) [5] for any k. Faster algorithms are knownfor 3- and 4-colorability, which can be decided in timeO(1:3289n) [7] and O(1:7272n) ,[8] respectively.

    4.3 ContractionThe contraction G/uv of graph G is the graph obtainedby identifying the vertices u and v, removing any edgesbetween them, and replacing them with a single vertexw where any edges that were incident on u or v are redi-rected to w. This operation plays a major role in the anal-ysis of graph coloring.The chromatic number satises the recurrence relation:

    (G) = minf(G+ uv); (G/uv)gdue to Zykov (1949), where u and v are nonadjacent ver-tices,G+uv is the graph with the edge uv added. Severalalgorithms are based on evaluating this recurrence, the re-sulting computation tree is sometimes called a Zykov tree.The running time is based on the heuristic for choosingthe vertices u and v.

    The chromatic polynomial satises following recurrencerelation

    P (G uv; k) = P (G/uv; k) + P (G; k)where u and v are adjacent vertices and G uv is thegraph with the edge uv removed. P (G uv; k) rep-resents the number of possible proper colorings of thegraph, when the vertices may have same or dierent col-ors. The number of proper colorings therefore come fromthe sum of two graphs. If the vertices u and v have dif-ferent colors, then we can as well consider a graph, whereu and v are adjacent. If u and v have the same colors,we may as well consider a graph, where u and v are con-tracted. Tuttes curiosity about which other graph proper-ties satised this recurrence led him to discover a bivari-ate generalization of the chromatic polynomial, the Tuttepolynomial.The expressions give rise to a recursive procedure, calledthe deletioncontraction algorithm, which forms the basisof many algorithms for graph coloring. The running timesatises the same recurrence relation as the Fibonaccinumbers, so in the worst case, the algorithm runs intime within a polynomial factor of ((1 +

    p5)/2)n+m =

    O(1:6180n+m) for n vertices and m edges.[9] The analy-sis can be improved to within a polynomial factor of thenumber t(G) of spanning trees of the input graph.[10] Inpractice, branch and bound strategies and graph isomor-phism rejection are employed to avoid some recursivecalls, the running time depends on the heuristic used topick the vertex pair.

    4.4 Greedy coloringMain article: Greedy coloringThe greedy algorithm considers the vertices in a specic

    1

    2

    3

    4

    5

    6

    7

    8

    1

    3

    5

    7

    2

    4

    6

    8

    Two greedy colorings of the same graph using dierent vertexorders. The right example generalises to 2-colorable graphs withn vertices, where the greedy algorithm expends n/2 colors.

    order v1 ,, vn and assigns to vi the smallest availablecolor not used by vi s neighbours among v1 ,, vi1 ,adding a fresh color if needed. The quality of the result-ing coloring depends on the chosen ordering. There exists

  • 6 4 ALGORITHMS

    an ordering that leads to a greedy coloring with the opti-mal number of (G) colors. On the other hand, greedycolorings can be arbitrarily bad; for example, the crowngraph on n vertices can be 2-colored, but has an orderingthat leads to a greedy coloring with n/2 colors.For chordal graphs, and for special cases of chordalgraphs such as interval graphs and indierence graphs,the greedy coloring algorithm can be used to nd optimalcolorings in polynomial time, by choosing the vertex or-dering to be the reverse of a perfect elimination orderingfor the graph. The perfectly orderable graphs generalizethis property, but it is NP-hard to nd a perfect orderingof these graphs.If the vertices are ordered according to their degrees, theresulting greedy coloring uses at most maximin fd(xi)+1; ig colors, at most one more than the graphs maximumdegree. This heuristic is sometimes called the WelshPowell algorithm.[11] Another heuristic due to Brlaz es-tablishes the ordering dynamically while the algorithmproceeds, choosing next the vertex adjacent to the largestnumber of dierent colors.[12] Many other graph color-ing heuristics are similarly based on greedy coloring fora specic static or dynamic strategy of ordering the ver-tices, these algorithms are sometimes called sequentialcoloring algorithms.

    4.5 Parallel and distributed algorithms

    In the eld of distributed algorithms, graph coloring isclosely related to the problem of symmetry breaking. Thecurrent state-of-the-art randomized algorithms are fasterfor suciently large maximum degree than determin-istic algorithms. The fastest randomized algorithms em-ploy the multi-trials technique by Schneider et al.[13]

    In a symmetric graph, a deterministic distributed algo-rithm cannot nd a proper vertex coloring. Some auxil-iary information is needed in order to break symmetry.A standard assumption is that initially each node has aunique identier, for example, from the set {1, 2, ..., n}.Put otherwise, we assume that we are given an n-coloring.The challenge is to reduce the number of colors from nto, e.g., + 1. The more colors are employed, e.g. O()instead of + 1, the fewer communication rounds arerequired.[13]

    A straightforward distributed version of the greedy algo-rithm for ( + 1)-coloring requires (n) communicationrounds in the worst case information may need to bepropagated from one side of the network to another side.The simplest interesting case is an n-cycle. Richard Coleand Uzi Vishkin[14] show that there is a distributed algo-rithm that reduces the number of colors from n to O(logn) in one synchronous communication step. By iteratingthe same procedure, it is possible to obtain a 3-coloring ofan n-cycle in O(log* n) communication steps (assumingthat we have unique node identiers).

    The function log*, iterated logarithm, is an extremelyslowly growing function, almost constant. Hence theresult by Cole and Vishkin raised the question of whetherthere is a constant-time distribute algorithm for 3-coloringan n-cycle. Linial (1992) showed that this is not possible:any deterministic distributed algorithm requires (log*n) communication steps to reduce an n-coloring to a 3-coloring in an n-cycle.The technique by Cole and Vishkin can be applied in ar-bitrary bounded-degree graphs as well; the running timeis poly() + O(log* n).[15] The technique was extendedto unit disk graphs by Schneider et al.[16] The fastest de-terministic algorithms for ( + 1)-coloring for small are due to Leonid Barenboim, Michael Elkin and FabianKuhn.[17] The algorithm by Barenboim et al. runs in timeO() + log*(n)/2, which is optimal in terms of n sincethe constant factor 1/2 cannot be improved due to Linialslower bound. Panconesi et al.[18] use network decompo-sitions to compute a +1 coloring in time 2O

    plogn

    .

    The problem of edge coloring has also been studied inthe distributed model. Panconesi & Rizzi (2001) achievea (2 1)-coloring in O( + log* n) time in this model.The lower bound for distributed vertex coloring due toLinial (1992) applies to the distributed edge coloringproblem as well.

    4.6 Decentralized algorithms

    Decentralized algorithms are ones where no messagepassing is allowed (in contrast to distributed algorithmswhere local message passing takes places), and ecientdecentralized algorithms exist that will color a graph ifa proper coloring exists. These assume that a vertex isable to sense whether any of its neighbors are using thesame color as the vertex i.e., whether a local conict ex-ists. This is a mild assumption in many applications e.g.in wireless channel allocation it is usually reasonable toassume that a station will be able to detect whether otherinterfering transmitters are using the same channel (e.g.by measuring the SINR). This sensing information is suf-cient to allow algorithms based on learning automata tond a proper graph coloring with probability one, e.g. seeLeith (2006) and Duy (2008).

    4.7 Computational complexity

    Graph coloring is computationally hard. It is NP-complete to decide if a given graph admits a k-coloringfor a given k except for the cases k = 1 and k = 2. In partic-ular, it is NP-hard to compute the chromatic number.[19]The 3-coloring problem remains NP-complete even onplanar graphs of degree 4.[20]

    The best known approximation algorithm computes a col-oring of size at most within a factor O(n(log n)3(log logn)2) of the chromatic number.[21] For all > 0, approxi-

  • 5.3 Other applications 7

    mating the chromatic number within n1 is NP-hard.[22]

    It is also NP-hard to color a 3-colorable graph with 4colors[23] and a k-colorable graph with k(log k ) / 25 colorsfor suciently large constant k.[24]

    Computing the coecients of the chromatic polynomialis #P-hard. In fact, even computing the value of (G; k)is #P-hard at any rational point k except for k = 1 and k= 2.[25] There is no FPRAS for evaluating the chromaticpolynomial at any rational point k 1.5 except for k = 2unless NP = RP.[26]

    For edge coloring, the proof of Vizings result gives an al-gorithm that uses at most +1 colors. However, decidingbetween the two candidate values for the edge chromaticnumber is NP-complete.[27] In terms of approximationalgorithms, Vizings algorithm shows that the edge chro-matic number can be approximated to within 4/3, and thehardness result shows that no (4/3 )-algorithm existsfor any > 0 unless P = NP. These are among the oldestresults in the literature of approximation algorithms, eventhough neither paper makes explicit use of that notion.[28]

    5 Applications

    5.1 SchedulingVertex coloring models to a number of schedulingproblems.[29] In the cleanest form, a given set of jobs needto be assigned to time slots, each job requires one suchslot. Jobs can be scheduled in any order, but pairs of jobsmay be in conict in the sense that they may not be as-signed to the same time slot, for example because theyboth rely on a shared resource. The corresponding graphcontains a vertex for every job and an edge for every con-icting pair of jobs. The chromatic number of the graphis exactly the minimum makespan, the optimal time tonish all jobs without conicts.Details of the scheduling problem dene the structureof the graph. For example, when assigning aircraft toights, the resulting conict graph is an interval graph,so the coloring problem can be solved eciently. Inbandwidth allocation to radio stations, the resulting con-ict graph is a unit disk graph, so the coloring problem is3-approximable.

    5.2 Register allocationMain article: Register allocation

    A compiler is a computer program that translates onecomputer language into another. To improve the exe-cution time of the resulting code, one of the techniquesof compiler optimization is register allocation, where themost frequently used values of the compiled program arekept in the fast processor registers. Ideally, values are

    assigned to registers so that they can all reside in the reg-isters when they are used.The textbook approach to this problem is to model it as agraph coloring problem.[30] The compiler constructs aninterference graph, where vertices are variables and anedge connects two vertices if they are needed at the sametime. If the graph can be colored with k colors then anyset of variables needed at the same time can be stored inat most k registers.

    5.3 Other applicationsThe problem of coloring a graph has found a number ofapplications, including pattern matching.The recreational puzzle Sudoku can be seen as complet-ing a 9-coloring on given specic graph with 81 vertices.

    6 Other colorings

    6.1 Ramsey theoryMain article: Ramsey theory

    An important class of improper coloring problems is stud-ied in Ramsey theory, where the graphs edges are as-signed to colors, and there is no restriction on the colorsof incident edges. A simple example is the friendshiptheorem, which states that in any coloring of the edgesof K6 the complete graph of six vertices there will be amonochromatic triangle; often illustrated by saying thatany group of six people either has three mutual strangersor three mutual acquaintances. Ramsey theory is con-cerned with generalisations of this idea to seek regular-ity amid disorder, nding general conditions for the exis-tence of monochromatic subgraphs with given structure.

    6.2 Other coloringsColoring can also be considered for signed graphs andgain graphs.

    7 See also Edge coloring Circular coloring Critical graph Graph homomorphism Hajs construction Mathematics of Sudoku

  • 8 9 REFERENCES

    Multipartite graph Uniquely colorable graph Graph coloring game

    8 Notes[1] M. Kubale, History of graph coloring, in Kubale (2004)

    [2] van Lint & Wilson (2001, Chap. 33)

    [3] Jensen & Toft (1995), p. 2

    [4] Brooks (1941)

    [5] Bjrklund, Husfeldt & Koivisto (2009)

    [6] Lawler (1976)

    [7] Beigel & Eppstein (2005)

    [8] Fomin, Gaspers & Saurabh (2007)

    [9] Wilf (1986)

    [10] Sekine, Imai & Tani (1995)

    [11] Welsh & Powell (1967)

    [12] Brlaz (1979)

    [13] Schneider (2010)

    [14] Cole & Vishkin (1986), see also Cormen, Leiserson &Rivest (1990, Section 30.5)

    [15] Goldberg, Plotkin & Shannon (1988)

    [16] Schneider (2008)

    [17] Barenboim & Elkin (2009); Kuhn (2009)

    [18] Panconesi (1995)

    [19] Garey, Johnson & Stockmeyer (1974); Garey & Johnson(1979).

    [20] Dailey (1980)

    [21] Halldrsson (1993)

    [22] Zuckerman (2007)

    [23] Guruswami & Khanna (2000)

    [24] Khot (2001)

    [25] Jaeger, Vertigan & Welsh (1990)

    [26] Goldberg & Jerrum (2008)

    [27] Holyer (1981)

    [28] Crescenzi & Kann (1998)

    [29] Marx (2004)

    [30] Chaitin (1982)

    9 References Barenboim, L.; Elkin, M. (2009), Distributed ( +

    1)-coloring in linear (in ) time, Proceedings of the41st Symposium on Theory of Computing, pp. 111120, doi:10.1145/1536414.1536432, ISBN 978-1-60558-506-2

    Panconesi, A.; Srinivasan, A. (1996), On thecomplexity of distributed network decomposition,Journal of Algorithms 20

    Schneider, J. (2010), A new technique for dis-tributed symmetry breaking, Proceedings of theSymposium on Principles of Distributed Computing

    Schneider, J. (2008), A log-star distributed maxi-mal independent set algorithm for growth-boundedgraphs, Proceedings of the Symposium on Principlesof Distributed Computing

    Beigel, R.; Eppstein, D. (2005), 3-coloring in timeO(1.3289n)", Journal of Algorithms 54 (2)): 168204, doi:10.1016/j.jalgor.2004.06.008

    Bjrklund, A.; Husfeldt, T.; Koivisto, M. (2009),Set partitioning via inclusionexclusion,SIAM Journal on Computing 39 (2): 546563,doi:10.1137/070683933

    Brlaz, D. (1979), New methods to color the ver-tices of a graph, Communications of the ACM 22(4): 251256, doi:10.1145/359094.359101

    Brooks, R. L.; Tutte, W. T. (1941), On colour-ing the nodes of a network, Proceedings of theCambridge Philosophical Society 37 (2): 194197,doi:10.1017/S030500410002168X

    de Bruijn, N. G.; Erds, P. (1951), A colour prob-lem for innite graphs and a problem in the theoryof relations, Nederl. Akad. Wetensch. Proc. Ser. A54: 371373 (= Indag. Math. 13)

    Byskov, J.M. (2004), Enumerating maximal in-dependent sets with applications to graph colour-ing, Operations Research Letters 32 (6): 547556,doi:10.1016/j.orl.2004.03.002

    Chaitin, G. J. (1982), Register allocation & spillingvia graph colouring, Proc. 1982 SIGPLAN Sym-posium on Compiler Construction, pp. 98105,doi:10.1145/800230.806984, ISBN 0-89791-074-5

    Cole, R.; Vishkin, U. (1986), Deterministic cointossing with applications to optimal parallel listranking, Information and Control 70 (1): 3253,doi:10.1016/S0019-9958(86)80023-7

  • 9 Cormen, T. H.; Leiserson, C. E.; Rivest, R. L.(1990), Introduction to Algorithms (1st ed.), TheMIT Press

    Dailey, D. P. (1980), Uniqueness of colorabilityand colorability of planar 4-regular graphs are NP-complete, Discrete Mathematics 30 (3): 289293,doi:10.1016/0012-365X(80)90236-8

    Duy, K.; O'Connell, N.; Sapozhnikov, A. (2008),Complexity analysis of a decentralised graphcolouring algorithm, Information Processing Letters107 (2): 6063, doi:10.1016/j.ipl.2008.01.002

    Fawcett, B. W. (1978), On innite full colouringsof graphs, Can. J. Math. XXX: 455457

    Fomin, F.V.; Gaspers, S.; Saurabh, S. (2007),Improved Exact Algorithms for Counting 3- and4-Colorings, Proc. 13th Annual InternationalConference, COCOON 2007, Lecture Notes inComputer Science 4598, Springer, pp. 6574,doi:10.1007/978-3-540-73545-8_9, ISBN 978-3-540-73544-1

    Garey, M. R.; Johnson, D. S. (1979), Computersand Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman, ISBN 0-7167-1045-5

    Garey, M. R.; Johnson, D. S.; Stockmeyer,L. (1974), Some simplied NP-complete prob-lems, Proceedings of the Sixth Annual ACM Sym-posium on Theory of Computing, pp. 4763,doi:10.1145/800119.803884

    Goldberg, L. A.; Jerrum, M. (July 2008),Inapproximability of the Tutte polynomial,Information and Computation 206 (7): 908929,doi:10.1016/j.ic.2008.04.003

    Goldberg, A. V.; Plotkin, S. A.; Shannon, G.E. (1988), Parallel symmetry-breaking in sparsegraphs, SIAM Journal on Discrete Mathematics 1(4): 434446, doi:10.1137/0401044

    Guruswami, V.; Khanna, S. (2000), On thehardness of 4-coloring a 3-colorable graph,Proceedings of the 15th Annual IEEE Conferenceon Computational Complexity, pp. 188197,doi:10.1109/CCC.2000.856749, ISBN 0-7695-0674-7

    Halldrsson, M. M. (1993), A still better per-formance guarantee for approximate graph color-ing, Information Processing Letters 45: 1923,doi:10.1016/0020-0190(93)90246-6

    Holyer, I. (1981), The NP-completeness of edge-coloring, SIAM Journal on Computing 10 (4): 718720, doi:10.1137/0210055

    Crescenzi, P.; Kann, V. (December 1998), How tond the best approximation results a follow-up toGarey and Johnson, ACM SIGACTNews 29 (4): 90,doi:10.1145/306198.306210

    Jaeger, F.; Vertigan, D. L.; Welsh, D. J. A. (1990),On the computational complexity of the Jones andTutte polynomials, Mathematical Proceedings ofthe Cambridge Philosophical Society 108: 3553,doi:10.1017/S0305004100068936

    Jensen, T. R.; Toft, B. (1995), Graph Coloring Prob-lems, Wiley-Interscience, New York, ISBN 0-471-02865-7

    Khot, S. (2001), Improved inapproximability re-sults for MaxClique, chromatic number and ap-proximate graph coloring, Proc. 42nd AnnualSymposium on Foundations of Computer Science, pp.600609, doi:10.1109/SFCS.2001.959936, ISBN0-7695-1116-3

    Kubale, M. (2004), Graph Colorings, AmericanMathematical Society, ISBN 0-8218-3458-4

    Kuhn, F. (2009), Weak graph colorings: dis-tributed algorithms and applications, Proceed-ings of the 21st Symposium on Parallelism inAlgorithms and Architectures, pp. 138144,doi:10.1145/1583991.1584032, ISBN 978-1-60558-606-9

    Lawler, E.L. (1976), A note on the complexity ofthe chromatic number problem, Information Pro-cessing Letters 5 (3): 6667, doi:10.1016/0020-0190(76)90065-X

    Leith, D.J.; Cliord, P. (2006), A Self-ManagedDistributed Channel Selection Algorithm forWLAN, Proc. RAWNET 2006, Boston, MA

    Linial, N. (1992), Locality in distributed graph al-gorithms, SIAM Journal on Computing 21 (1): 193201, doi:10.1137/0221015

    van Lint, J. H.; Wilson, R. M. (2001), A Coursein Combinatorics (2nd ed.), Cambridge UniversityPress, ISBN 0-521-80340-3

    Marx, Dniel (2004), Graph colouring problemsand their applications in scheduling, PeriodicaPolytechnica, Electrical Engineering 48 (12), pp.1116, CiteSeerX: 10 .1 .1 .95 .4268

    Mycielski, J. (1955), Sur le coloriage des graphes,Colloq. Math. 3: 161162.

    Neetil, Jaroslav; Ossona de Mendez, Patrice(2012), Theorem 3.13, Sparsity: Graphs,Structures, and Algorithms, Algorithms and Com-binatorics 28, Heidelberg: Springer, p. 42,doi:10.1007/978-3-642-27875-4, ISBN 978-3-642-27874-7, MR 2920058.

  • 10 10 EXTERNAL LINKS

    Panconesi, Alessandro; Rizzi, Romeo (2001),Some simple distributed algorithms for sparsenetworks, Distributed Computing (Berlin,New York: Springer-Verlag) 14 (2): 97100,doi:10.1007/PL00008932, ISSN 0178-2770

    Sekine, K.; Imai, H.; Tani, S. (1995), Computingthe Tutte polynomial of a graph of moderate size,Proc. 6th International Symposium on Algorithmsand Computation (ISAAC 1995), Lecture Notes inComputer Science 1004, Springer, pp. 224233,doi:10.1007/BFb0015427, ISBN 3-540-60573-8

    Welsh, D. J. A.; Powell, M. B. (1967), An upperbound for the chromatic number of a graph and itsapplication to timetabling problems, The ComputerJournal 10 (1): 8586, doi:10.1093/comjnl/10.1.85

    West, D. B. (1996), Introduction to Graph Theory,Prentice-Hall, ISBN 0-13-227828-6

    Wilf, H. S. (1986), Algorithms and Complexity,PrenticeHall

    Zuckerman, D. (2007), Linear degree extractorsand the inapproximability of Max Clique and Chro-matic Number, Theory of Computing 3: 103128,doi:10.4086/toc.2007.v003a006

    Zykov, A. A. (1949), " (On some properties of lin-ear complexes)", Math. Sbornik. (in Russian),24(66) (2): 163188

    Jensen, Tommy R.; Toft, Bjarne (1995), GraphColoring Problems, John Wiley & Sons, ISBN9780471028659

    Normann, Per (2014), Parallel Graph Coloring,DIVA, ISSN 1401-5757

    10 External links Graph Coloring Page by Joseph Culberson (graph

    coloring programs) CoLoRaTiOn by Jim Andrews and Mike Fellows is

    a graph coloring puzzle

    Links to Graph Coloring source codes Code for eciently computing Tutte, Chromatic

    and Flow Polynomials by Gary Haggard, David J.Pearce and Gordon Royle

    Graph Coloring Web Application

  • 11

    11 Text and image sources, contributors, and licenses11.1 Text

    Graph coloring Source: http://en.wikipedia.org/wiki/Graph%20coloring?oldid=641183104 Contributors: Michael Hardy, Booyabazooka,Suisui, Charles Matthews, Dcoetzee, Dysprosia, Doradus, McKay, Optim, Phil Boswell, Robbot, Ke4roh, Altenmann, Kuszi, May-ooranathan, MathMartin, Thesilverbail, Saforrest, Nitishkorula, Giftlite, Mellum, Galaxy07, Sam Hocevar, Peter Kwok, Guybrush, Corti,Xrchz, Abelson, ZeroOne, Zaslav, S.K., CanisRufus, Drange net, HasharBot, Jrme, Fawcett5, Caesura, Hlg, Gene Nygaard, Oleg Alexan-drov, GregorB, Terryn3, Adking80, Rjwilmsi, Wikirao, Arbor, Chris Pressey, Chobot, YurikBot, Michael Slone, Chris Capoccia, Hv,Cheeser1, Bota47, Galeru, Ott2, Lycaon, David Jordan, Claygate, SmackBot, Zanetu, Kostmo, VMS Mosaic, Cybercobra, Flyingspuds,Ligulembot, Geeee, Superdosh, Shirifan, Lyonsam, Hiiiiiiiiiiiiiiiiiiiii, Nialsh, Aeons, CRGreathouse, CmdrObot, Thijs!bot, Mbell, Head-bomb, Lyondif02, AgentPeppermint, Escarbot, Hermel, David Eppstein, JaGa, AgarwalSumeet, Idioma-bot, BB-Froggy, Ptrillian, TXiK-iBoT, Lwr314, Rei-bot, Maxim, Jamelan, Eubulides, Homei, Robert Samal, Mjaredd, Gerakibot, Antonio Lopez, Anchor Link Bot,Glomerule, -Midorihana-, Tonkawa68, Bender2k14, Beta79, Gazimo, Addbot, DOI bot, Alexs2008, , Luckas-bot, Yobot, TaBOT-zerem, AnomieBOT, Citation bot, David.daileyatsrudotedu, Joshxyz, ArthurBot, LilHelpa, Alex Dainiak, ChildofMidnight, Gilo1969,SausageLady, Miym, Thore Husfeldt, Nick twisper, Lunae, OgreBot, Citation bot 1, MastiBot, RobinK, Kapgains, TobeBot, Timdu-mol, Vmohanaraj, DuineSidhe, EmausBot, John of Reading, Dd4932, Wikipelli, ZroBot, Fred Gandt, ChuispastonBot, Mjbmrbot, Clue-Bot NG, Wikiko, Jrdan, Frietjes, Rezabot, Helpful Pixie Bot, Silvrous, Jozefgajdos, CitationCleanerBot, Arpi Ter-Araqelyan, Enzai-Bot, TeleTeddy, Roll-Morton, Jochen Burghardt, Jalal476, Nina Cerutti, Wierdcowman, Bg9989, Atiliogomes, Mats.sxz, Briansdumb, ElCharpi, Jplauri and Anonymous: 102

    11.2 Images File:3-coloringEx.svg Source: http://upload.wikimedia.org/wikipedia/commons/b/b7/3-coloringEx.svg License: CC-BY-SA-3.0 Con-

    tributors: vector version of Image:3-coloringEx.png Original artist: ? File:Chromatic_polynomial_of_all_3-vertex_graphs.png Source: http://upload.wikimedia.org/wikipedia/en/b/b6/Chromatic_

    polynomial_of_all_3-vertex_graphs.png License: CC-BY-SA-3.0 Contributors:I created this work entirely by myself.Original artist:Thore Husfeldt (talk)

    File:Commons-logo.svg Source: http://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: ? Contributors: ? Originalartist: ?

    File:Graph_with_all_three-colourings_2.svg Source: http://upload.wikimedia.org/wikipedia/commons/b/b7/Graph_with_all_three-colourings_2.svg License: CC-BY-SA-3.0 Contributors: :Image:Graph with all three-colourings.png made by User:Arbor Originalartist: Arbor at English Wikipedia (PNG le), Booyabazooka at English Wikipedia (corrections + SVG conversion)

    File:Greedy_colourings.svg Source: http://upload.wikimedia.org/wikipedia/commons/0/00/Greedy_colourings.svg License: CC BY-SA3.0 Contributors: Own work Original artist: Thore Husfeldt

    File:Petersen_graph_3-coloring.svg Source: http://upload.wikimedia.org/wikipedia/commons/9/90/Petersen_graph_3-coloring.svg Li-cense: Public domain Contributors: ? Original artist: ?

    11.3 Content license Creative Commons Attribution-Share Alike 3.0

    HistoryDefinition and terminologyVertex coloringChromatic polynomialEdge coloringTotal coloringUnlabeled coloring

    PropertiesBounds on the chromatic numberGraphs with high chromatic numberBounds on the chromatic indexOther propertiesOpen problems

    AlgorithmsPolynomial timeExact algorithmsContractionGreedy coloringParallel and distributed algorithmsDecentralized algorithmsComputational complexity

    ApplicationsSchedulingRegister allocationOther applications

    Other coloringsRamsey theoryOther colorings

    See also NotesReferences External links Text and image sources, contributors, and licensesTextImagesContent license