Contents
Exercise: Algorithms
-
Complexity and Efficency:
-
How complex is an algorithm
that computes the inner product
of two vectors with dimension n.
-
Assume you run a sorting algorithm
on a CPU that does
109 operations per second (1 GHz)
and you want to order an array with n=107
(10 million) elements.
Also assume that one machine cycle corresponds
to one operation in the sense of metric of the algorithm.
Compare the running times
of an algorithm with O(n2)
with an algorithm with O(n log(n)).
-
Find one function example and bound
for each asymptotic bound type:
Big-Theta "Θ",
Big-Oh O,
Big-Omega "Ω",
Little-oh "o"
and
Little-Omega "ω".
-
Calculation with Boolean Logic
-
Abstract Data Types: Array, List and Hash
-
Implement a telephone book in Java.
It must be possible to enter names and
numbers or read them from a file.
-
Realize an implementation where the
telephone book data is stored in an
array.
-
Extend the implementation to store the
telephone book data in a list.
-
Extend the implementation to store the
telephone book data in a hash-table.
-
Compare the performance
(search time for 1000 telephone numbers)
of array, list and hash-table for a
village(1000 phones),
a small town(100000 phones)
and New York (10 million phones).
-
Quick Sort:
-
Implement the Quick Sort algorithm in Java
or pseudo code.
-
Prepare to explain your implementation.
-
k-means clustering:
-
Implement the k-means algorithm
basted on the
Java EM-Algo code.
-
Prepare to explain your implementation.