CSPP 50102 Mathematics for Computer Science—Summer 2011

Homework 6 (assigned July 27, due August 2)

Reading: Rosen chapter 2, section 2.4; chapter 3, sections 3.1–3.3.

Written assignment : Solve the following "Do" exercises and assigned problems. Only solutions to the assigned problems should be turned in. Note: You are responsible for the material covered in both "Do" exercises and assigned problems.

"Do" Exercises (not to be handed in):

  1. Use the definitions of Big Oh, Ω, Θ, and little Oh to determine if the following assertions are true or false.

  2. Prove the following rules using the definitions of the notations involved. What does the last rule imply for an algorithm that comprises two consecutively executed parts?

  3. For each of the following pairs of functions f (n) and g(n) below, indicate whether f (n) is O, o, Ω, or Θ of g(n). Note that zero, one, or more than one of these relations may hold for a given pair; list all the correct ones.
    1. f (n) = n100;   g(n) = 2n.
    2. f (n) = nlg n;   g(n) = (lg n)n.

  4. Use summation facts and known closed forms to transform the following summation into a closed form. Note: lower and upper limits of summation are subscripted to the sum symbol.
    1 ≤ kn k3.
    Use the method shown in class, starting with the difference between two successive general terms of the sum. See also exercises 19 and 21 of section 2.4, page 162 of Rosen.

Assigned problems (to be handed in):

  1. Prove each of the following statements. (5 points each)
    1. log2(kn) = Θ(log2n), where k is a real number > 0.
    2. log2(k + n) = Θ(log2n), where k is a real number > 0.
    3. (n + a)b = Θ(nb) for all real constants a and b such that b > 0.

  2. Prove each of the following statements. (5 points each)
    1. n3 = o(2n).
      (Hint: Use l'Hopital's rule repeatedly until n disappears from the numerator.)
      (Note: The more general result, nb = o(an) for all real constants a and b such that a > 1, is also true.)
    2. (log2n)a = o(na), for any real constant a > 0.
      (Note: The more general result, (log2n)b = o(na) for any real constants a and b with a > 0, is also true.)

  3. Find two functions f (n) and g(n) that satisfy the following relationship. If no such f  and g exist, explain why not. (5 points each)
    1. f (n) = o(g(n)) and f (n) ≠ Θ(g(n))
    2. f (n) = Θ(g(n)) and f (n) = o(g(n))
    3. f (n) = Θ(g(n)) and f (n) ≠ O(g(n))
    4. f (n) = Ω(g(n)) and f (n) ≠ O(g(n))

  4. For each of the following pairs of functions f (n) and g(n) below, indicate whether f (n) is O, o, Ω, or Θ of g(n). Note that zero, one, or more than one of these relations may hold for a given pair; list all the correct ones and prove your answers. Note: lg n = log2n. (5 points each)
    1. f (n) = n1/3,   g(n) = n2/3.
    2. f (n) = (lg n)12;   g(n) = √n.
    3. f (n) = n2n;   g(n) = 3n.

  5. Compute each of the following sums and give Θ-estimates for each. Note: lower and upper limits of summation are subscripted to the sum symbol. (5 points each)
    1. 0 ≤ in − 1 i(i + 1)
    2. 1 ≤ jn 3j+1
    3. 1 ≤ in1 ≤ jn ij

  6. Prove: If c is a positive real number, then g(n) = ∑0 ≤ kn ck = 1 + c + c2 + … + cn is:
    1. Θ(1) if c < 1.
    2. Θ(n) if c = 1.
    3. Θ(cn) if c > 1.
    (5 points each)

  7. Find a closed form for the sum
    1 ≤ kn k2k = 1 × 2 + 2 × 22 + 3 × 23 + … + n2n
    using summation facts and known closed forms. (10 points)
    (Hint: Use the method shown in class, starting with the difference between two successive general terms of the sum. See "Do" exercise 4 above, and exercises 19 and 21 of section 2.4, page 162 of Rosen.)


Gerry Brady
Thursday July 28 12:25:39 CDT 2011