1. Branch and bound is an algorithm that uses a state space tree to solve optimization problems like the knapsack problem and traveling salesman problem. It works by recursively dividing the solution space and minimizing costs at each step.
2. The document then provides an example of using branch and bound to solve a job assignment problem with 4 jobs and 4 people. It calculates lower bounds at each step of the algorithm and prunes branches that cannot lead to an optimal solution.
3. After exploring the solution space, the algorithm arrives at the optimal assignment of Person A to Job 2, Person B to Job 1, Person C to Job 3, and Person D to Job 4, with a minimum total cost of 21.
2
Branch & Bound
The Branch & Bound algorithm is a method commonly
used to solve optimization problems. Many problems can
be solved using these two methods. Some examples of
problems that the Branch & Bound algorithm can solve are
Knapsack Problems, Traveling Salesman Problems,
Scheduling Problems and many other optimization
problems.
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.
3.
3
The way theB&B algorithm works is based on the following two
principles.
1. Recursively divide the status space into smaller spaces and
minimize “costs” on these spaces. This process is called branching.
2. Branching will be equivalent to brute-force enumeration. To
improve performance, bound is used to limit the space in the status
that is generated, eliminating candidate solutions that are proven to
not contain optimal solutions.
As the name implies, this algorithm has a bound or limiting function.
This constraint function is useful for delimiting paths that are
considered not leading to a solution node.
WORKING OF B&B
4.
4
Job Assignment Problem
oJob 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.
o There are many methods that can be used to solve Job
Assignment Problems.
5.
5
Example
The jobassignment 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 4 (D) 9 8 11 6
6.
6
The assignment problem
SolvingJob 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 4 (D) 9 8 11 6
So that Lower Bound (LB) = 4+5+3+6 = 18
7.
7
The assignment problem
Thereare 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
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 4 (D) 9 8 11 6
Then LB for probability 1 is : 11+5+3+6 = 25
8.
8
The assignment problem
Possibility2: Person 1 (A) does Job 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 4 (D) 9 8 11 6
Then LB for probability 2 is : 4+5+3+6 = 18
9.
9
The assignment problem
Possibility3: Person 1 (A) does Job 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 4 (D) 9 8 11 6
Then LB for probability 3 is : 9+6+7+6 = 28
10.
10
The assignment problem
Possibility4: Person 1 (A) does Job 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 4 (D) 9 8 11 6
Then LB for probability 4 is : 10+5+3+8 = 26
11.
11
The assignment problem
thenode with the minimum value to be expanded is
selected, namely A2 with LB = 18. Then the second
person (B) is chosen to do the job or assignment.
12.
12
The assignment problem
Thereare 3 possibilities, namely B doing job 1, Job 3 or Job 4 (Job 2
is done by A)
Possibility 1: Person 2 (A) does Job 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 4 (D) 9 8 11 6
Then LB for probability 1 is :4+8+3+6 = 21
13.
13
The assignment problem
Possibility2: Person 2 (A) does Job 3
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 4 (D) 9 8 11 6
Then LB for probability 2 is :4+5+7+6 = 22
14.
14
The assignment problem
Possibility3: Person 2 (A) does Job 4
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 4 (D) 9 8 11 6
Then LB for probability 3 is :4+9+3+9 = 25
16
The assignment problem
Next2 possibilities:
Possibility 1: A does Job 2, B does Job 1, C does
Job 3 and D does Job 4 with the cost is 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 is 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.
19
The assignment problem
Conclusion
Theuse of branch and bound results in a shorter
solution because the branch and bound algorithm
performs calculations recursively, while still
calculating the best value, that is what is known as
branching. In addition, the best value is recorded for
each calculation, so that it can improve the
performance of the algorithm, what is known as
bounding.