Professional Documents
Culture Documents
Uniform Cost Search & Branch and Bound Search
Uniform Cost Search & Branch and Bound Search
5 2
[5] [2]
1 4 1 7
[6] [9] [3] [9]
Goal state
4 5
2
Uniform Cost Search (UCS)
5 2
[5] [2]
3
Uniform Cost Search (UCS)
5 2
[5] [2]
1 7
[3] [9]
4
Uniform Cost Search (UCS)
5 2
[5] [2]
1 7
[3] [9]
4 5
[7] [8]
5
Uniform Cost Search (UCS)
5 2
[5] [2]
1 4 1 7
[6] [9] [3] [9]
4 5
[7] [8]
6
Uniform Cost Search (UCS)
5 2
[5] [2]
Goal state
1 4 1 7
path cost
g(n)=[6] [3] [9]
[9]
4 5
[7] [8]
7
Uniform Cost Search (UCS)
5 2
[5] [2]
1 4 1 7
[6] [9] [3] [9]
4 5
[7] [8]
8
Uniform Cost Search (UCS)
In case of equal step costs, Breadth First search finds
the optimal solution.
2 a
1
b c
1 2 1 2
f gc dc ec
2 a
1
Closed list:
Open list: a
0
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
Closed list: a
Open list: b c
2 1
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
dc ec
Closed list: a c
Open list: b d e
2 2 3
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
Closed list: a c b
Open list: d e f g
2 3 3 4
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
Closed list: a c b d
Open list: e f g
3 3 4
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
Closed list: a c b d e
Open list: f g
3 4
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
Closed list: a c b d e f
Open list: g
4
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
Closed list: a c b d e f g
Open list:
Traveling Salesman Problem
• Solution: Branch and Bound Path Search Technique
The cost matrix is
∞ 20 30 10 11
15 ∞ 16 4 2
3 5 ∞ 2 4
19 6 18 ∞ 3
16 4 7 16 ∞
Step 1: Find the reduced cost matrix
∞ 10 20 0 1
13 ∞ 14 2 0
The resulting row wise reduced cost matrix = 1 3 ∞ 0 2
16 3 15 ∞ 0
12 0 3 12 ∞
Row wise reduction sum = 10+2+2+3+4=21.
•Now apply column reduction for the above matrix:
•Deduct 1 (which is the minimum) from all values in the 1 st column.
•Deduct 3 (which is the minimum) from all values in the 2 nd column.
Column Reduction
∞ 10 17 0 1
12 ∞ 11 2 0
The resulting column wise reduced cost matrix (A) = 0 3 ∞ 0 2
15 3 12 ∞ 0
11 0 3 12 ∞
Column wise reduction sum = 1+0+3+0+0=4.
Cummulative
Cumulative reduced sum = row wise reduction + column wise reduction sum.
=21+ 4 =25.