3710215_merged
3710215_merged
3710215_merged
Rationale:
Content:
Reference Books:
1. Mark Allen Weiss, Data Structures and Algorithm Analysis in C++, 2nd Edition, Pearson, 2004
2. M T Goodrich, Roberto Tamassia, Algorithm Design, John Wiley, 2002.
Course Outcome:
List of Experiments:
(Note: At least 12 Practicals should be performed from the list.)
1. Write a program which creates Binary Search Tree. And also implement recursive and non-
recursive tree traversing methods inorder, preorder and post-order for the BST.
2. Write a program to implement any two hashing methods. Use any one of the hashing method to
implement Insert, Delete and Search operations for Hash Table Management.
3. Explain Dictionary as an Abstract Data Type. Implement Dictionary using suitable Data Structure.
4. Write a program which creates AVLTree. Implement Insert and Delete Operations in AVL Tree.
Note that each time the tree must be balanced.
5. Implement Red-Black Tree.
6. Implement 2-3 Tree.
7. Implement B Tree.
8. Implement a program for String Matching using Boyer-Moore Algorithm on a text file content.
9. Implement a program for String Matching using Knuth-Morris-Pratt Algorithm on a text file
content.
10. Implement Huffman-Coding Method. Show the result with suitable example.
11. Implement Longest Common Subsequence(LCS) Problem using Dynamic Programming Method.
Show the DP table and also find the particular solution of given strings.
12. Implement One Dimensional and Two Dimensional Range Searching in any language.
13. Write a program which creates Priority Search Tree. Implement Insert and Search Operations in this
Tree.
14. Write a program which creates Skip Lists. Implement Insert, Search and Update Operations in
Skip-Lists.
15. Design a simple search engine to display the possible websites upon entering a search query. Use
suitable data structure for storage and retrieval.
16. Prepare a Report/Presentation on Recent trends on Hashing/Trees/Computational Geometry to
solve ay of recent evolving problem in real world.
Seat No./Enrolment No.___________
Q.1 (a) Explain Boyer Moore Pattern matching algorithm with example. 07
(b) Define Red-Black tree. Also discuss solution of various cases of violations that 07
occur while inserting a node in Red-Black tree.
Q.3 (a) Describe how LCS problem can be solved using dynamic programming 07
(b) Draw the 11-item hash table resulting from hashing the keys 12, 44, 13, 88, 23, 94, 07
11, 39, 20, 16, and 5 using the hash function h(i) = (2i + 5) mod 11 and assuming
collisions are handled by quadratic probing, up to the point where the method fails
because no empty slot is found.
OR
Q.3 (a) What are the different types of imbalances that occur while deleting a node from 07
AVL trees? Explain with an example for each type of imbalance?
(b) Discuss Huffman coding method. Explain it with an example. 07
Q.4 (a) Write Knuth-Morris-Pratt Algorithm. Also compute its time complexity. 07
(b) What is Hash function? What are the collision resolution techniques? 07
OR
Q.4 (a) Discuss two dimensional range searching algorithm in detail 07
(b) Discuss Standard Tries and Compressed Tries. 07
***************
Seat No.: ________ Enrolment No.___________
Q.1 (a) Explain with example the process of searching an element in skip list. 07
(b) What are the properties of BST? Describe an algorithm to traverse node in preorder. 07
Q.2 (a) Construct a tree for the given inorder and postorder traversals Inorder 07
DGBAHEICFand Postorder GDBHIEFCA
(b) Insert the following letters into an empty B-tree of order 5: C N G A H E K Q M F W L 07
TZDPRXYS
OR
(b) Build an AVL tree for inserting 13, 16, 10, 8, 5, 4, 15, 12, 9 values. After this insertion 07
delete 53 and 11. Show the step by step construction
Q.3 (a) What is hash table and hash function? Discuss and analyze various ways to define hash 07
function?
(b) What is 2-3 tree? How is it better than other search trees? Construct a 2-3 B tree for the 07
list I,N,T,E,R,N,E,T
OR
Q.3 (a) Why rehashing is needed? State different ways in which rehashing can be implemented. 07
Write a procedure to implement dictionary using suitable data structure.
(b) Construct Red and Black tree for keys 10,20,-10,15,17,40,50,60. 07
Q.4 (a) Construct the open hash table (separate chaining) and closed hash table (open addressing 07
– use linear probing) for the input: 42, 10, 36, 67, 50, 91, 64, 77, 57, 91 using the hash
function h(k) = k mod 10. Explain each step in detail.
(b) Given two sequences, find the length of longest subsequence present in both of 07
them. Find LCS for input sequences “HUMAN” and “CHIMPANZEE”
OR
Q.4 (a) Explain The Knuth-Morris-Pratt Algorithm with example. 07
(b) What is K-D Tree? Create K-D Tree for inserting (2, 5), (16, 14), (12, 14), (5, 11), (8, 07
1), (3, 7), (10, 19) values. Delete (12, 16) and (3, 7). Draw tree after each operation.
Q.5 (a) Consider the following list of string to create tries :cat,bat,ball,rat,cap,be. 07
(b) A file contains the following characters with the frequencies as shown. If 07
Huffman Coding is used for data compression, determine-
1. Huffman Code for each character
2. Average code length
3. Length of Huffman encoded message (in bits)
Characters A E I O U S T
Frequencies 10 15 12 3 4 13 1
OR
Q.5 (a) What is one dimensional range searching? Describe an algorithm of creating one 07
dimensional range search.
(b) What is priority search tree? Explain how Searching in a Priority Search Tree 07
performed.
1
Seat No.: ________ Enrolment No.___________
Q.1 (a) What is Open addressing in hashing? Discuss various methods of doing it. 07
(b) Where can Dictionary be used and how? Explain different ways of 07
implementing Dictionaries.
Q.2 (a) Discuss Priority range trees. 07
(b) Discuss one dimension and two dimension range searching. 07
OR
(b) Explain Quad tree. 07
Q.3 (a) What is meant by a search tree? Discuss 2-3 Tree. 07
(b) Discuss creation of K-D tree with an example. 07
OR
Q.3 (a) Discuss algorithm of Insert operation in the Skip list. 07
(b) How does a red black tree ensure balance? Explain with an example. Label R 07
for a Red node and B for a Black node in the explanation.
Q.4 (a) Discuss Brute-Force pattern matching algorithm. Count total number of 07
comparison to search Pattern (P) from the Text (T), as given below:
T: abacaabaccabacabaabb
P: abacab
Show all intermediate comparisons.
(b) Discuss AVL tree and different rotations while performing insertion in the tree. 07
OR
Q.4 (a) What are applications of pattern matching algorithms? Discuss Boyer Moore 07
algorithm.
(b) Discuss Splay tree and its three cases which are considered while restructuring 07
the tree. Also, for the following part of tree, apply Zig-Zig rotation considering
newly added node is x.
Q.5 (a) Discuss Longest common subsequence problem along with its applications and 07
a way to find/solve it.
(b) Discuss Standard Trie and Compressed Trie. 07
1
OR
Q.5 (a) Is KMP algorithm better than Boyer Moore algorithm? Justify your answer. 07
(b) Create a Binary Search Tree for the given input sequence : 500, 300, 400, 350, 07
375, 360. What would be the worst case time required to search a node in such
type of tree (having similar pattern of inputs)?
*************
2
Seat No.: ________ Enrolment No.___________
*************