Colouring Colouring Colouring For a graph G = ( V , E ) , a - - PowerPoint PPT Presentation

colouring colouring
SMART_READER_LITE
LIVE PREVIEW

Colouring Colouring Colouring For a graph G = ( V , E ) , a - - PowerPoint PPT Presentation

Colouring Colouring Colouring For a graph G = ( V , E ) , a colouring is a function c : V N such that uv E implies c ( u ) = c ( v ) . A graph is k -colourable if there is a colouring c which uses at most k colours, i. e., c : V {


slide-1
SLIDE 1

Colouring

slide-2
SLIDE 2

Colouring

Colouring For a graph G = (V, E), a colouring is a function c: V → N such that uv ∈ E implies c(u) = c(v). A graph is k-colourable if there is a colouring c which uses at most k colours, i. e., c: V → {1, . . . , k}.

2 / 7

slide-3
SLIDE 3

Colouring

The k-Colouring problem asks, for a given graph, it is k-colourable. Theorem There is (probably) no polynomial time algorithm to determine if a given graph is k-colourable for all k ≥ 3. Some observations

◮ G is k-colourable if and only if each block of G is k-colourable. ◮ If G has a clique of size k, a colouring for G requires at least k colours.

3 / 7

slide-4
SLIDE 4

Colouring

Theorem The 2-colouring problem can be solved in linear time. 2-Colouring Algorithm

◮ Pick an arbitrary vertex v. ◮ Run a BFS starting in v. ◮ For all vertices u in even distance to v, set c(u) := 1. For all

vertices u in odd distance to v, set c(u) := 2.

◮ If there is an edge uw with c(u) = c(w), then G is not 2-colourable.

Graphs which are 2-colourable, are also called bipartite.

4 / 7

slide-5
SLIDE 5

Colouring Planar Graphs

slide-6
SLIDE 6

Colouring Planar Graphs

Recall: Theorem For a connected planar graph G = (V, E) with at least three vertices, |E| ≤ 3|V| − 6. Therefore: Theorem Each planar graph contains a vertex with degree at most 5.

  • Proof. By pigeon-hole principle.
  • Thus, there is a vertex order v1, v2, . . . , vn such that vi has degree at

most 5 in Gi = G[{vi, vi+1, . . . , vn}].

6 / 7

slide-7
SLIDE 7

Colouring Planar Graphs

Input: A planar graph G. Output: A colouring c: V → N+.

1 Find a vertex order v1, v2, . . . , vn such that vi has degree at most 5

in Gi.

2 For i := n downto 1 3

Assign c(vi) the lowest available colour greater or equal to 1. Theorem There is a linear time algorithm to find a 5-colouring and an O(n2) time algorithm to find a 4-colouring for planar graphs. There is (probably) no polynomial time algorithm to find a 3-colouring for a planar graph, even it is known that such a colouring exist.

7 / 7