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 at most k colors , with adjacent vertexes in different color. Chromatic number: the smallest k of a graph
Problem Definition 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 How to calculate Chromatic number? How to get the k-coloring graph? What’s the time complexity?
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 𝑜 ≤ 𝑃 𝑜 𝑜
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!!!
Time Complexity One solution is to enumerate all the condition. Each vertex has k coloring scheme. It’s tooooooo slow!!! So the time complexity is 𝑃(𝑙 𝑜 ) 。 Can we find a polynomial time complexity? 𝑃(𝑜 3 ) 𝑃(𝑜 20 ) 𝑃(𝑜 1000 )
Time Complexity One solution is to enumerate all the condition. Each vertex has k coloring scheme. It’s tooooooo slow!!! So the time complexity is 𝑃(𝑙 𝑜 ) 。 Can we find a polynomial time complexity? 𝑃(𝑜 3 ) 𝑃(𝑜 20 ) 𝑃(𝑜 1000 ) No, because it’s an NP-hard problem.
Time Complexity One solution is to enumerate all the condition. Each vertex has k coloring scheme. It’s tooooooo slow!!! So the time complexity is 𝑃(𝑙 𝑜 ) 。 Can we find a polynomial time complexity? 𝑃(𝑜 3 ) 𝑃(𝑜 20 ) 𝑃(𝑜 1000 ) 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 𝑜 )
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
Independent Set Definition 2.1: An independent set of G is a subset 𝑇 ⊆ 𝑊 such that no two nodes in S are adjacent in G.
Definition 2.1: Let G[S] be the graph induced by S from G
Definition 2.1: Let G[S] be the graph induced by S from G
Definition 2.1: Let G[S] be the graph induced by S from G
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 K colorable Proof:
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:
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 (K-1) colorable Independent Set Proof:
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Time Complexity We need to find all the independent set for all subset of the graph The time complexity is as follow: 𝑜 𝑜 𝑛2 i = Ο 𝑛3 𝑜 Ο 𝑔𝑗𝑜𝑒 𝑢ℎ𝑓 In𝑒𝑓𝑞𝑓𝑜𝑒𝑓𝑜𝑢 𝑇𝑓𝑢 𝑝𝑔 𝑇 = Ο 𝑗 𝑇⊆𝑊 𝑗=0 V S Independent Set of S I1 I2 can be listed within O(𝑛2 𝑗 )
Outline Problem Definition Dynamic Programming Algorithm • Maximal Independent Set • Lawler’ s Algorithm • Time Complexity Björklund-Husfeldt Algorithm • Preliminary • K-Cover • Chromatic Number
Preliminary
Preliminary
Recommend
More recommend