Branch and Bound Algorithm Basics
Breaking it Branches Bounding Solution
down
Branching involves Bounding lets us The algorithm ends
The Branch and Bound dividing the eliminate sub- when we reach the
Algorithm is a problem into problems that optimal solution or
mechanism for solving smaller sub- cannot lead to an when we identify
optimization problems. problems. optimal solution. that no such
solution exists.
Solving the Assignment Problem using
Branch and Bound
1 Setup
We set up the problem as
a matrix that represents
Pruning the Branches 2 the cost of assigning each
We prune sub-trees that worker to each task.
cannot yield an optimal
solution, reducing the
number of sub-trees we
3 Relaxing Constraints
have to explore. We apply a relaxation
strategy that involves
Single Final Solution 4 relaxing the constraints to
find the upper and lower
After examining all sub- bounds for the solution.
trees, we end up with a
single optimal solution.
BRANCH & BOUND
•The Branch & Bound algorithm is a method commonly used to solve
optimization problems.
•Many problems can be solved using these two methods.
•The Branch and Bound algorithm is an algorithm that uses a state space
tree to solve a problem, in this case it is similar to the backtracking
algorithm.
•Branch and bound refers to all state space search methods in which all
children of the E- Node are generated before any other live node
becomes the E- Node.
KEY WORDS:
•Live node is a node that has been generated but whose children have not yet been
generated.
•E- node is a live mode whose children are currently being explored. In other words,
an E-node is a node currently being expanded.
•Dead node is generated anode that is not be expanded or explored any further. All
children of a dead node have already been expanded.
•A node is declared as promising if the bound is better than the value of the best
solution so far and further expansion is possible.
•A node is declared as non-promising if the bound is no better than the value of the
best solution so far. So no expansions are possible beyond this point. This is called
pruning the state-space tree.
JOB ASSIGNMENT PROBLEM
Job Assignment Problem is one of the fundamental combinatorial
optimization problems in its most common form.
Examples of problems have a number of people and a number of jobs.
Each person can be assigned to do any job, which has different costs
depending on the job.
The goal is to do as many jobs as possible by assigning one person to
each job and one job per person, in such a way that the total cost is
minimized.
There are many methods that can be used to solve Job Assignment
Problems.
Introduction to Assignment Problem
Similarity to Rubik's
Definition Constraints
Cube
The Assignment Problem Looking for an optimal Each worker can be assigned
is a classic optimization solution is like solving a to at most one task, each
problem that involves Rubik's Cube; all the choices task can be assigned to at
assigning a set of interact simultaneously, and most one worker, and all
"workers" to a set of small changes can make a big tasks must be assigned.
"tasks." difference.
EXAMPLE
•The job assignment problem testing will be carried out in one example
of the following cases, namely there are 4 jobs and 4 people, each of
which has a cost as in table 1.
•Table 1 Job Assignment Problem matrix (4 jobs and 4 people) Job 1
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
THE ASSIGNMENT PROBLEM
•Solving Job Assignment Problems using Branch and Bound is done by
determining the lower limit by adding the minimum cost of each row.
•Minimum Cost of each Row
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
So that Lower Bound (LB) = 4+5+3+6=18
THE ASSIGNMENT PROBLEM
•There are 4 possibilities, namely A doing Job 1, A doing Job 2, A
doing Job 3 and A doing Job 4. Calculate the LB of each of these
possibilities.
•Possibility 1: Person 1 (A) does Job 1
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 1 is: 11+5+3+6=25
THE ASSIGNMENT PROBLEM
•Possibility 2: Person 1 (A) does Job 2
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 2 is: 4+5+3+6=18
THE ASSIGNMENT PROBLEM
•Possibility 3:
Person 1 (A) does Job 3
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 3 is: 9+6+7+6=28
THE ASSIGNMENT PROBLEM
•Possibility 4:
Person 1 (A) does Job 4
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 4 is: 10+5+3+8=26
THE ASSIGNMENT PROBLEM
The node with the minimum value to be expanded is
selected, namely A→2 with LB 18. Then the second
person (B) is chosen to do the job or assignment.
THE ASSIGNMENT PROBLEM
•There are 3 possibilities, namely B doing Job 1, Job 3, Job 4 (Job 2 is
done by A)
• Possibility 1: Person 2 (B) does Job 1
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 1 is: 4+8+3+6=21
THE ASSIGNMENT PROBLEM
•Possibility 2:
Person 2 (B) does Job 3
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 2 is: 4+5+7+6=22
THE ASSIGNMENT PROBLEM
•Possibility 3:
Person 2 (B) does Job 4
JOB 1 JOB 2 JOB 3 JOB 4
PERSON 1 A 11 4 9 10
PERSON 2 B 8 6 5 9
PERSON 3 C 7 10 3 10
PERSON 4D 9 8 11 6
Then LB for probability 3 is: 4+9+3+9=25
THE ASSIGNMENT PROBLEM
Next, select the node with the minimum cost to
expand, namely B→1.
THE ASSIGNMENT PROBLEM
•Next 2 possibilities:
• Possibility 1: A does Job 2, B does Job 1, C does Job 3 and D does
Job 4 with the cost 4+8+3+6 = 21
• Possibility 2: A does Job 2, B does Job 1, C does Job 4 and D does
Job 3 with the cost 4+8+10+11 = 33
Then the possibility of 1 is chosen with cost = 21, compared to all
the remaining nodes, this cost is the minimum cost so that it is
chosen as the solution.
THE ASSIGNMENT PROBLEM
SOLUTION:
A→2
B→1
C→3
D→4