Q1) (a) Consider the following six functions. Choose only one of the following…
- User
Q1) (a) Consider the following six functions. Choose only one of the following asymptotic running times for each function and write a, b, c, or d in your answer sheet. � �1(𝑛) = 4000𝑛2
� �2(𝑛) = 100 √(𝑛 −10) 𝑓3(𝑛) = 2𝑛log(𝑛)
� �4(𝑛) = 10 𝑙𝑜𝑔(𝑛3)
� �5(𝑛) = 12𝑛3 +100𝑛2log(𝑛)
� �6(𝑛) = 3𝑛 +1000𝑛
� �) 𝜃(𝑛)
log(𝑛)
� �) 𝜃(1)
� �)𝜃(𝑛2) 𝑐) 𝜃(𝑛3)
� �)𝜃(1) � �)𝜃(𝑛0.5) 𝑐) 𝜃(𝑛0.5 log(𝑛)) 𝑑)𝜃(log(𝑛))
� �) 𝜃(2𝑛) 𝑏)𝜃(𝑛) 𝑐) 𝜃(2𝑛log(𝑛)) 𝑑)𝜃(log(𝑛)) � �) 𝜃(𝑛3)
� �) 𝜃(𝑛2)
� �) 𝜃(𝑛)
� �)𝜃(𝑛)
� �)𝜃(𝑛)
� �) 𝜃(log(𝑛))
� �) 𝜃(𝑛2log(𝑛))
� �)𝜃(𝑛3) 𝑐) 𝜃(𝑛(3𝑛))
� �)𝜃(2𝑛) � �)𝜃(𝑛3) � �)𝜃(3𝑛) [5 marks] (b) Arrange the functions (𝑓𝑖) in ascending order of running time and write your answer on the answer sheet. - Assistant
Q1(a) Asymptotic Running Times
Let's analyze each function and determine its asymptotic running time using Big Θ notation:
-
f₁(n) = 4000n²
- Asymptotic Running Time: Θ(n²)
-
f₂(n) = 100√(n − 10)
- For large n, √(n − 10) ≈ √n
- Asymptotic Running Time: Θ(√n) or Θ(n^0.5)
-
f₃(n) = 2n log(n)
- Asymptotic Running Time: Θ(n log n)
-
f₄(n) = 10 log(n³)
- Using logarithm properties: log(n³) = 3 log(n)
- Asymptotic Running Time: Θ(log n)
-
f₅(n) = 12n³ + 100n² log(n)
- For large n, the term 12n³ dominates.
- Asymptotic Running Time: Θ(n³)
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.