Info Techinically

There are different types of colouring, such as edge colouring and face colouring but I choose to talk about proper vertex colouring:

  • Vertex: Vertices/nodes are coloured
  • Proper: Same colours cannot be adjacent (adjacent depends on the structure)

Problem Description(s)

  • Let be a simple graph
  • Let be a set of colours which each integer in mapped to a unique colour.
  • means the node has been mapped to
Decision Version

Is it possible to assign a colour to every node in such that no two adjacent nodes share the same colour?

Optimisation Version

Find the chromatic number of . That is, find the least amount of colours needed to admit a proper vertex colouring of , where every node is coloured and no two adjacent nodes share the same colour.

This is NP-Complete.

#todo Write the question description better.

Bounds

Upper Bound

Since a trivial solution is to have every node have a different colour, an upper bound for is:

Note, this trivial solution is the only solution in the case of complete graphs, i.e.

Coloured Graph.md

If we look only at planar graphs, then a much tighter upper bound is given by the four colour theorem:

Another, more general upper bound is given by Brook’s theorem:

Graph Colouring

Lower Bound

Bounded

Thus, for any connected graph that is not weakly perfect, nor odd-cycled, the chromatic number is bounded by Brook’s theorem and the clique number:

Solutions

Greedy Approach

A greedy algorithm can be used to attempt a graph colouring, by trying to colour the entire graph a certain colour, except for when it would result in two adjacent nodes having the same colour. In this case, change the colour of those nodes, and attempt to do it again for all of these problematic nodes. Repeat until no such problematic nodes exist.

A greedy graph colouring will always be correct, but (in most cases), is not optimal. Optimality heavily depends on the order of nodes traversed through when colouring the graphs.

The procedure is (roughly):

Let be the graph to be coloured.

  1. Initialise , the set of colours, with length
  2. For each uncoloured node :
    1. For each colour in :
      1. Colour with if it does not create any conflicts
    2. Else, increase by 1 and add a new colour . Colour with

#todo Define#computer-science/algorithm/design/backtracking

Applications

Resources