Algorithms and Complexity MCQs (Part-7)

What is the primary purpose of backtracking algorithms?

A To find optimal solutions
B To explore all possible solutions
C To minimize time complexity
D To solve linear equations

What is the time complexity of solving the Travelling Salesman Problem (TSP) using brute force?

A O(n)
B O(n^2)
C O(2^n)
D O(n!)

Which of the following is an example of an NP-Complete problem?

A Knapsack problem
B Sorting an array
C Matrix multiplication
D Searching a sorted array

What is a branch-and-bound method used for?

A Finding maximum flow
B Solving non-linear equations
C Searching for optimal solutions
D Sorting data

What is the space complexity of the backtracking algorithm?

A O(1)
B O(n)
C O(n^2)
D Depends on problem

Which problem is categorized as NP-Hard?

A Binary Search
B Longest Path Problem
C Dijkstra’s Algorithm
D Merge Sort

Which of the following problems is NP-Complete?

A Subset Sum Problem
B Sorting a list
C Finding a maximum element
D Matrix addition

What does a branch-and-bound algorithm typically involve?

A Linear search
B Using recursion without bounds
C Pruning branches to eliminate non-optimal solutions
D Sorting solutions to find the optimal one

What is the key characteristic of NP-Hard problems?

A Solvable in polynomial time
B Cannot be solved by backtracking
C Always solvable in logarithmic time
D Not necessarily in NP

Which of the following algorithms uses a backtracking approach to solve problems?

A Merge Sort
B Depth-First Search
C Quick Sort
D Dijkstra’s Algorithm

What is the main disadvantage of the branch-and-bound method?

A Inefficient for large-scale problems
B High space complexity
C No optimal solution is found
D Slow convergence

Which of the following is a characteristic of NP-Complete problems?

A Have a known polynomial-time solution
B Do not require recursion
C Can be verified in polynomial time
D Can only be solved with brute force

Which problem is solved using the backtracking algorithm?

A N-Queens Problem
B Linear Search
C Knapsack Problem
D Dijkstra’s Algorithm

What is the best approach to solve NP-Hard problems?

A Use brute-force methods
B Use a dynamic programming approach
C Approximation algorithms
D Linear search

Which of these problems is an example of an NP-Complete problem?

A Binary Search
B Merge Sort
C Hamiltonian Path Problem
D Quick Sort