Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
19 views1 page

ADA - Assignment 2 24

Uploaded by

muthahira04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

ADA - Assignment 2 24

Uploaded by

muthahira04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

J.N.N.

COLLEGE OF ENGINEERING, SHIMOGA


Department of Computer Science and Engineering

Course: Analysis and Design of Algorithms (BCS401) Semester: 4th


Assignment No.: 2 Date: 28-07-2024 Max. Marks: 25
Q. No Question

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

You might also like