ADA_Assignment-2-24
ADA_Assignment-2-24
1. Find any one solution to the 5-Queens problem by applying backtracking approach
with the help of a state space tree.
2. Using Branch and Bound, solve the following knapsack problem and write state space tree
N=4, M=6, (w1, w2, w3, w4) = (2, 1, 3, 4), Profit (P1, P2, P3, P4) = (8, 6, 15, 12)
3. Apply backtracking method to solve the instance of the sum of subset problem
S= {3, 4, 5, 6, 7} and d = 15.
4. Apply the Horspool Algorithm for the following Text and match the given Pattern:
Text: G T A C T A G A G G A C G T A T G T A C T G
Pattern: A T G T A
• Generate the shift table • Show the steps of the algorithm
5. Apply the Comparison Counting Sort Algorithm to the following Set of numbers and sort
them in ascending order.
8 9 12 11 13 11 8 9 10 12
6. Write a short note on the following:
1) Decision Trees 2) Class P, 3) Class NP, 4). NP Complete Problem