Unformatted text preview: run on the same CPU. How to run all jobs using as few CPUs as possible?
I1 I4 I7 I2 0 1 2 3 4 5 14 15 I5 I8 I6 I3 c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 39 / 49 Scheduling All Intervals
Another way to look at the problem: c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 40 / 49 Scheduling All Intervals
Another way to look at the problem: Color the intervals in R by different colors. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 40 / 49 Scheduling All Intervals
Another way to look at the problem: Color the intervals in R by different colors. The intervals with the same color do not overlap. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 40 / 49 Scheduling All Intervals
Another way to look at the problem: Color the intervals in R by different colors. The intervals with the same color do not overlap. Using as few colors as possible.
I4 I1 I7 I5 I2 I8 I6 I3 0 1 2 3 4 5 14 15 c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 40 / 49 Scheduling All Intervals
Another way to look at the problem: Color the intervals in R by different colors. The intervals with the same color do not overlap. Using as few colors as possible.
I4 I1 I7 I5 I2 I8 I6 I3 0 1 2 3 4 5 14 15 This problem is also known as Interval Graph Coloring Problem. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 40 / 49 Scheduling All Intervals c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 41 / 49 Scheduling All Intervals
Graph Coloring
Let G = (V, E) be an undirected graph. A vertex coloring of G is an assignment of colors to the vertices of G so that no two vertices with the same color are adjacent to each other in G. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 41 / 49 Scheduling All Intervals
Graph Coloring
Let G = (V, E) be an undirected graph. A vertex coloring of G is an assignment of colors to the vertices of G so that no two vertices with the same color are adjacent to each other in G. Equivalently, a vertex coloring of G is a partition of V into vertex subsets so that no two vertices in the same subset are adjacent to each other.
I2 I1 I5 I4 I7 I8 I6 I3 c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 41 / 49 Scheduling All Intervals
Graph Coloring
Let G = (V, E) be an undirected graph. A vertex coloring of G is an assignment of colors to the vertices of G so that no two vertices with the same color are adjacent to each other in G. Equivalently, a vertex coloring of G is a partition of V into vertex subsets so that no two vertices in the same subset are adjacent to each other.
I2 I1 I5 I4 I7 I8 I6 I3 A vertex coloring is also called just coloring of G. If G has a coloring with k colors, we say G is kcolorable.
c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 41 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 42 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. Chromatic Number
(G) = the smallest k such that G is kcolorable c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 42 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. Chromatic Number
(G) = the smallest k such that G is kcolorable (G) = 1 iff G has no edges. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 42 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. Chromatic Number
(G) = the smallest k such that G is kcolorable (G) = 1 iff G has no edges. (G) = 2 iff G is a bipartite graph with at least 1 edge. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 42 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. Chromatic Number
(G) = the smallest k such that G is kcolorable (G) = 1 iff G has no edges. (G) = 2 iff G is a bipartite graph with at least 1 edge. Graph Coloring is a very hard problem. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 42 / 49 Scheduling All Intervals
Graph Coloring Problem
Input: An undirected graph G = (V, E) Output: Find a vertex coloring of G using as few colors as possible. Chromatic Number
(G) = the smallest k such that G is kcolorable (G) = 1 iff G has no edges. (G) = 2 iff G is a bipartite graph with at least 1 edge. Graph Coloring is a very hard problem. The problem can be solved in polytime only for special graphs. c Xin He (University at Buffalo) CSE 43...
View
Full
Document
This note was uploaded on 02/27/2012 for the course CSE 431/531 taught by Professor Xinhe during the Fall '11 term at SUNY Buffalo.
 Fall '11
 XINHE
 Algorithms

Click to edit the document details