Day 7 Flashcards

1
Q

Depth-first search is a recursive algorithm for traversing a tree or graph data structure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

o It is called the depth-first search because it starts from the root node and follows each path to its greatest depth node before moving to the next path

A

o It is called the depth-first search because it starts from the root node and follows each path to its greatest depth node before moving to the next path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Advantages of DFS:

A

DFS requires very less memory as it only needs to store a stack of the nodes on the path from root node to the current node.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Advantages of DFS:

A

It takes less time to reach to the goal node than BFS algorithm (if it traverses in the right path).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Disadvantages of DFS

A

There is the possibility that many states keep re-occurring, and there is no guarantee of finding the solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Disadvantages of DFS

A

DFS algorithm goes for deep down searching and sometimes it may go to the infinite loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The process of the DFS algorithm is similar to the BFS algorithm.

A

صح

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DFS uses a stack data structure for its implementation

A

DFS uses a stack data structure for its implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A variant of depth-first search called backtracking search uses even less memory.

A

A variant of depth-first search called backtracking search uses even less memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Time Complexity: Time complexity of DFS will be equivalent to the node traversed by the algorithm. It is given by:
T(n)= 1+ n2+ n3 +………+ n^m=O(n^m)

A

Where, m= maximum depth of any node and this can be much larger than d (Shallowest solution depth)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Space Complexity: DFS algorithm needs to store only single path from the root node, hence space complexity of DFS is equivalent to the size of the fringe set, which is O(bm)

A

Space Complexity: DFS algorithm needs to store only single path from the root node, hence space complexity of DFS is equivalent to the size of the fringe set, which is O(bm)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Completeness: DFS search algorithm is complete within finite state space as it will expand every node within a limited search tree. In infinite state spaces, depth-first search is not systematic: it can get stuck going down an infinite path, even if there are no cycles. Thus, depth-first search is incomplete.

A

Completeness: DFS search algorithm is complete within finite state space as it will expand every node within a limited search tree. In infinite state spaces, depth-first search is not systematic: it can get stuck going down an infinite path, even if there are no cycles. Thus, depth-first search is incomplete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Optimality: DFS search algorithm is non-optimal, as it may generate a large number of steps or high cost to reach to the goal node

A

Optimality: DFS search algorithm is non-optimal, as it may generate a large number of steps or high cost to reach to the goal node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

o A depth-limited search algorithm is similar to depth-first search with a predetermined limit ℓ. Depth-limited search can solve the drawback of the infinite path in the Depth-first search. In this algorithm, the node at the depth limit will treat as it has no successor nodes further

A

o A depth-limited search algorithm is similar to depth-first search with a predetermined limit ℓ. Depth-limited search can solve the drawback of the infinite path in the Depth-first search. In this algorithm, the node at the depth limit will treat as it has no successor nodes further

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Depth-limited search can be terminated with two Conditions of failure:
➢Standard failure value: It indicates that problem does not have any solution.
➢Cutoff failure value: It defines no solution for the problem within a given depth limit

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advantages of depth-limited search

o Depth-limited search is Memory efficient.

A
17
Q

Time Complexity: Time complexity of DLS algorithm is O(bℓ).

A

Time Complexity: Time complexity of DLS algorithm is O(bℓ).

18
Q

Space Complexity: Space complexity of DLS algorithm is O(b×ℓ).

A

Space Complexity: Space complexity of DLS algorithm is O(b×ℓ).

19
Q

Completeness: DLS search algorithm is complete if the solution is above the depth-limit

A

Completeness: DLS search algorithm is complete if the solution is above the depth-limit

20
Q

The iterative deepening algorithm is a combination of DFS and BFS algorithms. This search algorithm finds out the best depth limit and does it by gradually increasing the limit until a goal is found.

A

The iterative deepening algorithm is a combination of DFS and BFS algorithms. This search algorithm finds out the best depth limit and does it by gradually increasing the limit until a goal is found.

21
Q

This algorithm performs depth-first search up to a certain “depth limit”, and it keeps increasing the depth limit after each iteration until the goal node is found.

A
22
Q

The iterative search algorithm is useful uninformed search when search space is large, and depth of goal node is unknown.

A
23
Q

It combines the benefits of BFS and DFS search algorithm in terms of fast search and memory efficiency

A
24
Q

The main drawback of IDDFS is that it repeats all the work of the previous phase.

A
25
Q

Bidirectional search algorithm runs two simultaneous searches, one form initial state called as forward-search and other from goal node called as backward-search, to find the goal node. The search stops when these two graphs intersect each other

A
26
Q

Bidirectional search replaces one single search graph with two small subgraphs in which one starts the search from an initial vertex and other starts from goal vertex

A
27
Q

Advantages
o Bidirectional search is fast.
o Bidirectional search requires less memory

A
28
Q

Disadvantages
o Implementation of the bidirectional search tree is difficult.
o In bidirectional search, one should know the goal state in advance.

A
29
Q

Bidirectional search can use search techniques such as BFS, DFS, DLS, etc

A