problem definition problem definition problem definition
play

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


  1. Problem Definition

  2. Problem Definition

  3. Problem Definition

  4. Problem Definition

  5. Problem Definition ⇒

  6. Problem Definition 4 colors

  7. Problem Definition 4 colors 3 colors

  8. 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

  9. 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?

  10. 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 𝑜 ≤ 𝑃 𝑜 𝑜

  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 𝑜 ≤ 𝑃 𝑜 𝑜 It’s tooooooo slow!!!

  12. 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 )

  13. 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.

  14. 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 𝑜 )

  15. 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

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

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

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

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

  20. 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:

  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:

  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 (K-1) colorable Independent Set Proof:

  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: 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

  24. 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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  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)

  37. 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 𝑗 )

  38. Outline  Problem Definition  Dynamic Programming Algorithm • Maximal Independent Set • Lawler’ s Algorithm • Time Complexity  Björklund-Husfeldt Algorithm • Preliminary • K-Cover • Chromatic Number

  39. Preliminary

  40. Preliminary

Recommend


More recommend