Exercises
- Prove by induction, that for every natural number n the following
formulas are valid:
- 12 + 22 + 32 + ... + n2
= (1/6)n(n+1)(2n+1)
- 13 + 23 + 33 + ... + n3
= [(1/2) n (n+1)]2
- 1 + a1 + a2 + ... + an = (an+1
- 1)/(a-1) for a>1
- Prove that for every natural number n such that n>0,
- Find:
- a formula which defines number of diagonals in a convex
polygon as a function of the number of its sides and prove its
correctness by induction.
- a formula which express maximum number of cross-points for
any n lines on the plane (e.g. two different lines have at most one
cross-point, three lines have at most three cross-points, etc.) and
prove its correctness using mathematical induction.
- Prove that for every natural number n the following equalities
hold:
- Σ i=1...n(2i-1) = n
2
- Σ i=1...n(2i-1)2
= (1/3)n(4n 2-1)
- Σ i=1...n(2i-1) 3
= n 2(2n 2-1)
- Find solutions to the equations. Prove that they are correct.
- T(1) = 0, T(n) = 2T(n/2) + n, for all n being the power of 2.
- T(1) = c, T(n) = T(n-1) + n, for all n >1 and a constant
c.
- Prove by induction that the following algorithms solve given
problems correctly.
- The algorithm calculating the scalar product of the two
vectors X, Y of length n,
{ilSk := 0; i := 1; while i<n+1 do ilSk := X(i)*Y(i) + ilSk; i :=
i+1 od }
- The algorithm of finding the greatest element in a given
sequence of n elements.
{max := a(1); i := 2; while i<n+1 do if max <a(i) then max :=
a(i) fi; i := i+1 od }
-
Use mathematical induction to prove that
Si=1n (i/(i+1)! = 1 -(1/(n+1)! for
all n>0.
- Prove by induction that
- 2n< n! for n>3
- 2n> n2
- n3< n! for n>5
-
Consider the following recurrence:
T(1) = 1, T(n) = 2T(n-1) + 3 for n>1.
(a) Find value of T(n) for n = 2, 3, 4, 5.
(b) Solve the above recurrence exactly by finding the closed form
expression for it.
- Consider the following recurrence where a and b are real numbers
and a>1 :
T(1) = 1, T(n) = aT(n-1) + b for n>1.
(a) Find T(n) for n = 2, 3, 4, 5?
(b) Solve the above recurrence exactly by finding the closed form
expression for it.