Practical 1 Data Management and Handling (CP2016)
1. (Exercise R-1.10)
Write a short Java function, isMultiple, that takes two long values, n and m, and returns true
if and only if n is a multiple of m (i.e. n = m * i for some integer i).
2. (Exercise R-1

i)
Political Geography
Russia and the Near Abroad
Energy s Russia's Carrot and Stick, [p136 to p137]
Ethnicity, [p137]
Territorial Issues, [p137 to p138]
1. What is the topic about?
The geo-political issues concerning Russia and its former Soviet states
(

Practical 10 Data Management and Handling (CP2016)
1. (Exercise R-13.2 modied)
Draw an adjacency list and an adjacency matrix representation of the undirected graph shown
in Figure 1.
V
U
X
Z
W
Y
Figure 1: An undirected graph for question 1.
2. (Exercise

Practical 5 Data Management and Handling (CP2016)
1. (Exercise R-6.20)
Suppose we are maintaining a collection C of elements such that, each time we add a new
element to the collection, we copy the contents of C into a new array list of just the right
siz

Practical 6 Data Management and Handling (CP2016)
1. (Exercise R-8.9)
Give an example of a worst-case sequence with n elements for insertion-sort, and show that
insertion-sort runs in (n2 ) time on such a sequence.
2. (Exercise R-8.15)
Is there a heap T s

Practical 8 Data Management and Handling (CP2016)
1. (Exercise R-10.3 modied)
Insert, into an empty binary search tree, entries with keys 30, 40, 24, 58, 48, 26, 25 (in this
order). Draw the tree after each insertion.
2. (Exercise R-10.9)
Draw an AVL tree

Practical 9 Data Management and Handling (CP2016)
1. (Exercise R-11.2)
Suppose S is a list of n bits, that is, n 0 s and 1 s. How long will it take to sort S with the
merge-sort algorithm? What about quick-sort?
2. (Exercise R-11.8)
Suppose we are given t

Practical 7 Data Management and Handling (CP2016)
1. (Exercise R-9.7)
Draw the 11-entry hash table that results from using the hash function h(i) = (3i + 5) mod 11
to hash the keys 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, and 5, assuming collision are hand

Practical 2 Data Management and Handling (CP2016)
1. (Exercise C-3.5)
Lean B be an array of size n 6 containing integers from 1 to n 5, inclusive, with exactly
ve repeated. Describe a good algorithm for nding the ve integers in B that are repeated.
2. (Ex

Practical 3 Data Management and Handling (CP2016)
1. (Exercise R-4.7)
The number of operations executed by algorithms A and B is 8n lg n and 2n2 , respectively.
Determine n0 such that A is better than B for n n0 .
2. (Exercise R-4.13)
Order the following

Practical 4 Data Management and Handling (CP2016)
1. (Part of Problem 3.4, Cormen et al.)
Let f (n) and g(n) be asymptotically positive functions. Prove or disprove each of the following
conjectures:
(a) f (n) = O(g(n) implies g(n) = O(f (n).
(b) f (n) +

Challenge
The standard study format for most university students dictates that students would give a deadline usually
averaging to 12 weeks for universities and within this timeline each student spends each week preparing for
the standardized test at the