0% found this document useful (0 votes)
36 views

DBT 1301 Data Structures Algorithms December 2019 PDF

Past paper questions for December 2019

Uploaded by

lisa.sayi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

DBT 1301 Data Structures Algorithms December 2019 PDF

Past paper questions for December 2019

Uploaded by

lisa.sayi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

STRATHMORE INSTITUTE OF MANAGEMENT & TECHNOLOGY

DIPLOMA IN BUSINESS INFORMATION TECHNOLOGY


END OF SEMESTER EXAMINATION
DBT 1301 DATA STRUCTURES & ALGORITHMS
DATE: 9th December 2019 Time: 2 Hours

Instructions
1. This examination consists of FIVE questions.
2. Answer Question ONE (COMPULSORY) and any other TWO questions.
3. Do not write on the question paper.
QUESTION ONE: COMPULSORY (30 Marks)

A. Discuss how space and time is understood and studied in computing in relation to
algorithms (2 Marks)

B. List and explain any three areas in which data structures and algorithm studies knowledge
are applied. (3 Marks)

C. In asymptotic analysis of algorithms give your understanding of the following terms:


i. Growth rate of an algorithm (1 mark)
ii. Time Complexity (1 mark)
iii. Big O analysis (1 mark)
D. Distinguish between:
i. Algorithm upper and lower bounds (2 marks)
ii. Data structures and file structures (2 marks)
iii. Linear and exponential runtime algorithms (2 marks)
E. Indicate whether true or false in the following claims: (5 marks)
Page 1 of 5
i. The time complexity of the Euclidean Algorithm is O log
ii. The highest computational expense of linear data structures is exponential
iii. Exponential and factorial runtime algorithms are best computing solutions
iv. A doubly linked list overcomes the limitations of arrays brought about by
contiguity and deletion high computational expenses
v. The complexity of Binary Search algorithm is O(n2)
F. Show that the time complexity of the below algorithm is quadratic i.e. show all your
working (5 marks)

G. For every given real world problem there exists different algorithms to solve it however
some algorithms are better than others.
i. What name is given to the technique used to choose between algorithms using
theoretical calculations? (1 mark)
ii. The above technique uses seven functions to measure algorithm growth rates.
Provide the values for the missing letters in the table below in relation to the
seven functions (3 marks)

1 1 1 1 ____D____ 1 1 2
2 1 1 2 ____E____ 4 8 4
4 1 2 4 ____F____ 16 64 16
8 1 3 8 24 64 512 256
16 ____A____ 4 16 64 256 4069 ____G____
32 ____B____ 5 32 160 1024 32768 ____H____
64 ____C____ 6 64 384 4069 262144 ____I____

Page 2 of 5
iii. Explain why algorithms that have an exponential runtime are not currently
considered as a computational solution though they may exist mathematically
(2 marks)

QUESTION TWO: ALGORITHM ANALYSIS & SEARCH ALGORITHMS (15 Marks)

A company has a database containing a column of customer ages and they have hired you to
develop a search algorithm to efficiently locate a given age number:

I. Using Linear search algorithm as the search techniques demonstrate how you would
search for the value 31 from the below dataset (5 marks)

10 14 19 26 27 31 33 35 42 44

[0] [1] [2] [3] [4] [5] [6] [7] [8] [9]

I. Without carrying out asymptotic calculations, predict the time complexity of linear
search algorithm in the worst case (1 mark)
II. From your workings above, generate a pseudocode for Linear Search Algorithm (5
marks)
III. Compare Linear vs Binary Search Algorithms in terms of their complexity (4 marks)

QUESTION THREE: TREE ADT (15 Marks)

I. State the type of traversal algorithm in trees ADT relevant for the following applications:
(3 marks)
i. Disk formatting
ii. File searching
iii. Arithmetic evaluation
II. Draw the expression tree for the following equation using mathematical knowledge (7
Marks)

6 3 ∗ 3 1
∗ 10
13 0.3 3 2 ∗9

Page 3 of 5
III. List any three application of tree data structures in computing technology (3 marks)
IV. What is the computational expense when performing a search in a binary tree ADT and
why? (2 marks)

QUESTION FOUR: SORTING ALGORITHMS (15 Marks)

I. Data Structures Holdings Company has a list of customers, which they wish to sort
in ascending order to lower the search time. Below is a section of the column in their
unsorted database. Sort it using the efficient Quick Sort Algorithm showing the result
in every given iteration (8 marks)

ruthlinda lucien qamar tukpah samuel peter patrick kevin zablon

II. Without performing Big Oh calculations, state the computational expense of Quick Sort
Algorithm. (1 mark)
III. Explain to Lucien, the CEO of DS Holdings, why Quick Sort Algorithm is more
efficient than all other current sorting algorithms (3 marks)
IV. Name any three other sorting algorithms apart from Quicksort (3 marks)

QUESTION FIVE: GRAPH ADTs (15 MARKS)

I. Name any two graph traversal algorithms (2 marks)


II. State any other use of Graph ADTs apart from transportation network modelling (1 mark)
III. Using the A* Algorithm show how you will find the shortest path between nodes A and J
in the graph ADT shown on the next page. Show your working in each successive step on
how you calculate (the heuristics cost for each node is underlined) (12 marks)

Page 4 of 5
Page 5 of 5

You might also like