« previous section    next section »


Exercises

  1. Prove by induction, that for every natural number n the following formulas are valid:
  2. Prove that for every natural number n such that n>0,
  3. Find:
  4. Prove that for every natural number n the following equalities hold:
    1. Σ i=1...n(2i-1) = n 2
    2. Σ i=1...n(2i-1)2 = (1/3)n(4n 2-1)
    3. Σ i=1...n(2i-1) 3 = n 2(2n 2-1)

  5. Find solutions to the equations. Prove that they are correct.

  6. Prove by induction that the following algorithms solve given problems correctly.
    1. 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 }
    2. 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 }

  7. Use mathematical induction to prove that
    Si=1n (i/(i+1)! = 1 -(1/(n+1)! for all n>0.

  8. Prove by induction that
    1. 2n< n! for n>3
    2. 2n> n2
    3. n3< n! for n>5

  9. 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.

  10. 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.

 
« previous section    next section »