...

LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

by user

on
Category: Documents
1

views

Report

Comments

Transcript

LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
M.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
SECOND SEMESTER – APRIL 2014
CS 2818/2824 - DESIGN & ANALYSIS OF ALGORITHMS
Date : 01/04/2014
Time : 09:00-12:00
Dept. No.
Max. : 100 Marks
Section – A (10 X 2 = 20 Marks)
Answer all Questions
1. Define an Approximate and exact algorithm.
2. When we can say a sorting algorithm is stable?
3. Define Pivot element.
4. What do you mean by weight of a tree?
5. Define Brute Force Approach
6. What do you mean by back edge and cross edge?
7. What do you mean by optimal solution?
8. Define state space tree.
9. When we can say an algorithm solves the problem in Polynomial time?
10.Define Bin Packing.
Section – B (5 X 8 = 40 Marks)
Answer all Questions
11 a).Explain the steps involved in Algorithm design and analysis process.
Or
b).Write about the notations used for analysis of algorithm efficiency.
12 a). Explain Binary Search with an example.
Or
b). Describe about Prim’s algorithm
13 a). Design an algorithm for solving Knapsack Problem using greedy
technique.
Or
b). Explain about Breadth First Search algorithm
14 a). Explain how to solve 4-Queen problem using backtracking?
Or
b). Explain in detail about Traveling salesman problem.
15 a). Write about P , NP and NP complete problems.
Or
b). Write about the twice around the tree algorithm.
Section – C (2 X 20 = 40 Marks)
Answer any TWO Questions
16 a). Explain in detail about mathematical analysis of Fibonacci Series.
b). Write the algorithm and explain the following with an example.
i) Merge sort
ii) Quick sort
17 a). Apply the Floyd’s algorithm to the following graph and explain it
2
a
b
a
E
3 x
6
7
E
p
x
d
c
l
p
a
a
1
a
l
b) How to Apply
the
branch
and
i
aE bound technique to solve the Assignment
E
problem? Write
the
algorithm
n
ix and explain it.
x
n
p
p an example the
18 a). Explain with
w
l approximation algorithm to solve Knapsack
l
Problem. i
w
a
a
t
i
i
b). Write an algorithm
and apply
h
tn it to construct the optimal Binary search tree
n
for the following
data
h
Key
e A
B w
C
D
w
Probability xi 0.1
0.2 ei
0.4
0.3
a
x
t
t
m
ah
h
************
p
m
l
p
e
e
e
lx
x
ea
a
t
m
m
h
tp
p
e
h
l
l
e
e
D
i
D
t
t
j
ih
h
k
je
e
s
k
t
sD
D
r
ti
i
a
rj
j
’
ak
k
s
’s
s
st
t
a
r
r
l
a
a
g
l’
’
Fly UP