Integer Programming Solutions For Graph Problems: in This Handout - Assignment Problem - Coloring Problem
Integer Programming Solutions For Graph Problems: in This Handout - Assignment Problem - Coloring Problem
In this handout
• Assignment Problem
• Coloring Problem
Assignment Problem
• Given: n people and n jobs
Each person can be assigned to exactly one job
Each job should be assigned to exactly one person
Person-job compatibility is given by a directed network
(e.g., having a link A x means “person A can do job x ”)
• Goal: Find an assignment of n jobs to n people
(if such an assignment exists).
• Example:
people A B C D E
jobs x y z u v
Maximum Assignment Problem
• Consider the example given by the graph below.
• Jobs (u, v, w) can be done by only 2 people (E, F) ; thus, one of the
three jobs will be unassigned.
• When the original assignment problem is infeasible we can consider a
variation of the problem where the goal is to maximize the number
of assigned jobs (or people).
• In the example below, the maximum number of assignments is 5:
A-x, B-y, C-z, E-u, F-v
people A B C D E F
jobs x y z u v w
Solving Maximum Assignment problem by integer
programming
set students;
set projects;
set arcs within students cross projects;
s.t. different_colors_for_adjacent_nodes
{c in colors, i in nodes, j in nodes: (i,j) in arcs}:
assign[i,c] + assign[j,c] <= 1;
Note that all the entries in matrix A of functional constraints are 0, 1, -1.
But in this case A is not totally unimodular.
Solving the integer program for a data set
data;
set nodes:= A B C D E F;
set arcs:=
AB
BC
CD
DE
EA
C F;
The AMPL output for the data set
objective 1 10 "assign['C','blue']" 0.5
var := 11 "assign['C','red']" 0.5
1 "use['blue']" 0.5 12 "assign['C','green']" 0
2 "use['red']" 0.5 13 "assign['D','blue']" 0.5
3 "use['green']" 0 14 "assign['D','red']" 0.5
4 "assign['A','blue']" 0.5 15 "assign['D','green']" 0
5 "assign['A','red']" 0.5 16 "assign['E','blue']" 0.5
6 "assign['A','green']" 0 17 "assign['E','red']" 0.5
7 "assign['B','blue']" 0.5 18 "assign['E','green']" 0
8 "assign['B','red']" 0.5 19 "assign['F','blue']" 0.5
9 "assign['B','green']" 0 20 "assign['F','red']" 0.5
21 "assign['F','green']" 0 ;
For this example, the LP-relaxation does not return integer solution.
An application of graph coloring in scheduling
Twelve faculty members in a mathematics department serve on the
following committees:
Undergraduate education: Sineman, Limitson, Axiomus, Functionini
Graduate Education: Graphian, Vectorades, Functionini, Infinitescu
Colloquium: Lemmeau, Randomov, Proofizaki
Library: Van Sum, Sineman, Lemmeau
Staffing: Graphian, Randomov, Vectorades, Limitson
Promotion: Vectorades, Van Sum, Parabolton
The committees must all meet during the first week of classes, but
there are only three time slots available. Find a schedule that will
allow all faculty members to attend the meetings of all committees
on which they serve.
Model and solve the problem by graph coloring.
(the solution on the board)