Docsity

Graph Coloring - Data Structures - Lecture Slides, Slides of Data Structures and Algorithms

Partial preview of the text

Download Graph Coloring - Data Structures - Lecture Slides and more Slides Data Structures and Algorithms in PDF only on Docsity!

Graph Coloring

Introduction

  • When a map is colored, two regions with a

common border are customarily assigned

different colors.

  • We want to use a small amount of colors

instead of just assigning every region its

own color.

Dual Graph Examples

A

B C (^) D

E

F

G A

B

C D^ E

B

A E

D

C

C

B

A D F G

E

Graph Coloring

  • A coloring of a simple graph is the assignment of

a color to each vertex of the graph so that no

two adjacent vertices are assigned the same

color.

  • The chromatic number of a graph is the least

number of colors needed for a coloring of the

graph.

  • The Four Color Theorem: The chromatic number

of a planar graph is no greater than four.

Example

  • What is the chromatic number for each graph?

White (^) Yellow

White

White Yellow

Yellow

Chromatic number: 2

White

Yellow

Yellow^ White

Green

Chromatic number: 3

Applications

  • Scheduling Final Exams
  • How would you model this with a graph?
  • After you have drawn a graph, what should

you do?

Two-Level Curtis Decomposition

if A ∩ B = ∅ , it is disjoint decomposition

if A ∩ B ≠ ∅ , it is non-disjoint decomposition

X

B - bound set

A - free set

F(X) = H( G(B), A ), X = A ∪ B

Multi-Level Curtis Decomposition

Two-level decomposition is recursively applied to few functions Hi and Gi , until small functions G (^) t and Ht are created, that are not further decomposable.

Thus Curtis decomposition is multi-level, and each two-level stage should create the candidates for the next level that will be as well decomposable as possible.

Decomposition Algorithm

  • Find a set of partitions (A (^) i , Bi ) of input

variables (X) into free variables (A) and bound

variables (B)

  • For each partitioning, find decomposition

F(X) = Hi (Gi (Bi ), Ai ) such that column

multiplicity is minimal, and calculate DFC

  • Repeat the process for all partitioning until

the decomposition with minimum DFC is

found.

Algorithm Requirements

  • Since the process is iterative, it is of high

importance that minimizing of the column

multiplicity index was done as fast as possible.

  • At the same time it is important that the value

of column multiplicity was close to the

absolute minimum value for a given

partitioning.

Basic Definitions (cont’d)

Definition 2. If conditions 1) and 2) are true and A and B have the same number of nodes, then it is called pseudo-covering.

Definition 3. The complete graph is one in which all the pairs of vertices are connected.

Definition 4. A non-reducible graph is a graph that is not complete and has no covered or pseudo-covered nodes. Otherwise, the graph is reducible.

New Algorithm DOM for

Graph Coloring by Domination Covering

Theorem 1. If any node A in the incompatibility graph covers any other node B in the graph, then node B can be removed from the graph, and in a pseudo-covering any one of the nodes A and B can be removed.

Theorem 2. If a graph is reducible and can be reduced to a complete graph by successive removing of all its covered and pseudo-covered nodes, then Algorithm DOM finds the coloring with the minimun number of colors (the exact coloring).

New Algorithm DOM for

Graph Coloring by Domination Covering

Example Showing How DOM Colors of

a Reducible Graph

3

6

1

4

3

6

1

4

Step 3

Step 3: Coloring the complete graph

3

6

1

4

2

5

7

Step 4

Step 4: Coloring the dominated vertices

Example Showing How DOM Colors of

a Reducible Graph

2

3

1

7

6

5 4

Step 1

Step 1: Removing random node (1)

Step 3: Removing 3 pseudo-covered by 5

2

3

1

7

6

5 4

Step 2 Step 3

2

3

1

7

6

5 4

Step 2: Removing 2 and 6 covered by 4