Knowee
Questions
Features
Study Tools

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

  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
🧐 Not the exact question you are looking for?Go ask a question

Solution

Para determinar si cada una de las funciones es O(x), debemos verificar si existe una constante c c y un valor x0 x_0 tal que f(x)cx f(x) \leq c \cdot x para todo xx0 x \geq x_0 .

a) f(x)=10 f(x) = 10

Para cualquier x1 x \geq 1 , podemos elegir c=10 c = 10 y x0=1 x_0 = 1 : 1010x 10 \leq 10 \cdot x Por lo tanto, f(x)=10 f(x) = 10 es O(x).

b) f(x)=3x+7 f(x) = 3x + 7

Para cualquier x1 x \geq 1 , podemos elegir c=10 c = 10 y x0=1 x_0 = 1 : 3x+73x+7x=10x 3x + 7 \leq 3x + 7x = 10x Por lo tanto, f(x)=3x+7 f(x) = 3x + 7 es O(x).

c) f(x)=x2+x+1 f(x) = x^2 + x + 1

Para cualquier x1 x \geq 1 , no podemos encontrar una constante c c tal que x2+x+1cx x^2 + x + 1 \leq c \cdot x porque x2 x^2 crece más rápido que x x . Por lo tanto, f(x)=x2+x+1 f(x) = x^2 + x + 1 no es O(x).

d) f(x)=5logx f(x) = 5 \log x

Para cualquier x1 x \geq 1 , podemos elegir c=5 c = 5 y x0=1 x_0 = 1 : 5logx5x 5 \log x \leq 5x Por lo tanto, ( f(x) = 5

This problem has been solved

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!)

1/3

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.