0% found this document useful (0 votes)
11 views15 pages

Adobe Scan 14-Dec-2024

The document outlines the structure and content of various end-semester examinations for the M.C.A. program, specifically focusing on the Design and Analysis of Algorithms course. It includes instructions for answering questions, topics covered such as amortized analysis, shortest path algorithms, and various algorithmic techniques like dynamic programming and greedy algorithms. The examination format consists of multiple main questions with sub-questions, requiring students to demonstrate their understanding of algorithm design and analysis.
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)
11 views15 pages

Adobe Scan 14-Dec-2024

The document outlines the structure and content of various end-semester examinations for the M.C.A. program, specifically focusing on the Design and Analysis of Algorithms course. It includes instructions for answering questions, topics covered such as amortized analysis, shortest path algorithms, and various algorithmic techniques like dynamic programming and greedy algorithms. The examination format consists of multiple main questions with sub-questions, requiring students to demonstrate their understanding of algorithm design and analysis.
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/ 15

Roll No.

TMC-301
M. C. A. (THIRD SEMESTER)
END SEMESTER EXAMINATION, Jan., 2023
ALGORITHMS
DESIGN AND ANALYSIS OF
Time : Three Hours
Maximum Marks:100.

Note : (i) Allquestions are compulsory.


main
Answer any two sub-questions among (a), (b) and (c) in each
(ii)
question.
main question are twenty.
(iii) Total marks in each
carries 10 marks.
(iv) Each sub-question
Discuss the potential method of amortized
amortized analysis ?
1. (a) What is
algorithm. 2".
growth of functions 2n, n log, n and 4+
order of
(b) Compare the spurious hits does the
Rabin
how many
modulo q = 11, 4151592453548924435 when
(c) With working T =
encounter in the text
Karp matcher
P= 24
looking for pattern
Give an approximation algorithm
approximation algorithms ?
2. (a) What are problem.
for vertex cover
P.T.O.
(2) TMC-301

(b) Apply the Floyds algorithm to solve all pair source shortest path
problem, where input graph is given below.

2
3

10|

3
3

(c) Solve singl source shortest path próblem using Dijkastra algorithm,
where node'1 is source node.

5 4

3. (a) Solve the recurrence relation T(n) =2T|+cn, T(1) - Awith the
help of recursion tree.
to find
(b) Determine the minimum number scalar multiplication required
(S x 4) using
the product of chain of matrices A (4 x 3), B (3 x 5) and C
D.P. P. Approach, also give optimal parenthesis scheme.

THIRD SEMCSTER
(3)
(c) Define 0/1. knapsack problem. Solve the given
and Bound Method. The capacity of the knapsaçk instance
is 7.
using Branch
Item Weight Value
1 2 60
'2 3 100
3 4
120

4. (a) State and prove the Chinese


Remainder theorem.
(b) What is Binomial Heap-? Draw a neat
diagram of Binomial heap with
node values. Write a procedure to find minimum element of
a'binomial
heap.
(c) Give statement of Max flow-min cut
theorem. Apply Ford-Fulkerson
algorithm for maximization of flow in a flow network given below.
12

16 4

5. (a) Prove that a red-black tree with n


internal nodes has height at most
2log (n + 1).
(b) If n , then for any n key B tree T of
height h and minimum degree
t2.

hs log,
(c) What is clique and
k-clique problem ? Give a non
algorithm for clique decision problem. deterministic
TMC-301
230

TMI-301
Roll No.

TMC-501
M. C. A. (Fifth Semester)
End Semester EXAMINATION, 2017
DESIGN AND ANALYSIS OF ALGORITHM
Time : Three Hours] [ Maximum Marks : 100
Note : (i) This question paper contains two Sections.
(iü) Both Sections are compulsory.
SectionA
1. State True-False:
(x$-5 Marks)
(a) Iff(n) and g (n) are positive function such
that f(n) 2 cg (n) for any positive Constant
and n >0, then f(n) is in 2(g(n)
(True/False)
(b) The Kruskal's algorithms to find the minimal
spanning tree is based on Divide and conquer
approach. (True/False)
(c) Function 2" has higher growth than
(True/False)

C24 P.T.O.

(21 TMC-501 (3] TMC-501


(d) Max. hcap is a complcte binary tree. (b) Show that amortized cost of a scquence of n
(True/False) operation on a stack is O(n).

(e) The Radix sort uses unstable sor to sort the (c) Discuss the brcadth first search technique.
elements digitwise. (True/False) Explain with the help of an example.
2 Attempt any five parts: (3«5-15 Marks)
relation
4 Attempt any two parts of choice from (a), (b)
(a) Solve the recurrence
T(n) =2 T(Vn) + log n with change of and (c). (10x2-20 Marks)
variable method. (a) What is Hamiltonian cycle ? Use the
backtracking approach to find the
(b) Compare the order of growth of function
log n and Hamiltonian cycle in the given graph.
(c) Discuss the dynamic programming approach
to solve optimization problems.
(d) Give the Greedy algorithm to solve the
fractional knapsack problem.
(e) What is Hamiltonian cycle ? Use the
backtracking approach to find the
Hamiltonian cycle in the given graph.
() Give the Prim's algorithm to find minimal
spanning tree in given connected weighted
graph. (b) Find the structure of optimal binary search
(&) What is time complexity and space trce for 4-key sct
complexity of an algorithm ? Explain Big O )
and little û notation with example. Key Probability
SectionB A 0.2
3 Attempt any bwo parts of choice fron (a), (b) 0. I
and (c). (10×2-20 Marks) C 0.45
(a) Discuss the dynamic programming approach D 0.25
to solve /1 knapsack problem. (c) What is Red Black Tree ? Give an algorithm
to delete a node in Red-Black tree.
C24 C-24 P.T.O.

t41 TMC-601
TMC-501
5. Attempt any two parts of choice from (a), (b)
upinand (c). (10x2-20 Marks)
(a) What is Binomial Heap ?
Write a procedure
(d) (6) to decrease a key in binomial
heap.
(2st (b) With working modulo q = 11,
how many
spurious hits doces the Rabin Karp matcher )
encounter in the text T
41515924532489234256
patternP=24.
when looking for
(c) Give the
Bellman-Ford algorithm for single
source shortest path.
6. Attempt any two
and (c).
parts of choice from (a), (b)
(a) Explain Class (10x2=20 Marks)
P, NP and NP
Problems. Give Complete
algorithm for clique decisionnon-deterministic
problem.
(b) If n1, then for any n
key B tree T of
h and
minimum degree t 2: height
hslog, (n +/2) )
(c) What are
approximation algorithm ? Give an
approximation algorithm for vertex cover
problem.

TMC-501
120
C-24
RollNo.

TMC-501
M. C. A. (FIFTH SEMESTER)
END SEMESTER EXAMINATION, 2018
DESIGN AND ANALYSIS OF ALGORITHM
Time: Three Hours
Maximum Marks : 100
Note :(i) This question paper contains two
Sections.

(ii) Both Sections are compulsory.


Section--A
1. State True/False : (|x5-5 Marks)
(a) If (n) -n tn log n+5, then r(n) belongs
to O(n). (True/False)
(b) The Kruskal's algorithm to find the
minimal spanning tree is based on Greedy
approach. (True/False)
(c) Max. heap is a binary tree. (True/False)
(d) Clique is a complete graph. (True/False)
(e) Binary Search technique is based on
Divide and conquers strategy. (True/False)
N e-21 P.T.O.

(3) TMC-501
(2) TMC-501

2. Attempt any five parts out of seven (b) With working modulo q = 11, how many
spurious hits does the Rabin Karp matcher
(3x5=15 Marks)
encounter in the text T = 4S1415923423535
(a) Compare the order of growth of functions
when looking for pattern P 23 ?
n log n and 5".
(c) Give the Bellman-Ford algorithm for
(b) What is time and space complexity of an
algorithm ? Explain theta notation with single source shortest path.
example. 4. Attempt any wo parts of choice from (a), (b)
(c) Give the algorithm of Heap sort. and (c). (10×2-20 Marks)
(d) Discuss the time complexity of Insertion (a) Explain, how we can solve a given /1
sort algorithm in its best case. Knapsack problem with the heip of Branch
algorithm ta and Bound techniques.
(e) Give Ford-Fulkerson
maximize the flow in flow network. (b) Give the algorithm to solve the 8-Qucen
problem using backtracking approach.
() Give the Prim's algorithm to find minimal (c) What are approximation algorithms ? Give
spanning tree in given connected weighted
'an approximation algorithm for verte:
graph. cover problem.
the
(g) Give the Greedy algorithm to solve 5. AtteHmpt any wo parts of choice from (a), (b)
fractional Knapsack problem. (10×2-20 Marks)
Section--B and (c).
)
(b) (a) Explain the following:
3. Attempt any bwo parts of choice from (a),
(10×2-20 Marks) (i) Reducibility
and (c).
and (ii) NP Complete Problems
(a) Prove that if 4(n) e O(g (n)
show that : (iii) Satisfiability Problem
,(n) e O(8,(n), then
(iv) Clique Problem
(4(m).t,(n) e O{(g,(n). (g2(n))
P.T.O.
E Na :c23
(C) Give the algorithm of Heap sort.
(d) Discuss the time complexity of Insertion
sort algorithm in its best case.
(e) Give Ford-Fulkerson algorithm to
maximize the flow in flow network.
() Give the Prim's algorithm to find minimal
spanning tree in given connected weighted
graph.
(g) Give the Greedy algorithm to solve the
fractional Knapsack problem.
Section--B
3. Atempt any two parts of choice from (a), (b)
and (c).de (10×2-20 Marks)
(a) Prove that if (n) e Olg|(n)) and
,(n) e Og,(n)), then show that
(h(n).4,(n)) e O{((n).(8,(n)}
E. No, : c-23

(4) TMC-501

(b) What is Red-Black tree ? Prove that a red


black tree with n internal nodes has height
at most 2 log (n + 1).
(c) Discuss the Depth First Search technique.
6. Attempt any two parts of choice from (a), (b)
and (c). (10x2-20 Marks)
(a) Ifn 1, then for any n key B tree T of )
height h and minimum degree 22
hs

(b) Write a procedure to decrease a key in


binomial heap.
(c) Discuss the procedure to insert a node x
into Fibonacci heap H.

TMC-501 120

F. No. :c-23
UrbE TM C-S0l
|:30 to 430
(MCA)
End Semester Examination 2019
V- Semester
Paper Name -Design and Analysis of Algorithm
Time: Three Hours
MM: 100
Note: Attempt any two parts from each question.

Q1. (10X 2 = 20 Marks)


a): Explain asymptotic Notations, Give Big O estimation of log]n.
b): Discuss the Merge Sort algorithm, Set recurrence
[co-D
relation for Merge sort and
Compute the time complexity.
c): Show that amortized cost of a sequence of n operation on a
stack is O(n) Co-2]
Q2. (10X 2 = 20 Marks)
a
i): Compare the order of qrowth of functions nlog n, n and 5

ii): Give ford-Fulkerson alqorithm to maximize the flow in flow netWork


b). Explain, how we can solve a given 0/1 knapsack
problem with help of
Branch and Bound techniques? [Co-4]
c). Apply Floyd- War shall algorithm to all pair shortest path for the graph iven
below

4 [Co-b]

V4)
Q3. (10X 2 = 20 Marks)

a). Give the algorithm to solve the N-Queen problem using backtracking approach,
Explain solution does not exist for N=2.

b): Discuss the Dynamic programming approach to solve TSP Co-5]


c). Discuss the Depth First Search technique. Explain with an example.
Co-4)
Q4. (10X 2 = 20 Marks)
a): What are approximation algorithms, explain Chinese remainder
theorem. eo-G
b): With working modulo q=11, how many
matcher encounter in the text spurious hits does the Rabin Karp
pattern P=35 T=41515924535489234356 when looking for
c). Write short note on
any two.
i) Branch and Bound techniques
Best case of Insertion sort time
complexity
Kruskals algorithm to find minima!
spanning tree
Q5.
a): What is Red Black
(10X 2 = 20 Marks)
tree? Prove that a
height at most 2log(n+1). red-black tree withn internal nodes has

b). If n1, then for any n


Co2]
key B tree T of
hs log. (n+1/2) height h and minimum degree
c):
t2 Co-)
Explain Class P,
NP and NP
algorithm for clique decision Complete Problems; Give a non
problem. deterministic
===E==:============E====
KoIl No.

TMC-501
M.C. A. (FIFTH SEMESTER)
END SEMESTER EXAMINATION, Nov.-Dec.,2021
DESIGN AND ANALYSIS OF ALGORITHM

Time:Three Hours
Maximum Marks :100
Note : (i) All questions are compulsory.
(i1) Answer any wo sub-questions among (a), (b) and (c) in each main

question.
(iii) Total marks in each main question are twenty.
(iv) Each question carries 10 marks.

1. (a) Prove that if t(n) e O(g: (n) and tz(n) e Og2(n)), then show that :
(Co1)
(h(n) +h(n)e Omax (&;(n), (8a(n)}
(b) Give the algorithm to solve &queen problem with backtracking. (CO3)
(c) Solve the recurrence relation : (COl)
T (n) = 3T (n/4) + cn, T (1) = A,
with recursion tree method.

P. T.0.

(2) TMC-S01

2. (a) Sotve the given Assignment problem with Branch and Bound
technique : (CO4)
2 3 4

3 4 5

4 5 4 9

3 7 10 5

(b) Show all step to sort the given array using Heap sort algorithms : (CO3)
8 4 | 3 9 14

(c) Discuss the breadth first search technique. Explain with the help of an
example. (COS)
3. (a) What are approximation algorithms ? Give an approximation algorithm
for vertex cover problem. (COs)
4

3 7 10 5

(b) Show all step to sort the given aray using Heap sort algorithms : (CO3)
|8 4 3 9 14

(c) Discuss the breadth first search technique. Explain with the help of an
example. (COS)
3. (a) What are approximation algorithms ? Give an approximation algorithm
for vertex cover problem. (COs)
(b) Give the Dijkstra's algorithm for single source shortest path. (COS)
(c) Give the Prim's algorithm to find minimal spanning tree in given
connected weighted graph. (COs)
4. (a) What is Binomial Heap ? Write a procedure to decrease a key in
binomial heap. (CO3)
(b) Define 0/1 knapsack problem. Solve the given instance using the
dynamic programming approach, where the capacity of the knapsack
is 7: (C04)
Item Weight Value

1 60

2 3 100
3 120

(3)

(c) (i) What is min cut ? Give Ford-Fulkerson algorithm to maximize the
flow in flow network. (CO4)
(i) Show that amortized cost of a sequence of n operation on a stack is
O(n). (CO2)
5. (a) Prove that a red-black tree with n intermal nodes has height at most
2 log (n +1). (COS)
(b) If n21, then for any n key B treeT of height h and minimum degree
t22 hslog, (n +1/2). (CO4)
(c) What is clique and k-clique problem ? Given a non-deterministic
algorithm for clique decision problem. (COS)
Roll No.

TMI-401
M. SC. (T) (FOURTH SEMESTER)
END SEMESTER EXAMINATION, 2018
DESIGN AND ANALYSIS OF ALGORITHMS
Time: Three Hours
Maximum Marks : 100
Note :(i) This question paper contains two
Sections.
(iü) Both Sections are conpulsory
Section--A
1. State True-False: (15-5 Marks)
(a) The Kruskal's algorithm to find the
minimal spanning tree is based on greedy
approach. True/False)

(b) Max heap is a complete binary tree.


(True/False)
(c) The Max flow-Min cut theorem states that
the maximum flow from source to sink in
a flow nctwork is cqual to the capacity of
minimum cut. (True/False)
(d) Clique is not a complete graph.
(True/False)
P.T.0.

21 TM-401 (3 TMI-401

(e) The counting sort is not a stable sort. (b) With working modulo q= 11, how many
(TrueFalse)
spurious hits does the Rabin Karp matcher
Atempt any five parts : (3×5-15 Marks) encounter in the text T
(a) Compare the order of growth of functions 345246791215924535 when looking for
n, n log n, and 2". pattem P=24.
(b) What is time and space complexity of an
(c) Give the algorithm to solve the 8-Qucen
algorithm ? Explain little of notation with problem using backtracking approach.
example.
4. Attempt any wo parts of choice from (a). (b)
(c) Define red-black tree. Also draw its figure.
and (c). (10×2-20 Marks)
(d) Solve the recurrence relation
(a) Give the Dijkstra algorithm for single
T (n) T(n/2) + c, T() = A. source shortest path.
(e) Give the Greedy algorithm to solve the
Fractional Knapsack problem. (6) Discuss the properties of binomial trces.
() Give the dynamic programming approach (c) Give the Bellman-Ford algorithm for
to solve the O/1 knapsack problem. single source shortest path.
(g) Give Ford-Fulkerson algarithm to 5. Attempt any wo parts of choice from (a). (b)
maximize the flow in flow network. and (c) (10×2-20 Marks)
Section-B (a) What are approximation algorithms ? Give
3. Attempt any wo parts of choice from (a). (b) an approximation algorithm for vertex
and (c). (10×2-20 Marks) cover problem.

(a) Discuss the breadth first search technique; (b) Give big O estimation of n and n log, n +
explain with help of an example.
F No a72 P.T.0.

(4) TMI-401

(c) Apply Floyd-Warshall algorithm to all pair


shortest path for he graph given below :
(4) TMI-401l

(c) Apply Floyd-Warshall algorithm to all pair


shortest path for the graph given below:

6. Attempt any wo parts of choice from (a), (b)


and (c). (10×2=20 Marks)
(a) If n1, then for any n key B tree T of
height and minimum degree
122, hs log, (n +1/2).
(b) Explain class P. NP and NP complete
problems with examples.
(c) What is Binomial Heap ? Write a
procedure to decrease a key in binomial
heap.

TMI-401 50

FNo. a-72

RollNo.

|||
a82
Paper Code: TMI -401
(M.Sc.(IT -End Term Examination- Year 2024
IV- Semester

Paper Name: Design and Analysis of Algorithm


Duration: 3 Hrs Max Marks: 100

Note: Attempt any 2 part of each question. All are compulsory.

Q1: (10 X2== 20 Marks)


a): Solve the recurrence relation T(n)=3T( n/4)+4n T(1) = C

b): Compare the order of growth of functions nlog n, n' and 3^

C): What is spanning tree of a graph G(V, E), discuss the Prims algorithm to find the minimal
spanning tree. How you can say that it is based on greedy approach?
Q2 (10 X 2 20 Marks)

a.): Define 0/1 knapsack problem. Solve the given instance using dynamic programming
approach; the capacity of the knapsack is 5.
Item Weight Value

160

2 100

3 120

b): Explain how we can solve given traveling and salesman problem with greedy method.
c): Discuss Breadth First Search with an example.

Q3. (10x2=20)
a): Use Dijkastra's algorithm to find shortest path, of a!! rodes from node 1.

2
|2
1 1 160

2 2 100

3 3 120

b): Explain how we can solve given traveling and salesman problem with greedy method.
c): Discuss Breadth First Search with an example.

Q3. (10x2=20)
a): Use Dijkastra's algorithm to find shortest path, of al! rodes from node 1.

b): Write a note on Branch and Bound techniques to solve Optimization problem?
c): What is Back Tracking approach? Give Algorithm to solve N-queen problem using back
tracking.

Q4.
((o 2=20 Maks
a): What is flow network and residual network? Give the Ford-Fulkerson algorithm for
maximization of flow in a flow network.

b): Write a procedure to decrease a key in binomial heap.

c): What is Vertex Cover Problem, Give a polynomial time algorithm to solve it.

Q5. (10X 2 = 20 Marks)


a). With working modulo q=11, how many spurious hits does the Rabin Karp matcher
encounter in the text T=3251592456589 when looking for pattern P=24.

b). Prove that a red-black tree with n internal nodes has height at most 2log(n+1) .

c). Explain Reducibility, Satisfiability problem, Class P, NP and NP Complete Problems.

You might also like