0% found this document useful (0 votes)
17 views14 pages

Daa Pyq

The document contains a series of examination questions for a Master's level course in Computer Science, specifically focusing on Design and Analysis of Algorithms. It includes various topics such as algorithm definitions, sorting techniques, dynamic programming, graph theory, and optimization problems. The exam consists of multiple questions that require students to solve problems, explain algorithms, and demonstrate their understanding of algorithmic concepts.

Uploaded by

Austin
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)
17 views14 pages

Daa Pyq

The document contains a series of examination questions for a Master's level course in Computer Science, specifically focusing on Design and Analysis of Algorithms. It includes various topics such as algorithm definitions, sorting techniques, dynamic programming, graph theory, and optimization problems. The exam consists of multiple questions that require students to solve problems, explain algorithms, and demonstrate their understanding of algorithmic concepts.

Uploaded by

Austin
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/ 14

Total No. of Questions : 7] SEAT No.

:
P561 [Total No. of Pages : 3
[5840]-102
M.Sc. (Computer Science)
CSUT-112 : DESIGN AND ANALYSIS OF ALGORITHMS
(2019 Pattern) (Semester-I)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) All questions are compulsory
2) Neat diagrams must be drawn wherever necessary.

Q1) Solve any FIVE of the following. [5×2=10]

a) Define O and give one example.

b) Define

i) Cross edge

ii) Tree edge

c) What are Limitations of Merge-sort?

d) What is shortest path? When we use Bellman-Ford algorithm.

e) Define sum of subset problem.

f) Define FIFOBB and LIFOBB.

Q2) Solve the following.

a) Explain heap sort with proper example. [5]

b) X be a sequences = < a, a, b, a, b> y = < b, a, b, b> let the cost


associated with edit operation, insert and delete be 1 and change is 2.
Find the total minimum cost of transformation of X to Y using dynamic
programming. [7]

[5840]-102 1 P.T.O.
Q3) Explain strassen’s multiplication algorithm. Solve the.
a) Following by using strassen’s multiplication to find matrix Product.

 3 1   3 −4 
A=   −4 2  = B [7]
 2 4  
b) What is Longest common subsequence. Find LCS of X & Y where
X =< 1,0,0,1,0,1,1,1,0 >
[5]
Y =< 1,1,0,1,0 >

Q4) Solve the following.


a) Explain algorithm to construct HuFFman code. obtain a set of optimal
HuFFman codes for the messages (m1, m2, m3, m4, m5, m6, m7) with
relative frequencies (4, 5, 7, 8, 10, 12, 20) [7]
b) Find the topological sort of the given directed graph? [5]

Q5) Attempt the following.


a) Give any 2 algorithm which are used to find out shortest path. Use
Bellman-Ford algorithm to find shortst path from1. [7]

b) Find optimal solution to the Knapsack instances n=7 m=15 [5]


(P1,P2,---------P7)= (10, 5, 15, 7, 6, 18, 3)
(w1, w2------- w7) = (2, 3, 5, 7, 1, 4, 1)
(Use Greedy method)
[5840]-102 2
Q6) Solve the following.
a) What is m-coloring problem. For the following graph show that only 06
solution is exist. If graph is colored using exactly 3 colors. [7]

b) Explain insertion sort. Apply insertion sort on following numbers. [5]


85, 24, 63, 45, 17, 31, 96, 50,

Q7) Solve any Two from the following.


a) State Cook’s theorem. Give it’s significance. [2×6=12]
b) Solve the given instance of TSP by using reduced cost matrix method

 ∞ 20 30 10 
15 ∞ 16 4 
 
3 5 ∞ 2.
 
19 6 18 ∞ 

c) Define 4 queen’s problem. Draw state space tree to Find solution for 4
queen’s problem using backtracking.

ooo

[5840]-102 3
Total No. of Questions : 7] SEAT No. :
P2643 [Total No. of Pages : 3
[6073]-112
M.Sc.-I (Computer Science)
CSUT-112 : DESIGN AND ANALYSIS OF ALGORITHM.
(2019 Pattern) (Semester - I)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) Question 1 is compulsory.
2) Solve any five questions from Q.2 to Q.7.
3) Q.2 to Q.7 carry equal marks.

Q1) Solve any five of the following: [10]

a) Define big oh notation and show that 10n2 + 8n + 4 = O (n2)

b) Write control abstraction for Divide and coquer strategy.

c) Find optimal MRT for storing 4 programs on a tape with lengths 12,18,8,10
respectively.

d) Define forward edge and cross edge.

e) Show that there is no solution for 3-queen’s problem.

f) Differentiate between FIFOBB and LIFOBB.

Q2) Attempt all questions: [12]

a) Write an algorithm for insertion sorting method. and obtain its best and
worst case time complerity. [7]

b) Consider the following instance for 0-1 Knapsack problem.


n=4, w=(2,4,3,5), P=(8,12,6,18) and m=10. Find maximum profit using
Dynamic programming strategy’s function method. [5]

[6073]-112 1 P.T.O.
Q3) Attempt all questions; [12]
a) Explain merge sort algorithm and apply it on the following elements.
19, 7, 14, 12, 6, 2, 16, 13, 8 [7]
b) A string X can be strnasformed into string Y by applying a sequence of
edit operations such as insert, delete and interchange with associated
costs of 1, 1 and 2 respectively. For X=ACCTA and Y=CATA find cost
of transforming X to y. [5]

Q4) Attempt all questions: [12]


a) What do you mean by optimal merge pattern problem. Find an optimal
binary merge pattern for 7 files whose lengths are 15, 2, 12, 28, 11, 5, 13
[7]
b) Solve the TSP problem using dynamic programming method for the graph
G given by adjacency matrix. [5]

0 10 15 20 
5 0 9 10 
A= 
6 13 0 12 
 
8 7 9 0 

Q5) Attempt all questions: [12]


a) Give recurrence relation to find minimum number of multiplications required
to evaluate product of chain of matrices. and find best way to multiply a
chain of matrices. with dimensions 5×4, 4×10, 10×2, 2×7 using Dynamic
programming method. [7]
b) Consider the following instance for job sequencing with Deadlines problem
where n=5, P= (20, 15, 10, 5, 1)
D=(2,2,1,3,3)
Find optimal solution using greedy method. [5]

[6073]-112 2
Q6) Attempt all questions: [12]
a) Define articulation point. Find all articution points from the following
graph [Start vertese is 1] [7]

b) Sort the following elements using bubble sort: 10, 8, 19, 4, 7, 3 [5]

Q7) Attempt any two of the following: [12]


a) Define sum of subset problem. Find all the solutions for the following
instance n=5, w={5,7,10,13,15} and m=30 [use fixed tuple size state
space]
b) Obtain the reduced cost matrix for travelling sales person instance given
by the cost matrix.

 ∞ 10 12 9 
7 ∞ 4 3
 
9 4 ∞ 3
 
11 10 5 ∞ 

Which node will be selected next in LCBB formulation of problem.


c) What is satisfiability problem? Check whether following formula is
satisfiable or not?
X = (q ∨ q ) ∧ ( p ∨ r ) ∧ ( p ∨ q )


[6073]-112 3
Total No. of Questions : 7] SEAT No. :
PA-3400 [Total No. of Pages : 4
[5919]-12
M.Sc.
COMPUTER SCIENCE
CSUT-112 : Design and Analysis of Algorithms
(2019 Pattern) (Semester - I)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) All questions are compulsory.
2) Neat diagrams must be drawn wherever necessary.

Q1) Solve any five of the following. [5×2=10]


a) Define θ notation and show that 5n +3n is θ(n ).
2 2

b) List any four algorithms that use divide and conquer strategy.
c) Define minimum spanning tree.
d) What do you mean by longest common subsequence problem?
e) Define :-
i) Tree edge
ii) Back edge
f) Give implicit and explicit constraints of 8 Queen’s problem.
g) Write two bounding function associated with every node in LCBB.
Q2) Solve the following.
a) Rank the following functions in their increasing order of growth rate. [7]
en, nn, n!, loge(nn), n2
b) Find out the shortest paths from source ‘s’ to all other vertices. [5]

[5919]-12 1 P.T.O.
Q3) Solve the following.
a) Explain quick sort algorithm. Sort the following numbers using quick
sort. [7]
26, 5, 37, 1, 61, 11, 59, 15, 48, 19.
b) Find an optimal solution to the knapsack instance [5]
n = 3 m = 20 (p1, p2, p3) = (25, 24, 15)
(w1, w2, w3) = (18, 15, 10)
Using function method, from dynamic programming.

Q4) Solve the following.


a) Using prim’s algorithm find the minimum spanning tree of the following
graph (G). Start vertex is ‘V’. [7]

b) Find longest common sub - sequance of X and Y. Where [5]


X = <A, B, C, B, D, A, B>
Y = <B, D, C, A, B, A>

Q5) Solve the following.


a) Solve traveling sales person problem (TSP) using dynamic programming
method for the graph G given by adjacency matrix. [7]

 0 15 9 5 
19 0 7 10 
A= 
 ∞ 10 0 10 
 
6 ∞ 6 0

[5919]-12 2
b) Find the minimum spanning tree for the following graph using Kruskal’s
algorithm. [5]

Q6) Solve the following.


a) Draw BFS and DFS for following graph. [7]

b) Sort the following numbers with counting sort algorithm. [5]

5, 3, 1, 2, 1, 4, 1, 3, 2, 5.

Q7) Write a short note on any two of the following. [2×6=12]

a) Define the term with example.

i) Optimization problem

ii) NP Hard

iii) Matrix chain multiplication

[5919]-12 3
b) Draw the portion of state space tree generated by LCBB for the following
instance n = 5 m= 12.

w = (4, 6, 3, 4, 2)

p = (10, 15, 6, 8, 4)

c) What is Hamiltonian cycle? Find out all possible Hamiltonian cycle for
the following graph.



[5919]-12 4
Total No. of Questions : 7] SEAT No. :
P8573 [Total No. of Pages : 4
[6173] - 12
M.Sc. - I
COMPUTER SCIENCE
CSUT-112 : Design and Analysis of Algorithms
(CBCS 2019 Pattern) (Semester - I)

Time : 3 Hours] [Max. Marks : 70


Instructions to the candidates:
1) Question 1 is compulsory.
2) Solve any five questions from Q.2 to Q.7.
3) Questions 2 to 7 carry equal marks.
4) Neat diagrams must be drawn wherever necessary.
5) Use of single memory non programmable scientific calculator is allowed.

Q1) Solve any FIVE of the following. [5×2=10]


a) Define  and give one example.
b) What is divide and conquer strategy
c) Give control abstraction for greedy method.
d) Define forward edge and back edge.
e) What do you mean by Live Node and Dead Node.
f) Differentiate between ‘Backtracking Strategy’ and ‘Branch and Bound
strategy’.

Q2) Attempt any following.


a) Rank the following functions in their ascending order [7]
n2, n3, 2n, 3n, en, l0n+50
b) Use Floyd-Warshall’s algorithm to find shortest path between every pair
of vertices of given graph. [5]

P.T.O.
Q3) Attempt the following.
a) Write algorithm to find maximum from an array of N integers using
Divide and Conquer Strategy. Show how it works on the following input
numbers. [7]
24, 2, 34, 18, 45, 23, 58

b) Find maximum profit using Dynamic Programming Method for the


following 0-1 knapsack instance. [5]
n=3, (pl, p2, p3) = (32, 18, 15), (wl, w2, w3) = (15, 8, 7) and m=23.

Q4) Attempt the following.


a) Find Optimal Two Way Merge Pattern and minimal record movements
for merging 10 files whose size in terms of records are as below [7]
35, 12, 24, 8,6, 20, 10, 40, 18, 5

b) A string X can be transformed to Y by applying a sequence of edit


operations such as insert delete and interchange with associated costs of
1, 1 and 2 respectively. Find the cost of string editing using Dynamic
Programming Method. [5]
X = abbaba
Y = babba

Q5) Attempt the following.


a) What is Travelling Sales person problem? Solve the following instance
for the Travelling Salesperson Problem (TSP) using Dynamic
Programming Method for the graph G given by adjacency matrix: [7]

 0 10 9 4 
 20 0 7  
A 
 7 10 0 6 
 
 5 5 2 0

[6173] - 12 2
b) Find the shortest distance from source vertex ‘S’ to all other vertices
Using Dijkstra’s Method. [5]

Q6) Attempt the following.

a) Draw BFS and DFS for the following graph. [7]

b) Write an algorithm for insertion sort and state its time complexity for best
case and average case. [5]

Q7) Attempt any TWO of the following. [2×6=12]

a) Define Hamiltonian cycle. Find all possible Hamiltonian cycles that starts
with vertex 1.

[6173] - 12 3
b) What do you mean by Branch and Bound strategy? Obtain the reduced
cost matrix for the TSP instance given by the cost matrix.

  10 8 4 
16  6 7 
A 
15 4  4 
 
15 6 12  

Which node will be selected next in the LCBB formulation of the


problem?

c) Define the following terms:

i) P Class

ii) NP Class

iii) Cook’s Theorem



[6173] - 12 4

You might also like