Vertex Colouring. Complement to Chapter 7, The Case of the Hooded Man and Chapter 9, The Sudoku Apprentice

Similar documents
Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Small Maximal Independent Sets and Faster Exact Graph Coloring

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Scheduling Shop Scheduling. Tim Nieberg

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four

Triangle deletion. Ernie Croot. February 3, 2010

Large induced subgraphs with all degrees odd

Approximation Algorithms

The Four-Color Problem: Concept and Solution

CSC2420 Spring 2015: Lecture 3

Definition Given a graph G on n vertices, we define the following quantities:

Best Monotone Degree Bounds for Various Graph Parameters

Scheduling Algorithm for Delivery and Collection System

Written methods for addition of whole numbers

This puzzle is based on the following anecdote concerning a Hungarian sociologist and his observations of circles of friends among children.

Algorithm Design and Analysis

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

On Integer Additive Set-Indexers of Graphs

Introduction to Logic in Computer Science: Autumn 2006

Clique coloring B 1 -EPG graphs

How To Create A Time Table For A University

Which shapes make floor tilings?

Coordination in vehicle routing

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Euler Paths and Euler Circuits

Cloud Computing is NP-Complete

Network Algorithms for Homeland Security

Near Optimal Solutions

The Minimum Consistent Subset Cover Problem and its Applications in Data Mining

CSE 4351/5351 Notes 7: Task Scheduling & Load Balancing

THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

Cycles and clique-minors in expanders

Exponential time algorithms for graph coloring

Tools for parsimonious edge-colouring of graphs with maximum degree three. J.L. Fouquet and J.M. Vanherpe. Rapport n o RR

A Hypocoloring Model for Batch Scheduling Problem

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Sue Fine Linn Maskell

CSC 373: Algorithm Design and Analysis Lecture 16

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

Minimum degree condition forcing complete graph immersion

Graph Theory Problems and Solutions

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

On-line Ramsey numbers

1. Write the number of the left-hand item next to the item on the right that corresponds to it.

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Scheduling. Getting Started. Scheduling 79

Big graphs for big data: parallel matching and clustering on billion-vertex graphs

Kenken For Teachers. Tom Davis June 27, Abstract

Every tree contains a large induced subgraph with all degrees odd

. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2

Lecture 7: NP-Complete Problems

Part 2: Community Detection

3 Some Integer Functions

A Non-Linear Schema Theorem for Genetic Algorithms

Optimization in ICT and Physical Systems

3. Eulerian and Hamiltonian Graphs

6.3 Conditional Probability and Independence

Network Flow I. Lecture Overview The Network Flow Problem

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

Introduction to Graph Theory

School Timetabling in Theory and Practice


5.1 Bipartite Matching

CAD Algorithms. P and NP

Practical Guide to the Simplex Method of Linear Programming

CALCULATING THE AREA OF A FLOWER BED AND CALCULATING NUMBER OF PLANTS NEEDED

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Lecture 17 : Equivalence and Order Relations DRAFT

The chromatic spectrum of mixed hypergraphs

Product irregularity strength of certain graphs

Discrete Mathematics Problems

MATHEMATICS Unit Decision 1

Battleship. Big bands

Year 9 mathematics test

4. How many integers between 2004 and 4002 are perfect squares?

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Mean Ramsey-Turán numbers

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

3D shapes. Level A. 1. Which of the following is a 3-D shape? A) Cylinder B) Octagon C) Kite. 2. What is another name for 3-D shapes?

Answer: The relationship cannot be determined.

MATHEMATICS Y3 Using and applying mathematics 3810 Solve mathematical puzzles and investigate. Equipment MathSphere

Math 4310 Handout - Quotient Vector Spaces

Mathematics of Sudoku I

Distributed Computing over Communication Networks: Maximal Independent Set

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Level 1 - Maths Targets TARGETS. With support, I can show my work using objects or pictures 12. I can order numbers to 10 3

On the crossing number of K m,n

Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

Operations and Supply Chain Management Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Midterm Practice Problems

Addition of Multidigit Numbers

Un survol de la domination de puissance dans les graphes

Nan Kong, Andrew J. Schaefer. Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Grade 3 Geometry and Spatial Sense. Name:

Treemaps with bounded aspect ratio

Uses of Java Applets in Mathematics Education

Transcription:

Vertex Colouring Complement to Chapter 7, The Case of the Hooded Man and Chapter 9, The Sudoku Apprentice In 1852, a young Englishman, Francis Guthrie, wondered if it were always possible to colour a map using four colours, while respecting the condition that two neighbouring countries could not be of the same colour. It wasn t until 1976 that two American researchers, Kenneth Appel and Wolfgang Haken, from the University of Illinois, managed to answer this question in the affirmative. More than a century went by between when the problem was set out and when it was solved, even though it appears to be very simple. Throughout those years, researchers of course did tackle the question, and many attempts gave rise to new mathematical developments, as well as to the problem being formulated in terms of graphs. The map to colour was replaced by a graph, each country being represented by a vertex and two neighbouring countries being linked by an edge. Definition Colouring the vertices in graph G means assigning colours to the vertices such that each edge in G has ends of two different colours. We are also usually seeking to determine a colouring that uses as few colours as possible. The smallest number of colours needed to colour the vertices in a graph G is called the chromatic number of G and is noted as (G). We can also colour the edges while making sure that edges touching a given vertex are not of the same colour. This is what we defined earlier, in the document dealing with matchings. Definition Colouring the edges in a graph G means assigning colours to the edges such that the edges which have an end in common with one another are of different colours. We are also generally seeking to determine a colouring that uses as few colours as possible. The smallest number of colours needed to colour the edges of a graph G is called the chromatic index of G and is noted as q(g). Let s once again take the edge colouring example we saw in an earlier document. We need to carry out five tasks, T 1, T 2, T 3, T 4 and T 5, with each of the tasks taking one day to complete. Tasks T 1 and T 2 must be performed by employee E 1, tasks T 3 and T 4 by employee E 2 and task T 5 by employee E 3. Tasks T 1 and T 3 require machine M 1, tasks T 2 and T 4 need machine M 2 and task T 5 machine M 3. Knowing that each employee can only carry out one task at a time and that each machine can only be used by one employee at a time, how many days are needed at minimum to perform the five tasks? This problem is equivalent to colouring the edges of the graph below using the minimum number of colours, such that all the edges that touch one another are of different colours.

Each colour corresponds to one day, and we need two days. For example, we can perform tasks T 1, T 4 et T 5 on the first day, and tasks T 2 and T 3 the second day. Let s consider the same problem now, but with an additional constraint. Tasks T 2, T 3 and T 5 monopolize the company s only remote-control machine, and it cannot help with the performance of two tasks simultaneously. The minimum number of days needed for carrying out the five tasks can be determined by colouring the vertices in the graph below with a minimum number of colours, such that no edges have two ends of the same colour. Once again, each colour corresponds to one day. So we need three days. For example, we can perform tasks T 1, T 4 and T 5 the first day, task T 2 the second day and task T 3 the third day. In fact, many concrete problems can boil down to seeking to partition a set of objects into subsets that feature only elements that are compatible two by two. For instance, determining a school schedule means partitioning time into periods during which only courses that can take place simultaneously are given. We can model this type of problem in terms of colouring the vertices of a graph: the vertices are the objects being partitioned and the edges represent the incompatibilities between these objects. For the school schedule example, the vertices are the courses that need to be placed in the timetable, and we link two courses with an edge if they can t be given simultaneously (because they are taught by the same teacher, are given to the same students, or must be taught in the same room). The problem of colouring the edges in a graph was addressed in an earlier document. Here, we are interested in determining the chromatic number. Note that when considering the line graph L(G) of a graph G, we know of course that colouring the edges of G is equivalent to colouring the vertices of L(G). The chromatic index of G is therefore equal to the chromatic number of its line graph, which can be noted as: q(g) = (L(G))

Definition A clique in a graph is a set of vertices all related two by two. The size of the biggest clique in a graph G is noted as (G). Given that the vertices in a clique must all be of different colours, we deduce that the chromatic number (G) of G cannot be less than (G). It may, however, be strictly greater than (G), such as in the case below, with the pentagon example. We need (G)=3 colours to colour its vertices, while (G)=2. As another example, we can provide the graph Manori draws to determine the guilty party in the robbery of Mrs. Rossier s grocery store. Manori demonstrated that while the graph contains no cliques with four vertices, its chromatic number is greater than 3. We can only colour it in three colours if we remove vertex I. As a reminder, Vizing showed that the chromatic index is always at most equal to the highest degree + 1, or q(g) (G)+1. We can make the following observations: A set of edges in G that all have one end in common corresponds to a clique in its line graph L(G), which shows that (L(G)) (G); If L(G) is not a triangle, a clique in L(G) corresponds to a set of edges all touching a given vertex in G, which shows that (G) (L(G)).

In sum, if L(G) is not a triangle, we get (G)= (L(G)). If L(G) is a triangle, as we already noted in another document, and as illustrated once again below, it is possible that G is also a triangle, in which case 2= (G) < (L(G))=3. Given that q(g)= (L(G)), the result demonstrated by Vizing can be rewritten as follows: (L(G)) (L(G))+1. By this reasoning laid out above, this result is only true if L(G) is not a triangle. It is also true if L(G) is a triangle because in that case, 3= (L(G)) < (L(G))+1=4. In other words, we have just seen that the chromatic number of a line graph is never much higher than the size of its biggest clique. This result, however, is no longer necessarily valid for all graphs. It has been demonstrated that the difference between (G) and (G) can be as big as you can imagine. Here is an example in which (G) = (G)+2. This graph was built as follows. We first considered two pentagons, one made up of vertices a, b, c, d and e, and the other of vertices A, B, C, D and E. We then added an edge between all the vertices in the first pentagon and those in the second pentagon. Given that we need three colours to colour a pentagon, we need six colours to colour this graph. Also, the biggest clique in a pentagon contains two vertices, which means that the biggest clique in the graph as a whole is of size 4. In sum, we get (G)=6=4+2= (G)+2. The problem of determining the chromatic number of a graph G is difficult to solve. The best algorithms known to date do not allow us to determine the chromatic number of graphs with more than 100 vertices. These problems can, however, be easier for certain

graph families. For example, for a bipartite graph that includes at least one edge, we know that (G)=2 because we can assign one colour to one of the parts of the V partition, and another colour to the second part. We also saw that it s easy to colour an interval graph. For other large graphs, we have no choice but to rely on heuristics, which provide solutions of a reasonable quality in a reasonable time. Here, let s look at a few of these heuristics. Constructive methods for colouring the vertices of a graph travel over the vertices sequentially, assigning each vertex the smallest possible colour (the colours are numbered). The quality of the solution thus obtained depends largely on the order in which the vertices are considered. This order can be chosen to start with, or built dynamically. It is important to note that all graphs possess a vertex order based on which the constructive method produces a colouring using the minimum number of colours. To see this, we simply need o consider the colouring of graph G in (G) colours and order the vertices of G by first taking the vertices of colour 1, then those of colour 2, and so forth. Property A constructive method never uses more than (G)+1 colours. Proof When we colour a vertex, a maximum of (G) colours can already appear in its neighbourhood. It is interesting to note that a sequential colouring algorithm can be in error on the following graph, which only contains four vertices. If we colour this graph in the order a, d, b, c, we will assign colour 1 to a and d, colour 2 to b and colour 3 to c. The graph could, however, easily be coloured using only two colours (colour 1 for a and c and colour 2 for b and d). This graph is noted P 4 for path on 4 vertices. Chvátal demonstrated that if a graph contains no quadruplet of vertices a, b, c and d with a P 4 structure (meaning that a is linked to b but not to c and d, b is linked also to c but not to d, and c is also linked to d), then the constructive sequential algorithm will produce an optimal colouring in (G) colours, regardless of the order used. The most common constructive colouring methods can be described as follows. First, among the constructive methods based on static orders, the best known are the following: RANDOM The vertices are sorted in a random order. LF (Largest First) The vertices are sorted by degree in non-increasing order.

SL (Smallest Last) The order v 1, v 2,, v V of the vertices is such that v i is of the smallest degree in the graph containing only vertices v 1, v 2,, v i. Illustration Colouring with the LF algorithm Colouring with the SL algorithm Given any partial colouring of G, let s define the degree of saturation DSAT(v) of a vertex v in G as the number of different colours already assigned to the neighbouring vertices of v. In a subset W of vertices in G, DEG W (v) measures the number of w vertices in W that are neighbours of v. In what follows, subset A of vertices corresponds to the set of vertices that are not yet coloured. Among the constructive methods based on dynamic orders, the most frequently used is this one: DSATUR The order of vertices is built by choosing, at every step, a vertex v of A, which maximizes DSAT(v). If two vertices, v and w, are of the same degree of saturation, v precedes w as long as DEG A (v) DEG A (w). Illustration Colouring with the DSATUR algorithm The table below provides a few indications on the performances of these four heuristics when we apply them to randomly generated graphs. We note as G n,d a random graph made up of n vertices and in which each edge has a d probability of existing, independently of the other edges. The probability d is called the density of the graph. The results of the table below are averages calculated from ten random graphs. For each

heuristic, we provide the average number of colours used to colour the graph G n,d in question. n d RANDOM LF SL DSATUR 100 300 500 1000 17.60 21.35 26.20 39.00 48.20 61.00 57.20 72.40 91.40 99.50 126.50 160 16.10 20.15 24.50 37.10 46.00 58.20 56.00 69.20 87.60 96.50 122.00 155.00 16.65 20 24.85 38.10 46.80 58.90 56.80 71.80 89.60 97.00 124.50 157.00 14.70 18.45 22.60 34.30 43.30 53.70 51.00 65.00 82.80 92.00 116.00 146.50 For random graphs with up to 1,000 vertices, all these methods have calculation times of a second or two, or even less. Note that much more efficient algorithms exist, but they are heavier to implement. For instance, for a 1,000-vertex graph with a density of, the results of the table above are between 116 and 127 colours, while the best algorithms known to date manage to determine colourings of these same graphs with 82 colours (but with several hours of calculation time). We conclude this document by coming back to Manori once again, who used the colouring of vertices in a graph to find the solution for the first Sudoku puzzle he was given by young Lei. In fact, all Sudoku problems come down to colour an 81-vertex graph in nine colours with a few vertices that already have colours assigned. This graph contains one vertex per box and two vertices are linked by an edge if they correspond with boxes that are found on the same line, in the same column, or in the same 3 x 3 square in the grid. For the grid given to him by Lei, Manori only considers the six specific boxes represented below. 5 7 6 3 1 A B 9 F 5 C 1 9 5 E 4 D 3 7 6 7 1 3 Manori notices that these six boxes can only contain the numbers 2, 4 and 8. So he needs to colour the graph using three colours, one for 2, another for 4 and the third for 8. He then notes that the only possible solution assigns one colour to A and C, a second colour to B and D, and finally a third colour to E and F. Then, it s simply a matter of observing that boxes D and E cannot be filled with the number 4 to conclude that the colour representing the number 4 can only be assigned to boxes A and C.