Search and Problem Solving # MCQs Practice set

Q.1 Which of the following is a characteristic of an uninformed search algorithm?

Uses domain-specific knowledge
Does not use problem-specific knowledge
Always finds the optimal solution
Works only on heuristic functions
Explanation - Uninformed (blind) search algorithms operate without any additional information about the problem domain other than the definition of the problem itself.
Correct answer is: Does not use problem-specific knowledge

Q.2 What is the main drawback of Breadth-First Search (BFS)?

It is incomplete
It requires large memory
It may miss the optimal solution
It cannot handle infinite graphs
Explanation - BFS stores all nodes at each depth level, leading to high memory consumption in large or infinite state spaces.
Correct answer is: It requires large memory

Q.3 Depth-First Search (DFS) may fail to find a solution because:

It uses too much memory
It can get stuck in infinite paths
It is always incomplete
It does not expand nodes
Explanation - DFS may follow a deep path indefinitely if the search space is infinite, potentially missing other solutions.
Correct answer is: It can get stuck in infinite paths

Q.4 Which search strategy guarantees finding the shallowest goal node?

Depth-First Search
Greedy Search
Breadth-First Search
Hill Climbing
Explanation - BFS explores nodes level by level, ensuring the shallowest solution is found first.
Correct answer is: Breadth-First Search

Q.5 What type of algorithm is A* search?

Uninformed search
Heuristic-based informed search
Random search
Brute force search
Explanation - A* search uses heuristics along with path cost to find optimal solutions efficiently.
Correct answer is: Heuristic-based informed search

Q.6 Which function does A* search use to evaluate nodes?

g(n)
h(n)
f(n) = g(n) + h(n)
Depth(n)
Explanation - A* combines the actual cost to reach a node (g(n)) with the estimated cost to the goal (h(n)).
Correct answer is: f(n) = g(n) + h(n)

Q.7 In AI search, what does 'admissibility' of a heuristic mean?

Heuristic always returns the exact cost
Heuristic never overestimates the cost
Heuristic always underestimates the cost
Heuristic ignores costs completely
Explanation - An admissible heuristic is optimistic, ensuring A* search remains optimal.
Correct answer is: Heuristic never overestimates the cost

Q.8 Which uninformed search algorithm expands the shallowest unexpanded node first?

Uniform Cost Search
Breadth-First Search
Depth-First Search
Iterative Deepening Search
Explanation - BFS expands the shallowest node first by exploring nodes level by level.
Correct answer is: Breadth-First Search

Q.9 Which search method combines the advantages of BFS and DFS?

Hill Climbing
Iterative Deepening Search
Greedy Best-First Search
Random Search
Explanation - Iterative Deepening Search repeatedly runs DFS with increasing depth limits, combining DFS’s low memory usage with BFS’s completeness.
Correct answer is: Iterative Deepening Search

Q.10 What is the time complexity of BFS in terms of branching factor b and depth d?

O(b^d)
O(d^b)
O(b+d)
O(b*d)
Explanation - BFS explores all nodes level by level up to depth d, generating approximately b^d nodes.
Correct answer is: O(b^d)

Q.11 Uniform Cost Search is guaranteed to find:

Any solution
The deepest solution
The least-cost solution
The heuristic solution
Explanation - Uniform Cost Search expands nodes based on path cost, ensuring it finds the optimal cost path.
Correct answer is: The least-cost solution

Q.12 Which of the following is NOT a property of a good heuristic?

Admissibility
Consistency
Complexity
Overestimation
Explanation - Good heuristics should not overestimate costs, as it risks missing the optimal solution.
Correct answer is: Overestimation

Q.13 Which informed search algorithm uses only h(n) to decide which node to expand?

Uniform Cost Search
Greedy Best-First Search
A* Search
DFS
Explanation - Greedy Best-First Search expands nodes that appear closest to the goal, using h(n) alone.
Correct answer is: Greedy Best-First Search

Q.14 In problem-solving, the 'state space' refers to:

The physical memory of the computer
All possible configurations of the problem
The solution path only
The heuristic values
Explanation - State space includes all states (possible problem situations) reachable from the initial state.
Correct answer is: All possible configurations of the problem

Q.15 What does the branching factor in search problems represent?

The number of leaf nodes
The number of children per node
The number of levels in the tree
The cost of edges
Explanation - Branching factor measures the average number of successors per state in the search tree.
Correct answer is: The number of children per node

Q.16 Which algorithm is best suited for infinite-depth problems when memory is limited?

Breadth-First Search
Depth-First Search
Iterative Deepening Search
Greedy Search
Explanation - Iterative Deepening Search provides completeness like BFS while maintaining low memory like DFS.
Correct answer is: Iterative Deepening Search

Q.17 What does 'completeness' of a search algorithm mean?

It always finds a solution if one exists
It uses minimum memory
It finds the cheapest solution
It always terminates quickly
Explanation - Completeness ensures that the algorithm will not miss a solution if it is reachable.
Correct answer is: It always finds a solution if one exists

Q.18 Hill climbing is an example of which type of search?

Uninformed search
Local search
Adversarial search
Randomized search
Explanation - Hill climbing improves the current state step by step using local information, without exploring all states.
Correct answer is: Local search

Q.19 Which of the following problems is typically solved using search techniques?

Sorting numbers
Playing chess
Adding numbers
Compiling code
Explanation - Chess involves exploring a large search space of possible moves and outcomes, making search essential.
Correct answer is: Playing chess

Q.20 In A* search, if h(n) = 0 for all nodes, what does it reduce to?

DFS
Uniform Cost Search
Greedy Best-First Search
Hill Climbing
Explanation - With h(n)=0, A* considers only g(n), making it equivalent to Uniform Cost Search.
Correct answer is: Uniform Cost Search

Q.21 Which of the following is a drawback of greedy best-first search?

It is incomplete
It is not optimal
It consumes too much memory
It ignores depth
Explanation - Greedy best-first search may find suboptimal solutions since it only considers heuristic values.
Correct answer is: It is not optimal

Q.22 What is the main purpose of heuristics in AI search?

To reduce computation time
To guarantee completeness
To replace cost functions
To eliminate branching factor
Explanation - Heuristics guide the search towards the goal efficiently, reducing the number of nodes explored.
Correct answer is: To reduce computation time

Q.23 What does 'optimality' mean in search algorithms?

It always finds a solution
It finds the best solution with minimum cost
It always terminates quickly
It uses the least memory
Explanation - Optimality ensures that the chosen solution is the best possible according to the problem’s cost metric.
Correct answer is: It finds the best solution with minimum cost

Q.24 Which algorithm uses priority queue ordered by path cost?

Uniform Cost Search
DFS
Greedy Best-First Search
Iterative Deepening Search
Explanation - Uniform Cost Search expands nodes with the lowest cumulative path cost, implemented using a priority queue.
Correct answer is: Uniform Cost Search

Q.25 Which type of search is minimax algorithm used in?

Local search
Game tree search
Uninformed search
Random search
Explanation - Minimax is widely used in adversarial search, such as two-player games like chess or tic-tac-toe.
Correct answer is: Game tree search