Iterative Deepening: CPSC 322 - Search 6
Iterative Deepening: CPSC 322 - Search 6
= =
m
i
i m
m
i
i m
b i b ib b
(Time) Complexity of IDS
r
r
i
i
=
1
1
0
Geometric progression: for |r|<1:
) (
m
b O
2
0
1
0
) 1 (
1
r
ir r
dr
d
i
i
i
i
= =
=
=
) ) ( (
0
1 1
i
i m
b i b
2
1
1
1
=
b
b
m
2
1
=
b
b
b
m
Further Analysis of Iterative Deepening DFS (IDS)
Space complexity
DFS scheme, only explore one branch at a time
Complete?
Only finite #of paths up to depth m, doesnt explore longer paths
Optimal?
Proof by contradiction
19
O(b+m) O(b
m
)
O(bm)
O(m
b
)
Yes No
Yes No
Search methods so far
20
Complete Optimal Time Space
DFS N
(Y if no cycles)
N O(b
m
) O(mb)
BFS Y Y O(b
m
) O(b
m
)
IDS Y Y O(b
m
) O(mb)
LCFS
(when arc costs available)
Y
Costs > 0
Y
Costs >=0
O(b
m
) O(b
m
)
Best First
(when h available)
N N O(b
m
) O(b
m
)
A*
(when arc costs and h
available)
Y
Costs > 0
h admissible
Y
Costs >=0
h admissible
O(b
m
) O(b
m
)
(Heuristic) Iterative Deepening: IDA*
Like Iterative Deepening DFS
But the depth bound is measured in terms of the f value
If you dont find a solution at a given depth
Increase the depth bound:
to the minimum of the f-values that exceeded the previous bound
21
Analysis of Iterative Deepening A* (IDA*)
Complete and optimal? Same conditions as A*
h is admissible
all arc costs > 0
finite branching factor
Time complexity: O(b
m
)
Space complexity:
Same argument as for Iterative Deepening DFS
22
O(b+m) O(b
m
)
O(bm)
O(m
b
)
Examples and Clarifications
On the white board
23
Search methods so far
Complete Optimal Time Space
DFS N
(Y if no cycles)
N O(b
m
) O(mb)
BFS Y Y O(b
m
) O(b
m
)
IDS Y Y O(b
m
) O(mb)
LCFS
(when arc costs available)
Y
Costs > 0
Y
Costs >=0
O(b
m
) O(b
m
)
Best First
(when h available)
N N O(b
m
) O(b
m
)
A*
(when arc costs and h
available)
Y
Costs > 0
h admissible
Y
Costs >=0
h admissible
O(b
m
) O(b
m
)
IDA* Y (same cond.
as A*)
Y O(b
m
) O(mb)
Branch & Bound Y (same cond.
as A*)
Y O(b
m
) O(mb)
Define/read/write/trace/debugdifferentsearchalgorithms
- New: Iterative Deepening,
Iterative Deepening A*, Branch & Bound
Apply basic properties of search algorithms:
completeness, optimality, time and space complexity
Announcements:
New practice exercises are out: see WebCT
Heuristic search
Branch & Bound
Please use these! (Only takes 5 min. if you understood things)
Assignment 1 is out: see WebCT
25
Learning Goals for todays class