You are on page 1of 3

Kuvempu University

Model Question Paper (Academic Year 2005 - II Cycle) Subject: Algorithms Subject Code: BSIT - 41
Note: Both Part A and Part B are compulsory Maximum Marks: 100 Duration: 3 hrs PART A 1. Answer the following (a) __________ is one of the properties of an algorithm. (b) __________ is the process of executing a correct program on data sets and measuring the time and space it takes to compute the results. (c) _________ is a technique of defining a process by itself (d) A graph with out self loop and parallel edges is __________ (e) A tree with n vertices has _________ edges. (f) Searching for a word in the dictionary is an example for ________ search. (g) One of the properties of an algorithm is structured (true/false) (h) Stack works on the strategy of first in first out (True/ false) (i) Circular queue works on the strategy first in first out (True/false) (j) Tree is a __________ data structure. (k) A binary tree of depth l has atmost ___________ number of nodes (l) The percentage of memory wastage in linked representation of binary tree is ____________ (m) The percentage of memory wastage in adjacency matrix representation of binary tree is ____________ 2. Answer any 4 questions (a) Define algorithm? What are its properties (b) Define circular queue? What are its advantages (c) Draw atleast two connected graph that become disconnected when exactly two edges are removed from them (d) What are the merits and demerits of recursion (e) Draw all complete graphs with n=2, 3, 4, 5 vertices. (f) How can one validate the designed algorithm 3*4 113

PART B Answer any five of the following 1. (a) Design two different algorithms to check if a given number is prime. 08 (b) Design an iterative and recursive algorithm to generate Fibonacci sequence of length n. 07 2. (a) Explain and illustrate insertion sort algorithm to sort a list of n numbers 08 (b) Design iterative and recursive algorithm to find the minimum among n elements 07 3. (a) Design an algorithm to check whether the given graph is connected from the adjacency matrix representation 07 (b) Design an iterative and recursive algorithm to search for an element using binary search 08 4. (a) Design an iterative algorithm to traverse a binary tree represented in two dimensional matrix 09 (b) Draw a binary tree of level 6 having atleast 18 nodes and obtain the inorder, preorder sequences of the tree 06 5. (a) Design a recursive algorithm to sort a list of elements using quick sort and hand simulate on a data set of atleast 9 elements 15 6. (a) Design a recursive algorithm to sort a list of elements using Mergesort and hand simulate on a data set of atleast 9 elements. 15 7. (a) Draw all binary trees with six pendent vertices 03

(b) Design recursive algorithms to traverse a binary tree represented in linked lists in inorder, preorder, postorder. 12 8. Write short notes on (a) Stack and its applications (b) Incidence matrix 53=15

(c) One dimensional representation of a Binary tree

You might also like