• Home
  • University of the People
  • Data Structures (proctored course) CS 3303
  • Asymptotic Analysis and Algorithms

Asymptotic Analysis and Algorithms

1/9/22, 10:55 AM Learning Guide Unit 2 Discussion Assignment For the following problems, develop your own answers and post your answers to the discussion forum. Review the responses of at least 3 of to determine where the problem lies. If you have discovered a different way of understanding the problem or solving the problem share your approach with your peers. The objective of this assignment is to collaboratively learn and develop correct results for each of the problems. Asymptotic analysis is a difficult concept to master as such we will all benefit by understanding each others perspectives. 1. Suppose that algorithm A takes 1000n3 steps and algorithm B takes 2 "steps for a problem of size n. For what size of problem is algorithm A faster than B (meaning algorithm A has fewer steps than B)? In your answer describe not only what the answer is but how you arrived at the answer. 2. Give the upper bound (big O notation) that you can for the following code fragment, as a function of the initial value of n. for(int i = 0; i < n; i++) { for(int j= 0;j< i;j++){ //do swap stuff, constant time 1 1 Do you think that the lower bound is likely to be the same as the answer you gave for the upper bound? In your response state why or why not. https://my.uopeople.edu/mod/book/tool/print/index.php?id=268719 7/10