Escolar Documentos
Profissional Documentos
Cultura Documentos
INF1 2003
Tutorial 3
Exercise 1
Let , such that , be the maximum of . Then the probabilities satisfy
Exercise 2
We shall solve the following recurrence equation
for by repeated substitutions. Let us unfold . Observe the pattern for . So if then
Proof: by induction on n we show that . In the base case and as required. Let . By IH (induction hypothesis) assume . Now that for all
(by denition)
(by IH)
Exercise 3
We shall solve the following recurrence equation
. So if
then
Proof: by induction on n we show that as required. Let . By IH (induction hypothesis) assume that for all . Now
(by denition) 1
(by IH)
INF1 2003
Exercise 4
Let be the size of the array, i.e., and assume that . Then and for . Let us reformulate the recurrence equation . such that we consider only the points where for some integer . Hence we shall Let . Observe that solve the following recurrence equation
for . by repeated substitutions. Let us unfold . Observe the pattern for . So if then However, implies that . So . . In the base case Proof: by induction on k we show that and (by denition) as required. Let . By IH (induction for all . Now hypothesis) assume that (by denition) (by IH)
Exercise 5
Exercise 6
a) Let us x and , then for all . Another possibility and because for all . The validity of is e.g. the second case can be proved by induction. In the basic step we have to check which is true. For the inductive step let and by IH we that . We want to show that , which assume that is true because
for every
INF1 2003
c) Let and . Then for all . The argument for why is a little bit more difcult this time and we will prove it by induction on . For the base case (n=100) we have calculator if you want to :-)). Let
(2)
To nish the proof we will now argue that (2) is true for all . To prove is the same as to prove (both sides are non-negative), which is the same as , which is the same as , which is the same as , which is the same , which is obviously true for all because . as d) Let us x. e.g. .
, and the
and
, then
for all
for all . Next we have to show that is . Let and for all . immediately implies that
is . Let
and . Then
which
Exercise 7
and
even if
(and we usually write only since the base of the logarithm is irrelevant for the -notation as proved during the lecture) The argument for this is the following:
INF1 2003
Exercise 8
It is true that is but is not . Hence is not .
Exercise 9
Assume that and which means that there are natural numbers and , and real numbers and such that
for all and for all . and Let us dene for all and hence .