Documente Academic
Documente Profesional
Documente Cultură
• Introduction to Scheduling
• Complexity
• Solving NP-Hard in the Strong Sense Problem
• Objective Function
• B&B
• Bounding VS Objective Function
• B&B in Search Tree
• B&B in general
• B&B Algorithm and Components
• Bounding Function
• Strategy to find next subproblem
• Example
• Conclusion
• References
Presented by Chaiyut Thanukaew 1
Introduction to Scheduling
What is a scheduling?
Scheduling*: a plan of work to be done in a specified order and by specified times
Constraints Time
Tasks
Resources
(Jobs)
(Machines)
Objective(s)
Scheduling problems;
-Allocation of scarce resources to tasks over time
-Decision problem with one or more objective
1
Complexity
The complexity will determine running time of an algorithm used to solve such
the scheduling problem.
NP-hard in the strong sense: The problem cannot be optimally solved by the
algorithm with pseudo polynomial complexity.
So, how to solve
(P) -Deterministic Polynomial Time Algorithm NP-hard?
(NP) –Non-deterministic Polynomial Time Algorithm
• Heuristic Approach
=> yields satisfied solution in much faster time
When B&B?
- Scheduling problem in NP-hard
- Need an optimal solution
- With Tree Structure, the bound can help to eliminate infeasible solutions
2
Objective Function
Where;
f : Objective function
X : Variable of (x1, x2,…,xn)
S : Region of feasible solutions (determined by general conditions on the variables)
*In case of maximization problems, it can be dealt with similarity.
=> The basic idea of B&B is to enumerate the problem into Tree Topology then to
use the calculated bound for elimination of infeasible solutions.
f
Where;
g
f : Objective function
g : Bounding function
S S: Region of feasible solutions
P: Region of potential solutions
P
Bounding function
A function g(x) is defined on S (or P) with a property that g(x) <= f(x)
for all x in S (resp. in P).
6
3
B&B in Search Tree
child nodes
... Level 2
Subproblem with bounding function g
by adding 1 more constraint
leaves Level n
Value of feasible solutions
–upper bound
B&B in General
4
B&B Algorithm and Components
B&B algorithms
1. Solve a lower bound for current node
If solution exceeds UB, the node is terminated –since g (Pi) <= f (Pi)
If not, branching this node.
2. Create branching to get subproblems by adding 1 new constraint (usually)
3. Repeat until no branch remains, return optimal solution consist with original
constraint. Note that at the leaves, g (Pi) = f (Pi)
Bounding Function
Bounding function
10
5
Strategy for selecting next subproblem
• The best first search strategy (BeFS): selecting one among the live
subproblems those with the lowest bound
2. Breath first search strategy (BFS): all nodes at the same level of the search
tree are processed before any node any node at a higher level
3. Depth first search strategy (DFS): a live node with the largest level in the
search tree is explored firstly
11
How?
f =1, g = 0
1
1. Find f and then g
f =1, g = 0.5 f =2, g = 0.5
2. When g < f, branching
2 3
3. At any leaf, g = f
f=g=1 f = 3, g = 2.5 4. Ordering acc.to the
lowest bound
4 6 5 9
f=g=2 f=g=4
7 8
f=g=3 f=g=4
12
6
Strategy for selecting next subproblem
f =1, g = 0 f =1, g = 0
1 1
2 3 2 7
4 5 6 7 3 4 8 9
f=g=2 f=g=4 f=g=2 f=g=4
8 9 5 6
f=g=3 f=g=4 f=g=3 f=g=4
13
Problem?
We may somehow need to calculate to find f and g of the live nodes till
the largest level.
Hmm…too tough!!!
Idea
To explore only the node with the small lower bound first hopefully leads to a
good feasible solution.
Solution
DFS combined with BeFS
14
7
B&B Example (1)
Jobs 1 2 3 4
EDD rule (Earliest Due Date) is
p(j) 4 2 6 5
optimal algorithm to solve Lmax
r(j) 0 1 3 5 problem!
d(j) 8 12 11 10
(?,?,?,?) Level 0
15
1 3 4 3 2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
t
d(4)<d(3) d(3)<d(2)
EDD: Earliest Due Date first (optimal algorithm for Lmax problem)
Preemption: The processing of a job can be interrupted and later resumed (on the same or another machine)
Lateness of job j: Lj= Cj–dj
Maximum lateness: Lmax=max (L1,..., Ln) 16
8
B&B Example (1)
Jobs 1 2 3 4
p(j) 4 2 6 5 (?,?,?,?) Level 0
r(j) 0 1 3 5
d(j) 8 LB=5
12 11 10 LB=5, UB=6 LB=7=UB
Optimal sequence 17
• We can eliminate some nodes due to constraint of the original problem without
calculation.
• We have EDD rule to optimally solve Lmax problem at hand and preemptive
EDD to find the minimal bound.
⇒What about other problems without algorithm to solve optimally or very
tough problems e.g. TSP?
• In this problem, we use Relaxation to find value of the lower bound. We can
say the resulting value of the lower bound is a solution to an “easier” problem.
• We also use DFS combining with BeFS Strategy for selecting next
subproblem.
• To solve B&B efficiently and quickly may demand personal experiences even
to program software to solve it.
18
9
B&B Example (2)
Conclusion
Thank You!
20
10
References
[1] Jens Clausen, Branch and Bound Algorithms –Principles and Examples
[3] Michael Pinedo, Scheduling –Theory, Algorithms, and Systems, 2nd edition,
2002, Prentice-Hall Inc. Pearson Education
21
11