Top MCQs on Backtracking Algorithm with Answers

Backtracking is an algorithmic technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point in time (by time, here, is referred to the time elapsed till reaching any level of the search tree). More On Backtracking Algorithm
Backtracking algorithms

Backtracking algorithms

Question 1
Which of the following is not a backtracking algorithm?
Cross
Knight tour problem
Cross
N queen problem
Tick
Tower of hanoi
Cross
M coloring problem


Question 1-Explanation: 
Knight tour problem, N Queen problem and M coloring problem involve backtracking. Tower of hanoi uses simple recursion.
Question 2

Backtracking can be used to solve: 

Cross

Linear programming problems

Cross

Problems with a single feasible solution

Tick

Combinatorial optimization problems

Cross

Problems with a fixed set of solutions



Question 2-Explanation: 

Backtracking is commonly used to solve combinatorial optimization problems. Combinatorial optimization problems involve finding the best possible solution from a finite set of possible solutions. These problems often require exploring a large solution space to determine the optimal solution.

Hence Option(C) is the correct answer.

Question 3

Backtracking may lead to a solution that is:

Cross

 Optimal 

Tick

Suboptimal 

Cross

Efficient 

Cross

Deterministic



Question 3-Explanation: 

Backtracking may lead to a solution that is suboptimal.

When using backtracking to solve a problem, the algorithm explores different possibilities and choices in a systematic manner. It makes choices at each step and backtracks if those choices don't lead to a valid or desired solution. While backtracking can help find solutions, there's no guarantee that the solution it eventually finds is the best or optimal solution.

Hence (B) is the correct answer.

Question 4

Backtracking is best suited for solving problems that involve:

Cross

Sorting elements 

Cross

Searching in a sorted list

Cross

 Dynamic programming 

Tick

Exploring all possible solutions



Question 4-Explanation: 

Backtracking is best suited for solving problems that involve exploring all possible solutions within a search space. It is particularly effective when the problem requires finding one or more solutions among a large set of potential candidates by systematically trying out different options and undoing choices that lead to dead ends. Backtracking is commonly used when an exhaustive search is required and when there is a need to find a valid solution or all possible solutions.

Hence Option(D) is the correct answer.

Question 5

Which of the following is an example of a problem that can be solved using backtracking?

Cross

Finding the median of an array

Cross

 Binary search in a sorted list 

Tick

Sudoku puzzle solving 

Cross

Calculating the sum of elements in an array



Question 5-Explanation: 

Sudoku puzzle solving problem is solved using backtracking algorithm.

Refer this for more reference: https://www.geeksforgeeks.org/sudoku-backtracking-7/ 

Hence (C) is the correct answer.

Question 6

Which of the following is NOT a characteristic of the backtracking algorithm? 

Cross

Recursive approach

Tick

Breadth-first exploration 

Cross

Depth-first exploration 

Cross

Trial and error



Question 6-Explanation: 

"Breadth-first exploration" is not a characteristic of the backtracking algorithm. 
Backtracking follows a depth-first exploration strategy, and the other options (a, c, and d) are all characteristics that are associated with the backtracking approach.

Hence (B) is the correct answer.

Question 7

Backtracking involves: 

Cross

Starting from the end of the problem 

Cross

Using a stack to keep track of solutions

Cross

Iterating through all elements in a list 

Tick

Going back to a previous step if the current step doesn't work 



Question 7-Explanation: 

Backtracking is a technique used in solving problems where you systematically explore different possibilities by making choices at each step. If a choice leads to a dead end or an invalid solution, the algorithm "backs up" to a previous step (backtracks) and tries a different choice. This process continues until a valid solution is found or all possibilities have been explored.

Hence (D) is the correct answer.

Question 8

Who coined the term "Backtracking"?

Tick

Lehmer

Cross

Donald

Cross

Ross

Cross

Ford



Question 8-Explanation: 

The term "backtracking" was popularized and introduced to the field of computer science by American mathematician and computer scientist D. H. Lehmer. He used the term in his 1950 paper titled "A machine program for theorem-proving" published in the journal Communications of the ACM. Backtracking refers to the technique of systematically searching through a problem's solution space by trying out different possibilities and "backtracking" or undoing choices that lead to dead ends.

Hence (A) is the correct answer.

Question 9

The backtracking algorithm is implemented by constructing a tree of choices known as?
 

Cross

State-chart-tree

Cross

Node tree

Cross

Backtracking tree

Tick

State-space tree



Question 9-Explanation: 

The backtracking algorithm is implemented by constructing a tree of choices known as the "search tree" or "state space tree." Each node in the tree represents a decision point or a possible solution, and the branches of the tree represent the different choices that can be made at each decision point. As the algorithm explores the tree, it backtracks (reverses its steps) whenever it encounters a dead end or a solution that doesn't meet the required conditions. This tree structure helps visualize the process of exploring various possibilities and finding a valid solution through systematic trial and error.

Hence (D) is the correct answer.

Question 10

 What happens when the backtracking algorithm reaches a complete solution?

Cross

It backtracks to the root

Cross

It traverses from a different route

Tick

it continues searching for other possible solutions

Cross

Recursively traverses through the same route



Question 10-Explanation: 

When the backtracking algorithm finds a complete solution:It means the algorithm has figured out a way to solve the problem completely. The algorithm either stops looking for more solutions because it has already found one that works, or ontinue searching for other possible solutions.

Hence (C) is the correct answer.

There are 10 questions to complete.

  • Last Updated : 27 Sep, 2023

Share your thoughts in the comments
Similar Reads