0% found this document useful (0 votes)
10 views

Assignment 5

Uploaded by

kingiref
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)
10 views

Assignment 5

Uploaded by

kingiref
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

School of Engineering and Technology

Department of Computer Science and Engineering


Academic Year: 2024-25
BTECH CSE V Sem
Subject Name: Design and Analysis of Algorithms Sub Code: CSE 356
Assignment 5
Date of Submission: Max Marks: 30
COURSE OUTCOMES
By the end of the course, students will be able to:

CO 1 Analyze the asymptotic performance of algorithms


Describe the dynamic-programming and Greedy paradigm and explain when an
CO 2
algorithmic design situation calls for it.
CO 3 Demonstrate a familiarity with major algorithms and data structures
CO 4 Apply important algorithmic design paradigms and methods of analysis
CO 5 Discuss NP-complete problems and develop algorithms to solve the problems.
CO 6 Choose appropriate algorithm design techniques for solving problems.
Note: Attempt All Questions.
Q. No. Questions Marks
Q1. Determine all the Valid Shift using naive string-matching algorithm. Given: 6
Text = 1011101110 and Pattern = 111.

Q2. Explain the notion of NP Complete and NP Hard Problems with examples. 6
Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-
time reducible to R. Classify P, Q, and R as either NP-complete or NP-hard.
Q3. Consider the following algorithm to determine whether or not an undirected 6
graph has a clique of size k. First, generate all subsets of the vertices containing
exactly k vertices. Next, check whether any of the sub-graphs induced by these
subsets is complete (i.e. forms a clique). Why is this not a polynomial-time
algorithm for the clique problem?
Q4. Explain Travelling Salesman Problem (TSP) with suitable example. Explain the 6
basic steps that are to be followed to solve TSP using branch and bound for the
given graph.

Q5. Using Rabin Karp algorithm find the spurious hits in the given pattern 6

and text:

You might also like