Question 15 Question 3b Determine the runtimes of Algorithms 3, 4, 5 using Big Theta notation. Algorithm 4 Require: Int
Posted: Tue May 24, 2022 8:31 am
Question 15 Question 3b Determine the runtimes of Algorithms 3, 4, 5 using Big Theta notation. Algorithm 4 Require: Int n ≥ 1 Algorithm 3 Require: Int n ≥1 x +0 i +1 for i = 1 ... n do while i ≤ n do for j = 1 ... [1/2] do x+x+i.j end for end for return x Algorithm 3: • Algorithm 4: • Algorithm 5: x + 0 i +2.i for j = i... 4. i do x+x+i.j end for end while return x Algorithm 5 Require: Int n ≥ 1 x +0 i +1 while in do i← log(n).i for j = 1 ... ndo x+x+i.j end for end while return x
For each question, choose from the following options: 1.0(n² log² n) 2. e(n) 3. e(n5/2) 4. (n log² n) 5. (n log log n) (log n) 7. (nlog log n) 6. 8. (n² log n) 9. e (n log n) 10. (n/logn) 11. (¹/³) 12. (n³) 13. e(n) 14. (n5/³) 15. (n log n/log log n) 16. (³/2) 17. (n²) 18. e(n/ log log n) 19. (nog) 20. (2✓log n) 21. (1)
For each question, choose from the following options: 1.0(n² log² n) 2. e(n) 3. e(n5/2) 4. (n log² n) 5. (n log log n) (log n) 7. (nlog log n) 6. 8. (n² log n) 9. e (n log n) 10. (n/logn) 11. (¹/³) 12. (n³) 13. e(n) 14. (n5/³) 15. (n log n/log log n) 16. (³/2) 17. (n²) 18. e(n/ log log n) 19. (nog) 20. (2✓log n) 21. (1)