Adobe Scan 14-Dec-2024
Adobe Scan 14-Dec-2024
TMC-301
M. C. A. (THIRD SEMESTER)
END SEMESTER EXAMINATION, Jan., 2023
ALGORITHMS
DESIGN AND ANALYSIS OF
Time : Three Hours
Maximum Marks:100.
(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
16 4
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.
(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.
(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
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.
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.
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)
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
TMI-401 50
FNo. a-72
RollNo.
|||
a82
Paper Code: TMI -401
(M.Sc.(IT -End Term Examination- Year 2024
IV- Semester
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.
c): What is Vertex Cover Problem, Give a polynomial time algorithm to solve it.
b). Prove that a red-black tree with n internal nodes has height at most 2log(n+1) .