Homework Assignment 7 (Big O, Induction, Recursion)

Homework Assignment 7 (Big O, Induction, Recursion)

<p> Homework Assignment 7 (Big O, induction, recursion) Reading Assignment: Rosen, Section 1.8, Section 3.3</p><p>Definitions: Big-O: f(x) is O(g(x)) if there is a constant c and a value k so that, for all xk, f(x)  c g(x). Big-: f(x) is  (g(x)) if there is a constant c and a value k so that, for all xk, f(x) c g(x). (Read this Big-Omega) Big-: f(x) is  (g(x)) if BOTH: f is O(g) AND g is O(f). (Read this Big-Theta)</p><p>I. Determine whether the following functions are in O(x):</p><p> a. f(x)=10 b. f(x)=3x+7 c. f (x)  x 2  x 1 d. f(x) = 5log (x) e. f(x)=|x| f. f(x) = x/2</p><p>II. For each of the above functions, determine if f(x) is (x) and whether it is (x).</p><p>III. Determine whether the following functions are in O(x2):</p><p> a. f(x)=17x+11 b. f(x) = x2+1000 c. f(x) = x log x d. f(x) = x4/2 e. f(x) = 2x f. f (x)  x x (floor of x times ceiling of x)</p><p>IV. For each of the above functions, determine if f(x) is (x 2) and whether it is (x 2).</p><p>V. Prove that f(x)= x4 + 9x3 + 4x + 7 is O(x4). Hint: Use the definition of big-O.</p><p>VI. Show (prove) that (x2 + 1)/(x +1) is O(x).</p><p>VII. Let k be a positive integer. Show (prove) that 1k + 2k +3k +...+ nk is O(nk+1). VIII. Give the smallest big-O estimate for the following functions:</p><p> a. (n2 + 8)(n+1) b. (n log n + n2)(n3 + 2) c. (n! + 2n)(n3 + log (n2 + 1)) d. (n3 + n2 log n)(log n + 1)(17 log n + 19)(n3 + 2)</p><p>IX. T is a set described using the two rules below: 1. (0,0)  T 2. If (m,n)  T then (m+1,n), (m+1,n+1), and (m+1,n+2) are in T </p><p>A. List 10 members of T. B. Prove that 2a ≥ b for all (a,b) in T.</p><p>X. S(2) = 1 S(2) = 2S(2) + 2</p><p>A. Write the sequence S(2) for k = 0, 1, 2, 3, 4, 5, 6 B. Try to get closed form (from part A) and prove by induction.</p><p>XI. Prove by induction (Note: your basis is > 0): a. 2n > n2 b. 3n < n!</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us