TOPIC: Explain graph coloring and various methods to find out chromatic number of a graph and uses of graph coloring in daily routine



Acknowledgment First of all I would like to thank my subject teacher Ms.Mandeep Kaur for assigning me this topic as my term paper. Then I will thank the librarian and my friends for all their support and encouragement given to me. I am grateful to every person who helped and guided me to complete my term paper.

INDEX Topic Graph coloring Vertex coloring Edge coloring Chromatic number Methods to find chromatic number Applications of graph coloring Bibliography 4 5 6 7 9 11 18 page no

A graph has been colored if a color has been assigned to each vertex in such a way that adjacent vertices have different colors.

Chromatic Number: The chromatic number of a graph is the smallest number of colors with which it can be colored. In graph theory, graph coloring is a special case of graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints. In its simplest form, 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 graph 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 version. For example, an edge coloring of a graph is just a vertex coloring of its line graph, and a face coloring of a planar graph is just a vertex coloring of its planar dual. However, non-vertex coloring problems are often stated and studied as is. That is partly for perspective, 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 colored. This was generalized to coloring the faces of a graph embedded in the plane. By planar duality it became coloring the vertices, and in this form it generalizes to all graphs. In mathematical and computer representations it is typical to use the first few positive or nonnegative integers as the "colors". In general one can use any finite set as the "color set". The nature of the coloring problem depends on the number of colors but not on what they are.

Vertex coloring

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

When used without any qualification, a coloring of a graph is almost always a proper vertex coloring, namely a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. Since a vertex with a loop could never be properly colored, it is understood that graphs in this context are loop less. The terminology of using colors for vertex labels goes back to map coloring. Labels like red and blue are only used when the number of colors is small, and normally it is 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 color a graph G is called its chromatic number, χ(G). A graph that can be assigned a (proper) k-coloring is k-colorable, and it is k-chromatic if its chromatic number is exactly k. A subset of vertices assigned to the same color is called a color class, every such class forms an independent set. Thus, a k-coloring is the same as a partition of the vertex set into k independent sets, and the terms k-partite and k-colorable have the same meaning.

Edge coloring

3-edge-coloring of Desargues graph. In graph theory, an edge coloring of a graph is an assignment of “colors” to the edges of the graph so that no two adjacent edges have the same color. For example, the figure to the right shows an edge coloring of a graph by the colors red, blue, and green. Edge colorings are one of several different types of graph coloring. The edge-coloring problem asks whether it is possible to color a given graph using at most n colors. The minimum required number of colors for a graph is called the chromatic index. For example, the graph on the right can be colored by three colors but cannot be colored by two colors, and thus has chromatic index three.

Chromatic number

 The chromatic number of a graph is the minimum number of colors one can use to color the vertices of the graph so that no two adjacent vertices are the same color.  If the chromatic number of a graph is two, then it is called bipartite.

The chromatic number of a graph is the smallest number of colors needed to color the vertices of so that no two adjacent vertices share the same color (Skiena 1990, p. 210), i.e., the smallest value of possible to obtain a k-coloring. Minimal colorings and chromatic numbers for a sample of graphs are illustrated above. The chromatic number can be computed using Chromatic Number[g] in the Mathematica package Combinatorica`) . Similarly, a minimal coloring can be found using Minimum Vertex Coloring[g]. Pre computed chromatic numbers for many named graphs can be obtained using Graph Data[graph, "Chromatic Number"].

The chromatic number of a graph is also the smallest positive integer such that the chromatic polynomial . Calculating the chromatic number of a graph is an NP-complete problem (Skiena 1990, pp. 211-212). Or, in the words of Harary (1994, p. 127), "no convenient method is known for determining the chromatic number of an arbitrary graph." The chromatic number of a graph must be greater than or equal to its clique number. A graph is called a perfect graph if, for each of its induced sub graphs , the chromatic number of equals the largest number of pairwise adjacent vertices in . A graph with chromatic number two is said to be bicolorable, and a graph with chromatic number three is said to be three-colorable. In general, a graph with chromatic number is said to be a kchromatic graph, and a graph with chromatic number is said to be k-colorable. The following table gives the chromatic number for familiar classes of graphs. graph complete graph cycle graph star graph wheel graph , , , 2

For any two positive integers and , there exists a graph of girth at least and chromatic number at least (Erdős 1961; Lovász 1968; Skiena 1990, p. 215). The chromatic number of a surface of genus is given by the Heawood conjecture,

Where is the floor function. is sometimes also denoted (which is unfortunate, since commonly refers to the Euler characteristic). For , 1, ..., the first few values of are 4, 7, 8, 9, 10, 11, 12, 12, 13, 13, 14, 15, 15, 16, ... (Sloane's A000934). Erdős (1959) proved that there are graphs with arbitrarily large girth and chromatic number (Bollobás and West 2000).

Various methods to find out chromatic number of graph:

By using the minimum number of color as possible to color different vertices. We can get the chromatic number of the graph

2. Chromatic polynomial

All non isomorphic graphs on 3 vertices and their chromatic polynomials. The empty graph E3 (red) admits a 1coloring, the others admit no such colorings. The green graph admits 12 colorings with 3 colors.

The chromatic polynomial counts the number of ways a graph can be colored using no more than a given number of colors. For example, using three colors, the graph in the image to the right can be colored in 12 ways. With only two colors, it cannot be colored at all. With four colors, it can be colored in 24 + 4⋅12 = 72 ways: using all four colors, there are 4! = 24 valid colorings (every assignment of four colors to any 4-vertex graph is a proper coloring); and for every choice of three of the four colors, there are 12 valid 3-colorings. So, for the graph in the example, a table of the number of valid colorings would start like this: Available colors 12 3 4 …

Number of colorings 0 0 12 72 … The chromatic polynomial is a function P(G, t) that counts the number of t-colorings of G. As the name indicates, for a given G the function is indeed a polynomial in t. For the example graph, P(G, t) = t(t − 1)2(t − 2), and indeed P(G, 4) = 72. The chromatic polynomial includes at least as much information about the colorability of G as does the chromatic number. Indeed, χ is the smallest positive integer that is not a root of the chromatic polynomial χ(G) = min{k:P(G,k) > 0}. Chromatic polynomials for certain graphs Triangle K3 t(t − 1)(t − 2)

Complete graph Kn

Tree with n vertice t(t − 1)n – 1 s Cycle Cn Petersen graph (t − 1)n + ( − 1)n(t − 1) t(t − 1)(t − 2)(t7 − 12t6 + 67t5 − 230t4 + 529t3 − 814t2 + 775t − 352)

Four-Color Theorem
The four-color theorem states that any map in a plane can be colored using four-colors in such a way that regions sharing a common boundary (other than a single point) do not share the same color. This problem is sometimes also called Guthrie's problem after F. Guthrie, who first conjectured the theorem in 1852. The conjecture was then communicated to de Morgan and thence into the general community. In 1878, Cayley wrote the first paper on the conjecture. Fallacious proofs were given independently by Kempe (1879) and Tait (1880). Kempe's proof was accepted for a decade until Heawood showed an error using a map with 18 faces (although a map with nine faces suffices to show the fallacy). The Heawood conjecture provided a very

general assertion for map coloring, showing that in a genus 0 space (including the sphere or plane), four colors suffice. Ringel and Youngs (1968) proved that for genus , the upper bound provided by the Heawood conjecture also give the necessary number of colors, with the exception of the Klein bottle (for which the Heawood formula gives seven, but the correct bound is six). Six colors can be proven to suffice for the case, and this number can easily be reduced to five, but reducing the number of colors all the way to four proved very difficult. This result was finally obtained by Appel and Haken (1977), who constructed a computer-assisted proof that four colors were sufficient. However, because part of the proof consisted of an exhaustive analysis of many discrete cases by a computer, some mathematicians do not accept it. However, no flaws have yet been found, so the proof appears valid. A shorter, independent proof was constructed by Robertson et al. (1996; Thomas 1998).

Martin Gardner (1975) played an April Fool's joke by (incorrectly) claiming that the map of 110 regions illustrated above requires five colors and constitutes a counterexample to the four-color theorem. However, the coloring of Wagon (1998; 1999, pp. 535-536), obtained algorithmically using Mathematica, clearly shows that this map is, in fact, four-colorable.

Applications of graph coloring
Vertex coloring applications:
Many scheduling problems involve allowing for a number of pairwise restrictions on which jobs can be done simultaneously. For instance, in attempting to schedule classes at a university, two

courses taught by the same faculty member cannot be scheduled for the same time slot. Similarly, two courses that are required by the same group of students also should not conflict. The problem of determining the minimum number of time slots needed subject to these restrictions is a graph coloring problem. The time slots are colors for the vertices, the vertices are courses, and the edges between courses are restrictions that force different time slots. Vertex coloring models to a number of scheduling problems. In the cleanest form, a given set of jobs need to be assigned to time slots, each job requires one such slot. Jobs can be scheduled in any order, but pairs of jobs may be in conflict in the sense that they may not be assigned to the same time slot, for example because they both rely on a shared resource. The corresponding graph contains a vertex for every job and an edge for every conflicting pair of jobs. The chromatic number of the graph is exactly the minimum makespan, the optimal time to finish all jobs without conflicts. Details of the scheduling problem define the structure of the graph. For example, when assigning aircrafts to flights, the resulting conflict graph is an interval graph, so the coloring problem can be solved efficiently. In bandwidth allocation to radio stations, the resulting conflict graph is a unit disk graph, so the coloring problem is 3-approximable.

Frequency Assignment
There is a problem in assigning frequencies to mobile radios and other users of the electromagnetic spectrum. In the simplest case, two customers that are sufficiently close must be assigned different frequencies, while those that are distant can share frequencies. The problem of minimizing the number of frequencies is then a graph coloring problem.

If one considers situations where users (vertices) enter and leave the system, this application also provides a setting where on-line algorithms would be relevant.

1. Register allocation
One very active application for graph coloring is register allocation. In compiler optimization, register allocation is the process of assigning a large number of target program variables onto a small number of CPU registers. Register allocation can happen over a basic block (local register allocation), over a whole function/procedure (global register allocation), or in-between functions as a calling convention (interprocedural register allocation) The register allocation problem is to assign variables to a limited number of hardware registers during program execution. Variables in registers can be accessed much quicker than those not in registers. Typically, however, there are far more variables than registers so it is necessary to assign multiple variables to registers. Variables conflict with each other if one is used both before and after the other within a short period of time (for instance, within a subroutine). The goal is to assign variables that do not conflict so as to minimize the use of non-register memory. A simple approach to this is to create a graph where the nodes represent variables and an edge represents conflict between its nodes. A coloring is then a conflict-free assignment. If the number of colors used is less than the number of registers then a conflict-free register assignment is possible

Graphs and isomorphism
Through liveness analysis, compilers can determine which sets of variables are live at the same time, as well as variables which are involved in move instructions. Using this information, the compiler can construct a graph such that every vertex represents a unique variable in the program. Interference edges connect pairs of vertices which are live at the same time, and preference edges connect pairs of vertices which are involved in move instructions. Register allocation can then be reduced to the problem of K-coloring the resulting graph, where K is the number of registers available on the target architecture. No two vertices sharing an edge may be assigned the same color, and vertices sharing a preference edge should be assigned the same color if possible. Some of the vertices may be precolored to begin with, representing variables which must be kept in certain registers due to calling conventions or communication between modules. As graph coloring in general is NP-complete, so is register allocation. However, good algorithms exist which balance performance with quality of compiled code.

Edge coloring applications: 2. Football
The National Football League solves such an edge coloring problem each season to make up its schedule. Each team's opponents are determined by the records of the previous season. Assigning the opponents to weeks of the season is the edge-coloring problem.

Edge coloring can be reduced to vertex coloring (in linear time) by constructing the line graph of the input graph G. This is the graph constructed by replacing each edge with a vertex, and connected vertices in the new graph according to the edges that share a vertex in the original graph.

3. An interview problem
Assume we need to schedule a given set of two-person interviews, where each interview takes one hour. All meetings could be scheduled to occur at distinct times to avoid conflicts, but it is less wasteful to schedule nonconflicting events simultaneously. We can construct a graph whose vertices are the people and whose edges represent the pairs of people who want to meet. An edge coloring of this graph defines the schedule. The color classes represent the different time periods in the schedule, with all meetings of the same color happening simultaneously.

Other applications of graph coloring are: 1. Pattern matching
In computer science, pattern matching is the act of checking for the presence of the constituents of a given pattern. In contrast to pattern recognition, the pattern is rigidly specified. Such a pattern concerns conventionally either sequences or tree structures. Pattern matching is used to test whether things have a desired structure, to find relevant structure, to retrieve the aligning parts, and to substitute the matching part with something else. Sequence (or specifically text string) patterns are often described using regular expressions (e.g. backtracking) and matched using respective algorithms. Sequences can also be seen as trees branching for each element into the respective element and the rest of the sequence, or as trees that immediately branch into all elements. Tree patterns can be used in programming languages as a general tool to process data based on its structure. Some functional programming languages such as Haskell, ML and the symbolic mathematics language Mathematica have a special syntax for expressing tree patterns and a language construct for conditional execution and value retrieval based on it. For simplicity and efficiency reasons, these tree patterns lack some features that are available in regular expressions. Depending on the languages, pattern matching can be used for function arguments, in case expressions, whenever new variables are bound, or in very limited situations such as only for sequences in assignment (in Python). Often it is possible to give alternative patterns that are tried one by one, which yields a powerful conditional programming construct. Pattern matching can benefit from guards. The Curry-Howard correspondence between proofs and programs relates ML-style pattern matching to case analysis and proof by exhaustion. Term rewriting and Graph rewriting languages rely on pattern matching for the fundamental way a program evaluates into a result. Pattern matching benefits most when the underlying data structures are as simple and flexible as possible. This is especially the case in languages with a strong symbolic flavor. In homo iconic programming languages, patterns are the same kind of data type as everything else, and can therefore be fed in as arguments to functions.

2. Sudoku
A Sudoku puzzle

...and its solution numbers marked in red

Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid (also called "boxes", "blocks", "regions", or "sub-squares") contains all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which typically has a unique solution. Completed puzzles are always a type of Latin square with an additional constraint on the contents of individual regions. For example, the same single integer may not appear twice
  

in the same 9x9 playing board row in the same 9x9 playing board column or In any of the nine 3x3 subregions of the 9x9 playing board.

The puzzle was popularized in 1986 by the Japanese puzzle company Nikola, under the name Sudoku, meaning single number. It became an international hit in 2005.

Printed Circuit Board Testing I – Coloring
There is a problem of testing printed circuit boards for unintended short circuits (caused by stray lines of solder). This gives rise to a graph coloring problem in which the vertices correspond to the nets on board and there is an edge between two vertices if there is a potential for a short circuit between the corresponding nets. Coloring the graph corresponds to partitioning the nets into ``supernets,'' where the

nets in each supernet can be simultaneously tested for shorts against all other nets, thereby speeding up the testing process.

Analysis of Biological and Archeological Data
In biology and archeology, a standard model for relating objects is that of a tree. Trees can represent the division of a species into two separate species or the division of features of some artifact (like pottery or pins). Species do not come with histories, however, nor are artifacts completely dated. Therefore, it is necessary to deduce the tree structure from the features of the items. One approach to this is to create a distance measure between the items. If the distance measure represents distances along a tree, then that tree is a good estimate for the underlying, ``real'' tree. Normally, the distances do not represent a tree, so it is necessary to find a tree that accurately estimates the true distances. One approach to this, suggested by Barthélemy and Guénoche creates a graph as follows: the nodes of the graph represent partitions of the items. These partitions are chosen because items within a partition are closer to each other than to those in the other side of the partition. Two nodes are adjacent if the partitions are consistent with coming from the same tree (which reduces to an inclusion condition). A clique in this graph represents a set of partitions that can be formed into a tree. Maximum cliques attempt to encapsulate as much of the partition data as possib

BIBLIOGRAPHY 1. www.imada.sdu.dk/~btoft/Graphcol/ 2. http://www.geom.uiuc.edu/~zarembe/grapht1.html 3. http://mathworld.wolfram.com/GraphColoring.html

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.