Problem Definition Problem Definition Problem Definition Problem - - PowerPoint PPT Presentation

problem definition problem definition problem definition
SMART_READER_LITE
LIVE PREVIEW

Problem Definition Problem Definition Problem Definition Problem - - PowerPoint PPT Presentation

Problem Definition Problem Definition Problem Definition Problem Definition Problem Definition Problem Definition 4 colors Problem Definition 4 colors 3 colors Problem Definition Definition: k-coloring problem: a graph coloring using


slide-1
SLIDE 1
slide-2
SLIDE 2

Problem Definition

slide-3
SLIDE 3

Problem Definition

slide-4
SLIDE 4

Problem Definition

slide-5
SLIDE 5

Problem Definition

slide-6
SLIDE 6

Problem Definition

slide-7
SLIDE 7

Problem Definition

4 colors

slide-8
SLIDE 8

Problem Definition

4 colors 3 colors

slide-9
SLIDE 9

Definition: k-coloring problem: a graph coloring using at most k colors, with adjacent vertexes in different color. Chromatic number: the smallest k of a graph

Problem Definition

slide-10
SLIDE 10

Definition: k-coloring problem: a graph coloring using at most k colors, with adjacent vertexes in different color. Chromatic number: the smallest k of a graph

Problem Definition

How to calculate Chromatic number? How to get the k-coloring graph? What’s the time complexity?

slide-11
SLIDE 11

Time Complexity

Theorem: Every graph can be colored with one more color than the maximum vertex degree. (Upper bound) k ≤ ∆ 𝐻 + 1

One solution is to enumerate all the condition. Each vertex has k coloring scheme. So the time complexity is 𝑃(𝑙𝑜)。

𝑃 𝑙𝑜 ≤ 𝑃 ∆ 𝐻 + 1 𝑜 ≤ 𝑃 𝑜𝑜

slide-12
SLIDE 12

Time Complexity

Theorem: Every graph can be colored with one more color than the maximum vertex degree. (Upper bound) k ≤ ∆ 𝐻 + 1

One solution is to enumerate all the condition. Each vertex has k coloring scheme. So the time complexity is 𝑃(𝑙𝑜)。

𝑃 𝑙𝑜 ≤ 𝑃 ∆ 𝐻 + 1 𝑜 ≤ 𝑃 𝑜𝑜

It’s tooooooo slow!!!

slide-13
SLIDE 13

Time Complexity

One solution is to enumerate all the condition. Each vertex has k coloring scheme. So the time complexity is 𝑃(𝑙𝑜)。

It’s tooooooo slow!!! Can we find a polynomial time complexity?

𝑃(𝑜20) 𝑃(𝑜1000) 𝑃(𝑜3)

slide-14
SLIDE 14

Time Complexity

One solution is to enumerate all the condition. Each vertex has k coloring scheme. So the time complexity is 𝑃(𝑙𝑜)。

It’s tooooooo slow!!! Can we find a polynomial time complexity?

𝑃(𝑜20) 𝑃(𝑜1000) 𝑃(𝑜3)

No, because it’s an NP-hard problem.

slide-15
SLIDE 15

Time Complexity

One solution is to enumerate all the condition. Each vertex has k coloring scheme. So the time complexity is 𝑃(𝑙𝑜)。

It’s tooooooo slow!!! Can we find a polynomial time complexity?

𝑃(𝑜20) 𝑃(𝑜1000) 𝑃(𝑜3)

No, because it’s an NP-hard problem. Definition: NP-hard problem is the problem which has not been proved to be solved by polynomial algorithm. 𝑃(c𝑜)

slide-16
SLIDE 16

Outline

 Problem Definition  Dynamic Programming Algorithm

  • Maximal Independent Set
  • Lawler’ s Algorithm
  • Time Complexity

 Björklund-Husfeldt Algorithm

  • Preliminary
  • K-Cover & K-Partition
  • Chromatic Number
slide-17
SLIDE 17

Definition 2.1: An independent set of G is a subset 𝑇 ⊆ 𝑊 such that no two nodes in S are adjacent in G.

Independent Set

slide-18
SLIDE 18

Definition 2.1: Let G[S] be the graph induced by S from G

slide-19
SLIDE 19

Definition 2.1: Let G[S] be the graph induced by S from G

slide-20
SLIDE 20

Definition 2.1: Let G[S] be the graph induced by S from G

slide-21
SLIDE 21

Lemma: A graph G is k-colorable, iff there exists an independent set I of G, s.t. G[V-I] is (k-1)-colorable Proof: K colorable

slide-22
SLIDE 22

Lemma: A graph G is k-colorable, iff there exists an independent set I of G, s.t. G[V-I] is (k-1)-colorable Proof:

slide-23
SLIDE 23

Lemma: A graph G is k-colorable, iff there exists an independent set I of G, s.t. G[V-I] is (k-1)-colorable Proof: (K-1) colorable Independent Set

slide-24
SLIDE 24

Lemma: A graph G is k-colorable, iff there exists an independent set I of G, s.t. G[V-I] is (k-1)-colorable Proof:

What to do with the chromatic number? All the possible colorability of G is included in all the possible colorability of G[V-I] + 1 The minimum number for coloring G is the minimum number for coloring of G[V-I] + 1 Chromatic number of G is the chromatic number of G[V-I] + 1

slide-25
SLIDE 25

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-26
SLIDE 26

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-27
SLIDE 27

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-28
SLIDE 28

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-29
SLIDE 29

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-30
SLIDE 30

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-31
SLIDE 31

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-32
SLIDE 32

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-33
SLIDE 33

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-34
SLIDE 34

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-35
SLIDE 35

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-36
SLIDE 36

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-37
SLIDE 37

Lawler’ s Algorithm

𝐷ℎ𝑠𝑝𝑂𝑣𝑛[∅] = 0 (the base situation) for 𝑇 (𝑇 ≠ ∅) in subsets of vertices of 𝐻 (Outer loop needs to be ordered from smaller to larger subsets): ChroNum[𝑇] = 𝑜 for 𝐽 in independent subsets of S: ChroNum[𝑇] = 𝑛𝑗𝑜(𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇], 𝐷ℎ𝑠𝑝𝑂𝑣𝑛[𝑇 − 𝐽] + 1)

slide-38
SLIDE 38

Time Complexity

We need to find all the independent set for all subset of the graph The time complexity is as follow:

Ο

𝑇⊆𝑊

𝑔𝑗𝑜𝑒 𝑢ℎ𝑓 In𝑒𝑓𝑞𝑓𝑜𝑒𝑓𝑜𝑢 𝑇𝑓𝑢 𝑝𝑔 𝑇 = Ο

𝑗=0 𝑜

𝑜 𝑗 𝑛2i = Ο 𝑛3𝑜

V S

I1 I2

Independent Set of S can be listed within O(𝑛2𝑗)

slide-39
SLIDE 39

Outline

 Problem Definition  Dynamic Programming Algorithm

  • Maximal Independent Set
  • Lawler’ s Algorithm
  • Time Complexity

 Björklund-Husfeldt Algorithm

  • Preliminary
  • K-Cover
  • Chromatic Number
slide-40
SLIDE 40

Preliminary

slide-41
SLIDE 41

Preliminary

slide-42
SLIDE 42

Definition 3.1: U is a set of all the vertices, S is a family of subsets of U, S is an element of S, X is also a set of vertices S[𝑌] ≔ { 𝑇 ∈ 𝑻 ∶ 𝑇 ∩ 𝑌 = ∅ } 𝑡 𝑌 ≔ | 𝑻 𝑌 | 𝑻(𝑗) ≔ 𝑇 ∈ 𝑻 ∶ 𝑇 = 𝑗 𝑡(𝑗) 𝑌 ≔ | 𝑻 𝑗 𝑌 |

Preliminary

slide-43
SLIDE 43

Preliminary

Given: 𝑜 = 5 𝑌 = {1,3} 𝑻 = 1,2,3 , 1,4 , 3,5 , 2,4,5 𝑻 𝑌 = 2,4,5 s 𝑌 = 1

S[𝑌] ≔ { 𝑇 ∈ 𝑻 ∶ 𝑇 ∩ 𝑌 = ∅ } 𝑡 𝑌 ≔ | 𝑻 𝑌 | 𝑻(𝑗) ≔ 𝑇 ∈ 𝑻 ∶ 𝑇 = 𝑗 𝑡(𝑗) 𝑌 ≔ | 𝑻 𝑗 𝑌 |

slide-44
SLIDE 44

Preliminary

Given: 𝑜 = 5 𝑌 = {1,3} 𝑻 = 1,2,3 , 1,4 , 3,5 , 2,4,5 𝑗 = 2 𝑻(2) = 1,4 , {3,5} 𝑡(2) 𝑌 = 0

S[𝑌] ≔ { 𝑇 ∈ 𝑻 ∶ 𝑇 ∩ 𝑌 = ∅ } 𝑡 𝑌 ≔ | 𝑻 𝑌 | 𝑻(𝑗) ≔ 𝑇 ∈ 𝑻 ∶ 𝑇 = 𝑗 𝑡(𝑗) 𝑌 ≔ | 𝑻 𝑗 𝑌 |

slide-45
SLIDE 45

Lemma 3.1: 𝑑𝑙 denote the number of (possible overlapping) k-covers 𝑑𝑙 ≔

𝑌 ⊆ 𝑉

(−1)|𝑌| 𝑡[𝑌]𝑙 𝑡[𝑌]𝑙 counts the number of ways to pick k sets 𝑇1, … , 𝑇𝑙 ∈ 𝑻 𝑌 with replacement

K-Cover

slide-46
SLIDE 46

K-Cover

Given: 𝑜 = 3 𝑻 = 2 , 2,3 , {1,3} When 𝑌 = 1 , k = 2: 𝑻 𝑌 = 2,3 , {2} 𝑡[𝑌]2= 4 After picking all subset X from U: 𝑑2 > 0

𝑑𝑙 ≔

𝑌 ⊆ 𝑉

(−1)|𝑌| 𝑡[𝑌]𝑙

slide-47
SLIDE 47

Chromatic Number

The main idea of Björklund-Husfeldt Algorithm is to use binary search to find the least k with 𝑑𝑙 is nonzero

slide-48
SLIDE 48

Chromatic Number

Theorem 3.1: The number of k-covers 𝑑𝑙 can be computed in time and space 2𝑜𝑜𝑃(1) Proposition 3.1: The chromatic number can be found in time 2𝑜𝑜𝑃(1) and space 2𝑜𝑜