ICS311 Hwk Sol Chs. 24, 32
1. Find the feasible solution to the following system of linear inequalities, utilizing
Bellman-Ford algorithm. Use alphabetical ordering.
x1 x3<= -1
x3 x2 <= 5
x3 x4 <= -2
x4 x1 <= -4
x2 x1 <= 1
x1 x4 <= -5
Convert to a g
ICS311 Exam I Solution, Fall2006
Allotted time: at least 1hr 15 mins, at most 1.5 hrs
1. a) (12 pts) Find the running time, in actual and asymptotic terms, and print the
final variables of the following pseudocode:
RT(n, m, x) cfw_
for ( k = 0, k <= m,
ICS311 Exam II, Spring 2007
1. (8 pts) Write a low-level algorithm that merges two columns C1 and C2 of a relational
database based on one common field, F. The algorithm should work in O(n lgn) time.
Show that it does.
Assume size(C1) = n, size(C2) = k.
ICS311 Spring 2004 Midterm Exam
1. (15 pts) Assume that we have available a hash table which has 9 slots and uses open addressing with
h(k, i) = (h(k) + i * h2(k) mod m
h(k) = k mod m
h2(k) = 1 + (k mod (m-1).
Illustrate the result of inse