UNINFORMED SEARCHING IN AI Flashcards
What’s the time complexity of BFS & DFS
It’s b^d, where
b –> Branching factor: Max number of children that a node has.
d –> Depth of the node.
What’s the space Complexity of BFS & DFS
BFS –> b^(d+1)
DFS –> b*d
b –> Branching factor: Max number of children that a node has.
d –> Depth of the node.
Explain Depth Limit Search(DLS)
This is similar to DFS, it introduces a predetermined limit for the depth. This is done to overcome the disadvantage of DFS, which is blind alley.
DLS is not complete because solution may lie beyond the cut-off depth.
It takes O(b^l) time and O(bl) space, where l is the depth limit.
Explain DFS Iterative Deepening
DFS-ID calls DFS for different depths starting from an initial value. In every call, DFS is restricted from going beyond given depth.
DFS-ID is complete and gives optimal result.
What’s the time and space complexity of Uniform Cost Search(UCS)
Time complexity –> (b^c)/m
Space complexity –> b^(d+1), where
b –> Branching factor.
c –> Cost of optimal path.
d –> Depth of the node.
m –> minimum edge length.