Priority list
(dictated by labor cost, availability, weather, etc): F H J I D E A C G
B
Note: this problem is also NP hard (just like the Hamilton circuit)
A task is ready at
a particular time, if all its predecessors in the requirement
digraph have been completed.
e.g. you can't do the wiring
until the interior walls are done.
repeat until all tasks are done:
assign the first ready and not yet assigned task on the priority list to the lowest numbered processor
Example: same requirement digraph, different priority list: T1,T2,T3,T4,T5,T6,T7,T8
Schedule the tasks on two processors and find the
completion time.
sofar the priorities list was given in the beginning
Question: Is there a systematic way of choosing a priorities list that yields better results when processing a list?
use the critical path scheduling algorithm to
generate a priorities list
schedule tasks on a single processor
repeat until no more vertices are left in the directed graph:
![]()
- use the critical path scheduling algorithm to find a priority list
- use the list processing algorithm to schedule the tasks on
- 2 processors. What is the minimum completion time?
- 3 processors. What is the minimum completion time?
Given independent tasks of various time lengths and some processors
Schedule the tasks on the processors, so as to minimize total completion
time
Decreasing Time List Processing Algorithm
Example: Given 8 tasks with a total time length of 72 minutes. Distributed onto 3 processors, what is the minimum completion time?
Task: Given objects with weights w1, w2,
w3,... , wn
Find the minimum number
of bins with weight capacity w, so that all objects can be packed into
the bins and never exceed the weight capacity for any bin.
Applications:
Heuristics:
Example: Pack items of these sizes:
6, 3, 4, 5, 2, 3, 4, 2, 6, 1
into bins of size 8.
represent conflicts via graphs: vertices are objects, an edges represents a conflicts between two objects.
Example: schedule committee meetings for members of a state legislature.
vertices: committees:
edge: there is a legislator who is a member of two committees, who would have a time conflict if both committees held meetingsAgriculture A, Commerce C, Consumer Affairs CA, Education E, Forests F, Health H, Justice J, Labor L, Rules R
A | C | CA | E | F | H | J | L | R | |
A | x | x | x | ||||||
C | x | x | x | x | |||||
CA | x | x | x | x | |||||
E | x | x | x | ||||||
F | x | x | x | x | |||||
H | x | x | x | x | |||||
J | x | x | x | x | |||||
L | x | x | x | ||||||
R | x | x | x |
Draw the graph represented by this table.
Vertex Coloring: color the vertices
so that no two vertices sharing an edge are colored with the same color.
(different color - different meeting time)
The chromatic number is the least
number of colors needed to do the vertex coloring.
(least number of colors - least number of different meeting times needed
so that no legislator has a time conflict)