On-line coloring Competitiveness Results Example

On-line

Iwona Cieslik´

Algorithmics Research Group, Jagiellonian University, Cracow, Poland

Chambéry, June 2005

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Graph Coloring

Definition A coloring of a graph is a function assigns to every vertex a color in such a way that the adjacency vertices have different colors.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Graph Coloring

Definition A vertex coloring of a graph is a function assigns to every vertex a color in such a way that the adjacency vertices have different colors.

Example

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line coloring like a game

an infinite board 2 players: Spoiler and Algorithm Spoiler gives a graph. At each step he draws a single, new vertex. Algorithm assigns colors to vertices. Algorithm wants to use as few colors as possible. Spoiler wants to cheat Algorithm, and force him to use as many colors as possible.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Spoiler puts first vertex. Algorithm colors it by red.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Spoiler puts first vertex. Algorithm colors it by red. Spoiler puts second vertex. Algorithm colors it by blue.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Spoiler puts first vertex. Algorithm colors it by red. Spoiler puts second vertex. Algorithm colors it by blue. Spoiler puts third vertex. Algorithm colors it by red.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Spoiler puts first vertex. Algorithm colors it by red. Spoiler puts second vertex. Algorithm colors it by blue. Spoiler puts third vertex. Algorithm colors it by red. Spoiler puts fourth vertex. Algorithm colors it by yellow.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line Graph Coloring

Example

Spoiler puts first vertex. Algorithm colors it by red. Spoiler puts second vertex. Algorithm colors it by blue. Spoiler puts third vertex. Algorithm colors it by red. Spoiler puts fourth vertex. Algorithm colors it by yellow. Spoiler puts fifth vertex. Algorithm colors it by green.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Minimal cliques covering

Similarly, we can define an on-line cliques covering problem. Definition Minimal cliques covering problem asks for finding a partition of vertices of a graph into a minimal number of cliques.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Minimal cliques covering

Similarly, we can define an on-line cliques covering problem. Definition Minimal cliques covering problem asks for finding a partition of vertices of a graph into a minimal number of cliques.

Example

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red. Spoiler puts second vertex. Algorithm covers it by red.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red. Spoiler puts second vertex. Algorithm covers it by red. Spoiler puts third vertex. Algorithm covers it by blue.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red. Spoiler puts second vertex. Algorithm covers it by red. Spoiler puts third vertex. Algorithm covers it by blue. Spoiler puts fourth vertex. Algorithm covers it by blue.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red. Spoiler puts second vertex. Algorithm covers it by red. Spoiler puts third vertex. Algorithm covers it by blue. Spoiler puts fourth vertex. Algorithm covers it by blue. Spoiler puts fifth vertex. Algorithm covers it by green.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example On-line cliques covering

Example

Spoiler puts first vertex. Algorithm covers it by red. Spoiler puts second vertex. Algorithm covers it by red. Spoiler puts third vertex. Algorithm covers it by blue. Spoiler puts fourth vertex. Algorithm covers it by blue. Spoiler puts fifth vertex. Algorithm covers it by green. Spoiler puts sixth vertex. Algorithm covers it by yellow.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Competitiveness

Definition An on-line algorithm A is competitive for the family F if there is a function f such that for every G ∈F

A(G) ≤ f (opt(G))

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Competitiveness

Definition An on-line algorithm A is competitive for the family F if there is a function f such that for every G ∈F

A(G) ≤ f (opt(G))

Definition An on-line algorithm A is c-competitive for the family F if there exist a and c such that for every G ∈F

A(G) ≤ c · opt(G)+a

We say that c is a competitive ratio.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example How can we show that on-line problem has a competitive ratio equal to c?

Find an on-line c-competitive algorithm A, Show that there’s no on-line algorithm which is better. That is, indicate a proper forcing strategy for Spoiler.

Similarly, we can show that the on-line problem has more complex competitive function.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Forcing subgraphs

There are some families of graphs for which there exists no on-line algorithm with any competitive function.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Forcing subgraphs

There are some families of graphs for which there exists no on-line algorithm with any competitive function. There are some families of graphs for which Spoiler is able to force only a few additional colors.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Forcing subgraphs

There are some families of graphs for which there exists no on-line algorithm with any competitive function. There are some families of graphs for which Spoiler is able to force only a few additional colors.

In order that Spoiler can force a large number of colors, the given graph should contain the forcing subgraphs.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example H-free graphs

Definition G - H-free graph 

it does not contain any isomorphic to H

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example H-free graphs

Definition G - H-free graph 

it does not contain any induced subgraph isomorphic to H

Examples

Ks-free graphs, Ks,t-free graphs ...

Ks - a () with s vertices

Ks,t - a complete (X, Y , E): X = s, Y = t

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

Examples

b b

b b b b b b

b b b b b b b b

b b b b

K1,3 K1,3 − free K2,4 K2,4 − free

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example The table of competitiveness

Graph Method Coloring Cliques of giving covering

K ∞ s s-free - 2 s ≥ 3

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example The table of competitiveness

Graph Method Coloring Cliques of giving covering

∞ 3 Bipartite - 2 [Gyárfás Lehel]

3 Bipartite connected 1 2

K ∞ s s-free - 2 s ≥ 3

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example The table of competitiveness

Graph Method Coloring Cliques of giving covering

∞ 3 Bipartite - 2 [Gyárfás Lehel]

3 Bipartite connected 1 2

K ∞ s s-free - 2 s ≥ 3

K ∞ s s-free connected 2 s ≥ 3

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

Graph Method of giving Coloring Cliques covering

K1,t -free - t − 1 ∞ t ≥ 3

K1,t -free connected t − 1 ∞ t ≥ 3

Ks,t -free - ∞ ∞ s ≥ 2, t ≥ 3

Ks,t -free connected ∞ ∞ s ≥ 2, t ≥ 3

K2,2-free - ∞ ??? = C4-free

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

ON-LINE COLORING for C4-free graphs

Theorem (Gyárfás, Lehel, 1988)

An upper bound for a competitive function of an on-line coloring for C4-free graphs is at most 2opt(G) − 1.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

ON-LINE COLORING for C4-free graphs

Theorem (Gyárfás, Lehel, 1988)

An upper bound for a competitive function of an on-line coloring for C4-free graphs is at most 2opt(G) − 1.

Question What about a lower bound ??

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

ON-LINE COLORING for C4-free graphs

Theorem (Cieslik)´ The competitive function of the best on-line cliques covering algorithm for C4-free graphs is at least: O( opt(G) · lg opt(G)).

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

ON-LINE COLORING for C4-free graphs

Theorem (Cieslik)´ The competitive function of the best on-line cliques covering algorithm for C4-free graphs is at least: O( opt(G) · lg opt(G)).

Theorem (Cieslik)´ The competitive function of the best greedy on-line cliques covering algorithm for C4-free graphs is at least quadratic:   opt(G)+1 2.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example Example

Theorem (Cieslik)´ For every on-line coloring algorithm A there exists a graph G such that

A(G) ≥ (t − 1) · opt(G) − t + 2.

As an example we show a construction of the 4-colorable K1,4-free graph G for which the on-line coloring greedy algorithm with the First Fit strategy uses

3 · opt(G) − 2 = 3 · 4 − 2 = 10 colors.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example b b b b b b b b

b b b b b b b b b b b

b b b b b

b b bbb b b b b b b b b b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b b b

A1 A2

b b b b b b b b b b b

b b b b b A 3 b b bbb b b b

b b b b b b

b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b b b b

A1 A2 b b b b b b b b b b v1

b b b b A 3 b b bbb b b b

b b b b b b

b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b b b b

A1 A2 b b b b b b b b b b b v1 v2

b b b b A 3 b b bbb b b b

b b b b b b

b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b b

A1 A2 b b b b b b b b b b b v1 v2

b b b b b A v3 3 b b bbb b b b

b b b b b b

b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b b

b b b b b b b b b b b v1 C1 v2 B1 b b b b b v3 b b bbb b b b

b b b b b b

b b b b b b

b b b b b b b b b b b b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b bb

bbb bbb b b b b C1 B1 B3 b b b b

b b bbb b b

b b b

b b

B2 B4 b b b b b b

b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

bbb b bb b b b b C1 B1 B3 b b b b b

b b bbb b b

b b b b b b

b b b b b B B 2 C 4 2 b b b b b b b b bb

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

bbb b bbb b b b b b C1 C3 B1 B3 b b b b b b

b b bbb b b

b b b b b b

b b b b b

B2 B4 C2 b b b b b b b b bb

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

bbb b bbb b b b b b C1 C3 B1 B3 b b b b b b

b b bbb b b

b b b b b b

b b b b b b

B2 B4 C2 b b b b C4 b b b b bbb b

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

D D bbb b 1 3 bbb b b b b b C1 C3 B1 B3 b b b b b b

bbb b b

b b b b b b

b b bb b b B B 2 C b C 4 2 bbb b 4 b b b b bbb b D2 D4

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

D D bbb b 1 3 bbb b b b b b C C B1 1 3 B3 b b b b b b

b bbb 7 b b

b b b b b b

b b bb b b

B2 C2 C B4 b b b b 4 b b b b bbb b D2 D4

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

D D bbb b 1 3 bbb b b b b b C C B1 1 3 B3 b b b b b b

b bbb 7 b b

b b b b 8 b b

b b bb b b

B2 C2 C B4 b b b b 4 b b b b bbb b D2 D4

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

D D bbb b 1 3 bbb b b b b b C C B1 1 3 B3 b b b b b b

b b bbb 7 9 b b

b b b b 8 b b

b b bb b b

B2 C2 C B4 b b b b 4 b b b b bbb b D2 D4

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

b b b b b bbb

D D bbb b 1 3 bbb b b b b b C C B1 1 3 B3 b b b b b b

b b bbb 7 9 b b

b b b b 8 b b10

b b bb b b

B2 C2 C B4 b b b b 4 b b b b bbb b D2 D4

b b b b b b b b

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

Theorem (Cieslik)´ For every on-line coloring algorithm A there exists a graph G given in a connected way such that

A(G) ≥ (t − 1) · opt(G) − t + 2.

Iwona Cieslik´ On-line Graph Coloring On-line coloring Competitiveness Results Example

Thank you for your attention.

Iwona Cieslik´ On-line Graph Coloring