Question: 1. Why is it necessary to measure an algorithms efficiency during the design phase of software, and why is this measurement dependent on the problem
1. Why is it necessary to measure an algorithms efficiency during the design phase of software, and why is this measurement dependent on the problem size?
2. Determine the big O of each of the following formulas.
f(n) = (n + 1)(n2 - 3n)
f(n) = (5n3 + 7n2 - 2n + 13) / n
f(n) = (n2 + 4)(log(n) + 9) / (n + 3)
3. The following two formulas have equivalent big O values. However, in a practical scenario, which algorithm is likely to be faster? Why?
f(n) = (n2 + n) / 2
f(n) = n2
4. Determine the c and N values of the bounding function for each of the following formulas.
f(n) = n! + n3
f(n) = 4n3 + 6n2 + 11n 15
f(n) = 3n + log(n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
