Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Reg. No.

:
Name :

Final Assessment Test – November 2016


Programme : B.Tech. (Electronics and Communication Engineering) Semester : FS 2016-17

Code : CSE2003
Course : DATA STRUCTURES AND ALGORITHMS
Class Nbr : 2215 | 2216

Faculty : Dr.Vetrivelan.P | Prof. Suganthi.K Slot : C1

Time : 3 Hours Max. Marks : 100

PART – A (10 X 10 = 100 Marks)


Answer ALL Questions

Q. Sub.
Question Description Marks
No. Sec.

(a) Design an ATM system which operates the following cases: Deposit, Withdraw, Balance- [05]
1. Enquiry and Mini-Statement. Elucidate the following:
(i) Write down the algorithm criterions which are suited for this proposed application
(ii) Also correlate this algorithm with necessary data structures

(b) Prove the given statement using an appropriate proof technique: [05]
2
Sum of first n cubic numbers is equal to [n(n+1)/2]

2. (a) Raman works as a typist in a data centre where his duty is characterised as given below and [05]
“n” depicts total number of pages of the thesis: T(n)=T(n-1)+n4 ; T(0)=0 as initial condition.
Find the worst case time complexity to complete the typing of the thesis.

(b) Solve the following recurrence in Θ-notation by using change variable method: [05]
T(n) = 8T(n/2)+3n2 where n is an integer power of 2 and greater than 1.

3. VIT-Chennai supermarkets have kept various products for sale. Each product has the [10]
following fields: <ID, Price, Quantity>.
Perform the following using an appropriate data structures:
(i) Create the list
(ii) Perform Deletion whenever the purchase was made and Update the quantity
(iii) Display the products in ascending order based on quantity
(iv) Total stock price in the shop

Page 1 of 3
4. (a) An automated system is designed for palindrome check which has equipped with LIFO [05]
based access memory. The system reads one character at a time from the input symbol
which contains both word (W) and reversal of word (WR). Sample case, W#WR: 110#011
(i) Push into LIFO memory (one by one before this symbol “#”)
(ii) Do not perform either insert or delete if you read this symbol “#”
(iii) Pop from LIFO memory (after this symbol “#”) only if the read symbol is same as
the top element
After ending the reading, if LIFO memory is empty then print “PALINDROME”.
Otherwise, print “NON-PALINDROME”.

(b) Design a Binary Search Tree with each node consist of register number and marks (Ex: [05]
XXXX, 75). Insert the following: <1025, 80>, <1015, 65>, <1197, 90>, <1012, 75>, <1018,
55>, <1158, 98> and write the routine for the following:
(i) Create and Insert the nodes as per the Marks
(ii) Traverse the tree that should list the marks in descending order

5 (a) Indicate how effective the dynamic programming over divide and conquer strategy? Find an [05]
optimal parenthesization of a matrix-chain product whose sequence of dimension is
<5, 4, 6, 2, 7>.

(b) For data transmission purposes, it is often desirable to have a code with a minimum [05]
variance of the code-word lengths (among codes of the same average length). Construct the
Huffman Tree using greedy strategy for the following:

Symbol A B C D E

Frequency (in Thousands) 0.4 0.1 0.2 0.14 0.16

(i) Encode ABACABAD


(ii) Decode 100010111001010
6 (a) Suppose the input is given with three unsorted lists A[1..n], B[1..n], and C[1..n]. The final [05]
sorted list which has range of elements and its index is represented by an integer k [1….3n].
Describe an algorithm to perform arranging elements and then find the kth smallest element
in “AՍBՍC” in Θ(n log n) time. Assume that the list contains no duplicate elements.

(b) Find the number of comparisons made by the sequential Search in the worst case. If you [05]
suggest implementing the search using divide and conquering strategy, then compute the
percentage of improvement of your proposed approach in terms of time efficiency.

7 Obtain the minimum spanning tree using the following approaches for the given graph [10]
shown in Figure (Q.No:7):
(i) Prim’s Algorithm
(ii) Kruskal’s Algorithm
(iii) Identify the better approach, and justify

Page 2 of 3
Figure (Q.No:7))

8 The important tourist spots of United States and their interconnections are shown in Figure [10]
(Q.No:8).
(i) Find the single-source (Arlington) shortest path
(ii) Is there any correlation between dijkstra's single-source shortest path and Floyd’s
all-pairs shortest path?
(iii) Justify, how does these approaches contributes towards building solution for
traveling salesman problem?

Figure (Q.No:8)

9 (a) How the decision problem does differ from optimization problem? Also explain the various [05]
computational complexity classes with example.

(b) Identify the classes of the following problems with justification: [05]
(i) Vertex Cover Problem
(ii) Clique Problem
(iii)Subset Problem
(iv) Travelling Salesman Problem
(v) Death Finding Problem

10 Demonstrate the following with respect to parallel “N” processor distributed systems: [10]
(i) Merge Sorting
(ii) Summation of following numbers: 4, 3, 8, 2, 9, 1, 0, 5, 6, 3


Page 3 of 3

You might also like