Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

15ECSC701 576 KLE48-15Ecsc701 Set2

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

Jan / Feb 2016 15ECSC701

USN 2 B V

I Semester M.Tech Examination


(Computer Science & Engineering)
Data Structures and Algorithms (15ECSC701)
Duration: 3 hours Max. Marks: 100
Note: i) Part-A and Part-B are compulsory. Answer any one Question from Part-C.
ii) Missing data may be suitably assumed wherever necessary with justification.

PART-A

1 Consider the insertion of items with following keys into an initially empty AVL-
tree.
[ 30, 40, 24, 58,48,26,11,13]
Draw the final tree that results. (05 marks)

2 Explain the WBLT binary tree with an example. (05 marks)

3 Construct the binary tree, using following inorder & postorder traversals of that
binary tree.
Inorder : B, G, C, A, E, D, F
Postorder : G, C, B, E, F, D, A (05 marks)
4 How to insert and delete items in skip lists. Explain each operation with example. (05 marks)
5 Describe the salient features of Backtracking algorithmic technique. List out some of the
application of this technique. (05 marks)
6 Consider the following recurrence equation, defining a function T(n)
1 0
1 2
n+1 (05 marks)
Show that T(n) = 2 -1.
PART-B

7 Let us consider the array B of n positive integers. Write O(n) algorithm for
removing all the even numbers from B. That is if B has m odd numbers, then after
the removal, these odd numbers should occupy the first m cells of B in the same
relative order they were in originally. Explain your algorithm with example. (10 marks)

8 Consider the Graph G whose vertices are the integers 1 through 8 and adjacent
vertices of each vertex is given in below Table 8.
(i) Draw the G.
(ii) Order the vertices as they are visited in DFS traversal stating at vertex 1.
Show the stack content of the traversal.
(iii) Order the vertices as they are visited in BFS traversal stating at vertex 1.
Show the queue content of the traversal.

(10 marks)
Page 1
Table 8

Vertices Adjacent vertices

1 2,3,4

2 1,3,4

3 1,2,4

4 1,2,3,6

5 6,7,8

6 4,5,7

7 5,6,8

8 5,7

9 Explain the different hashing methods Draw 11 item hash table from hashing keys
(k) : 12, 44, 13, 88, 23, 94, 11, 39, 20, 16 and 5.
using the hashing function h(k) = (2k+ 5 ) mod 11 and assuming collisions are
handled by chaining. (10 marks)

10 Apply greedy technique to solve fractional knapsack problem, considering


following data set.
The no. of item n=5, Profits P= [3,5,8,4,10] , weights W =[2,4,5,3,9] and the
maximum capacity C=20. (10 marks)

11 Explain the lossless data compression algorithm LZW to compress following


sequence: aabbabababbabba (10 marks)

PART-C

12 Explain briefly insert and delete operations in Red and Black tree. Give example
for each operation.
Imagine that you work for a data base company, which has a popular system for
maintaining sorted set of records. After negative review, the company wants to
change its indexing software form sorted arrays to BST. Write an algorithm to store
sorted elements in BST, so that searching an element requires O(log n) times. (20 marks)

13 The Josephus problem involves considering the numbers 1 to n arranged in circle


and repeatedly removing every mth number around the circle, outputting the
resulting sequence of numbers. For example
n=10 and m=4 the resulting sequence would be: 4, 8,2, 7, 3, 10, 9, 1, 6, 5
Given values of n & m write an algorithm for outputting the sequence resulting
from this instance of the Josephus problem in O( n log n) time. (20 marks)

Page 2
Department: Sem: IV Sub-Name: Sub-Code: Faculty
Name:
Q.No Blooms Learning Course Learning a-k Criteria PI codes Marks
Levels (LL) Objectives(CLO’s)
1: a
b
c
2: a
b
c
3: a
b
c
4: a
b
c
5: a
b
c
6: a
b
c
7: a
b
c
8: a
b

Page 3
K.L.E Society’s
B.V.Bhomaraddi College of Engineering & Technology, Hubli-580 031

Examination Section
Semester End Examination Question Paper Review
Set I / Set II / Set III/ External
(Strike off the not Applicable one)
Programme: Course: Course Code:
Duration: Hrs Semester:
Self Review Expert
Criterion (Yes/No/NA/ Review
Number (Yes/No/NA/
Number
1] Whether the following details are mentioned correctly on YES
the
Header of the question paper (Exam month and year etc
up to instructions)?
2] Whether the question paper covers the entire syllabus YES
(unit wise) as announced in the scheme of SEE at the end
of prescribed syllabus for this course?
3] Whether the pattern of question paper is in accordance YES
with the model question paper?
4] Whether marks distribution is proper for all the questions YES
and sub questions?
5] Whether the question paper has all the required data and YES
figures? If figures exist, mention the number of figures in
the paper.
6] Mention the time required for an average student to 180 MNS
answer this paper (in minutes)
7] How many corrections you have made in the print copy of NIL
the question paper (typographical errors etc)?
8] Whether the scheme is ready along with the paper? YES
9] Whether the scheme contains marks splitting along with YES
points?
10] a) How many numerical problems are there in the
question paper?
b) How many worked out solutions exist in the scheme?
11] Is the Softcopy previewed for printing & verified for YES
corrections?
12] Would you like to do modifications to any of the NA *Yes/No
questions? (only for reviewer)
Reviewer’s Signature
Reviewer’s
Name
Date of Review

*If Yes please fill in the details on the reverse page

Page 4
To,
The Controller of Examinations
B.V.B College of Engineering & Technology, Hubli.

Sir,

After scrutinizing I Recommend No/ The Following (Strike out not applicable)
corrections for this paper. The details are as follows:

Department:__________________________ Course-
_____________________
Paper Code:___________________________ Course
Code:________________

Correction Unit Question & Existing Question Suggested Change Reasons for Change
No No Sub Questions

Date:______________ Signature of Scrutinizer


Scrutinizer:_____________
Name of the Scrutinizer:_

Page 5

You might also like