Академический Документы
Профессиональный Документы
Культура Документы
Lesson 1
Lesson 2
4
18 Ram Meshulam 2004
Limited DFS Attributes
• Completeness – Yes, if d≤l
• Optimality – No.
• Time Complexity: O (bl )
– If d<l, it is larger than in BFS
• Memory Complexity: O(bl )
– Where b is branching factor and l is the
depth limit.
4,10 c
5,13 7,17c 8,20
11 12 14 c
15 18 19 21 22
S G
2 a
1
b c
1 2 1 2
f gc dc ec
2 a
1
Closed list:
a
0
Open
28
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
a
Closed list:
b c
2 1
Open
29
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
dc ec
a c
Closed list:
b d e
2 2 3
Open
30
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
a c b
Closed list:
d e f g
2 3 3 4
Open
31
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
a c b d
Closed list:
e f g
3 3 4
Open
32
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
a c b d e
Closed list:
f g
3 4
Open
33
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
a c b d e f
Closed list:
g
4
Open
34
list:
Example of Uniform Cost Search
2 a
1
b c
1 2 1 2
f gc dc ec
a c b d e f g
Closed list:
Open
35
list:
Uniform Cost Search Attributes
• Completeness: yes, for positive weights
• Optimality: yes
c / e
• Time & Memory complexity: O (b (b )
– Where b is branching factor, c is the optimal solution cost
and e is the minimum edge cost (each operator cost at
least e).
– UCS uses cost path and not length path, therefore, the ‘d’
term is not used here.