Skip to content

Unit 5 - Previous Questions

Backtracking

N-Queens Problem

  1. Compare Backtracking and Branch-and-Bound programming techniques.

  2. What is backtracking? Explain how it can be used to solve the n-Queens problem, and obtain one solution for the 4-Queens problem using a state space tree.

  3. Explain the Backtracking algorithm and apply it to solve the 4-Queens problem

  4. Apply Backtracking to find all possible solutions to the 4-Queens problem.

Hamiltonian Circuit Problem

  1. Define a Hamiltonian Circuit.

  2. Compare Brute Force and Backtracking methods for finding Hamiltonian circuits in a graph.

  3. Apply Backtracking to find all possible solutions to the Hamiltonian circuit problem. (2023 Sep, Fig 7)

  4. Apply Backtracking to the problem of finding a Hamiltonian circuit in the given graph. (2021 Sep, Fig 13)

  5. Illustrate how Backtracking can be applied to a given graph to find a Hamiltonian Circuit. (2021 Sep, Fig 16)

Subset-Sum Problem

  1. Solve the Subset-Sum problem using Backtracking. Draw the state-space tree for the instance: S={3,5,6,7}, d=15

  2. Solve the Subset Sum problem using Backtracking for the instance: S={1,2,5,6,8}, d=9

  3. Apply Backtracking to solve the following instance and construct the state-space tree: S={1,3,4,5}, d=11

Branch-and-Bound

Knapsack Problem

  1. Find the maximum profit using Branch and Bound for the following instance of knapsack problem: W=16
ItemWeightValue
110$100
27$63
38$56
44$12
  1. Solve using Branch-and-Bound for the following instance: W=15
ItemWeightValue
15$40
27$35
32$18
44$4
55$10
61$2
  1. Apply Branch and Bound technique to the following instance: W = 15
ItemWeightValue
12$18
25$40
37$35
44$12
51$2
64$4
  1. Solve the following Knapsack instance using Branch and Bound. W = 16
PersonItemWeightValue
A110$100
B27$63
C38$56
D44$12

Traveling Salesman Problem

  1. Solve the Traveling Salesman Problem using Branch and Bound. (2024 Sep, Fig 3)

  2. Find the optimal route using Branch and Bound for the cost matrix:

ABCD
A0257
B2083
C5801
D7310

PersonJob1Job2Job3Job4
A9278
B6437
C5818
D7694

P, NP-Completeness, and Approximation Algorithms

P and NP Problems, NP-complete Problems

  1. Write a short note on P, NP, NP-complete, and NP-hard problems.

  2. Define the following:

    • i) Tractable Problem

    • ii) NP-complete Problems

    • iii) Feasible Solution

Approximation Algorithms

  1. Discuss two approximation algorithms used to solve the Traveling Salesman Problem.

  2. Discuss approximation algorithms used for solving the Knapsack Problem.

Made with ❤️ for students, by a fellow learner.