1. Determine whether each of these functions is O(x).a) f (x) = 10 b) f (x) = 3x + 7 c) f (x) = x2 + x + 1 d) f (x) = 5 log x
Question
- Determine whether each of these functions is O(x).a) f (x) = 10 b) f (x) = 3x + 7 c) f (x) = x2 + x + 1 d) f (x) = 5 log x
Solution
Para determinar si cada una de las funciones es O(x), debemos verificar si existe una constante y un valor tal que para todo .
a)
Para cualquier , podemos elegir y : Por lo tanto, es O(x).
b)
Para cualquier , podemos elegir y : Por lo tanto, es O(x).
c)
Para cualquier , no podemos encontrar una constante tal que porque crece más rápido que . Por lo tanto, no es O(x).
d)
Para cualquier , podemos elegir y : Por lo tanto, ( f(x) = 5
Similar Questions
2. Determine whether each of these functions is O(x2).a) f (x) = 17x + 11 b) f (x) = x2 + 1000 c) f (x) = x log xd) 42xf x e) 2xf x f) ) f (x) = (x3 + 2x)/(2x + 1)
4. Determine whether x3 is O(g(x)) for each of these functions g(x).a) g(x) = x2 b) g(x) = x3 c) g(x) = x2 + x3d) g(x) = x2 + x4 e) g(x) = 3x f ) g(x) = x3/2
6. Give as good a big-O estimate as possible for each of these functions.a) (n2 + 8)(n + 1) b) (n log n + n2)(n3 + 2) c) (n! + 2n)(n3 + log(n2 + 1))
5. Arrange the functionsn , 1000 log n, n log n, 2n!, 2n, 3n, and n2/1,000,000 in a list sothat each function is big-O of the next function.
For each of the following statements, mark in the answer sheets whether the statement istrue or false.(a) n2 ∈ O(n)(b) 22 ∈ O(1)(c) n2 − 4n ∈ O(15n)(d) 4 log n + 10 log2 n ∈ O(log2 n)(e) 3n ∈ O(n!)
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.