(a) Consider the following six functions. Choose only one of the following asymptotic…
- User
(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
(a)
-
( f_1(n) = 4000n^2 )
- Asymptotic running time: ( \theta(n^2) )
-
( f_2(n) = 100\sqrt{n - 10} )
- Asymptotic running time: ( \theta(\sqrt{n}) )
-
( f_3(n) = 2^n\log n )
- Asymptotic running time: ( \theta(2^n \log n) )
-
( f_4(n) = 10\log n^3 )
-
Simplify ( \log n^3 = 3\log n ), so:
-
Asymptotic running time: ( \theta(\log n) )
-
-
( f_5(n) = 12n^3 + 100n^2\log n )
-
The ( n^3 ) term dominates, so:
-
Asymptotic running time: ( \theta(n^3) )
-
-
( f_6(n) = 3^n + 1000n )
-
The ( 3^n ) term dominates, so:
-
-