Question

Use Big-O Notation to characterize the computational cost of algorithm A1 and A2. The complexity of...

Use Big-O Notation to characterize the computational cost of algorithm A1 and A2. The complexity of A1 is 10000 * n, with n being the number elements processed in A1. The complexity of A2 is 100 * n, with n elements in A2. State in Big-O notation the cost of f1, with f1(x) = log2(2x) – 14x + 3 sqrt(x) + 12x^2 - 150 this is also a theoretical question just answer no code.

Homework Answers

Answer #1

A1 is 10000 * n

=> 0 ≤ 10000*n ≤ 10001n ∀ n≥0

=> A1 is O(n)

A2 is 100 * n

=> 0 ≤ 100*n ≤ 101n ∀ n≥0

=> A2 is O(n)

f1(x) = log2(2x) – 14x + 3 sqrt(x) + 12x^2 - 150

=> 0 log2(2x) – 14x + 3 sqrt(x) + 12x^2 - 150 ≤ x^2 + 14x^2 + 3 x^2 + 12x^2 + 150x^2 ∀ x≥5

=> 0 ≤ log2(2x) – 14x + 3 sqrt(x) + 12x^2 - 150 180x^2 ∀ x≥5

=>log2(2x) – 14x + 3 sqrt(x) + 12x^2 - 150 is O(x^2)

******************************************************************************************
PLEASE LIKE IT RAISE YOUR THUMBS UP
IF YOU ARE HAVING ANY DOUBT FEEL FREE TO ASK IN COMMENT SECTION
******************************************************************************************

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT