Lecture 3 - Uninformed Search II
Lecture 3 - Uninformed Search II
Chapter 3
Implementation:
fringe is a FIFO queue, i.e., new successors go
at end
Implementation:
fringe is a FIFO queue, i.e., new successors go
at end
Implementation:
fringe is a FIFO queue, i.e., new successors go at end
Proof of Completeness:
Given that every step will cost more than 0, and assuming a finite branching factor, there is a
finite number of expansions required before the total path cost is equal to the path cost of the
goal state. Hence, we will reach it in a finite number of steps.
O( b [1 + floor(C*/e)] )
Why?
floor(C*/e) ~ depth of solution if all costs are
approximately equal
Uniform-cost search
Expand least-cost unexpanded node
Implementation:
queue ordered by path cost
Equivalent to breadth-first if step costs all equal
Complete? Yes, if step cost ≥ ε
Time? # of nodes with g ≤ cost of optimal solution, O(b ceiling(C*/ ε))
where C* is the cost of the optimal solution
Space? #of nodes with g ≤ cost of optimal solution, O(bceiling(C*/ ε))
Optimal? Yes – nodes expanded in increasing order of g(n)
Depth of Nodes
Solution Generated Time Memory
implementation:
For b = 10, d = 5,
NDLS = 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111
NIDS = 6 + 50 + 400 + 3,000 + 20,000 + 100,000 = 123,456
Time?
Space? O(bd)
Optimal? Yes, if step cost = 1
Complexity
time complexity at best is: O(2 b(d/2)) = O(b (d/2))