0% found this document useful (0 votes)
25 views4 pages

DAA PYQs-2.0

htht y5y46hyj5yjy

Uploaded by

epsilon.i0008i
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)
25 views4 pages

DAA PYQs-2.0

htht y5y46hyj5yjy

Uploaded by

epsilon.i0008i
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/ 4

UNIT-01

**Q1) What are Asymptotic Notations? Explain any three Asymptotic Notations with expression

*Q2) Define algorithm.What is the need of algorithm analysis ? Which factors affect the runtime of an
algorithm ? State the main characteristics/properties of Algorithm. Explain criteria of Algorithms.

Q3) Evaluate 9T(n/3) + n

*Q4) Define Max and Min Heap and write an algorithm to insert into a heap. Explain with examples.

UNIT-02

n
*Q1)

lo
si
*Q2) Explain strassen’s matrix multiplication with its performance analysis.
Ep
*Q3) Solve using Strassen's Matrix Multiplication, and Calculate its time complexity
A = (6 7
54)
B = (1 2
34)
By

Q4)Multiply following two matrices using Strassen’s matrix multiplication algorithm.


A=(12
34)
B = (5 6
78)
A

*Q5) Write an algorithm for merge sort.Apply merge sort on following array
A=51263794
A

*Q6) Write an algorithm of merge sort and illustrate the operation on an array using Merge Sort.
A = {5 2 4 7 1 3 2 6}
D

*Q7) Describe an algorithm for Merge Sort and find its time complexity

*Q8) Evaluate and write the algorithm for Quick sort describe its best and worst case with suitable example

*Q9) Explain Binary Search with its time complexity


UNIT-03
*Q1) Write Huffman Coding algorithm . Obtain Huffman tree for following data.

CHARACTER A B C D E

FREQUENCY 6 11 19 35 50

*Q2) Construct an optimal instance of Huffman Code for the following set of frequencies using the Greedy
method.

CHARACTER A B C D E F

FREQUENCY 45 13 12 16 9 5

n
*Q3) What are the different elements of greedy strategy ? Explain the steps to solve the problem by
greedy strategy.

lo
**Q4) Draw a state space tree for finding four queens solutions

si
Q5) Apply branch and bound technique to solve travelling salesman problem for the graph whose matrix is
Ep
*Q6) Describe Graph Colouring Problem with suitable example
By

Q7) Differentiate between backtracking and branch and bound.

Q8) Explain Branch and Bound with suitable example.


A
A
D
UNIT-04
Q1) Compute Longest Common Subsequence using Dynamic Programming approach for sequences X and Y if X
=A, B, C, B, D, A, B and Y = B, D, C, A, B, A . What is the length of LCS.

*Q2) Compare Greedy Strategy , Dynamic Programming and Divide and Conquer approach.

Q3) Determine longest common subsequence using dynamic programming approach for X and Y. What is the
length of the longest common subsequence?
X = < A, B, C, B, D, A, B >
Y = < B, D, C, A, B, A >

n
Q4) Find the shortest path using Bellman Ford algorithm for the following graph.
Note that vertex z is the source vertex.

lo
si
Ep
*Q5) Solve the Fractional Knapsack problem Given n = 5 objects and a knapsack capacity
W = 60 profit (30, 20, 100,90,160) Weight = (5,10,20,30,40)

*Q6) Solve knapsack problem by greedy method where capacity of knapsack is 15kg, profits of seven object
are
By

(P1,P2,P3,P4,P5,P6,P7) (10,5,15,7,6,18,3) and weights (w1,w2,w3,w4,w5,w6,w7)(2,3,5,7,1,4,1).

*Q7) Solve an optimal Huffman code for the following set of frequencies
a: 50 b: 25 c: 15 d: 40 e=75

Q8) Solve Job sequencing with deadlines n=4,


A

p=(100,10,15,27) and d =(2,1,2,1) find optimal solution

Q9) What is optimal merge pattern?


A

*Q10) Explain Huffman coding with a suitable example.


D

Q11) Find an optimal solution to the knapsack instance n = 7, m = 15, (P1 ,P2, P3 ,P4 P5 ,P6 P7 ) =
(10,5,15,7,6,18,3), and (w1, w2, w3, w4, w5, w6, w7) = (2,3,5,7,1,4,1).

Q12) What is the Minimum Cost Spanning Tree? Explain with suitable example.

Q13) Explain Job Sequencing with Deadlines.


UNIT-05
*Q1) What is state space tree ?Using state space tree show that there exist an solution to 4-Queens problem

Q2) Given n=6 weights, w={5,10,12,13,15,18} and M=30 .Find all possible subsets for which sum=M using sum of
subsets algorithm.

Q3) Explain Class P, Class NP and Class NPC problems in detail. Show relationship between P class and NP class
.
Q4) Calculate the shortest path by using Floyd's Warshall Algorithm

n
lo
Q5) Calculate the longest common subsequence for
X={ A,B,C,B,D,A,B}
Y={B,D,C,A,B,A}

si
*Q6) Differentiate between Dynamic Programming and greedy Approach
Ep
Q7) Write down characteristics of dynamic programming.

Q8) Explain different applications of dynamic programming.

Q9) Analyze Floyd Warshals algorithm for Dynamic Programming.


By
A
A
D

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy