Skip to content

JA2. Algorithm Analysis

Statement

The Learning Journal is a tool for self-reflection on the learning process. In addition to completing directed tasks, you should use the Learning Journal to document your activities, record problems you may have encountered and to draft answers for Discussion Forums and Assignments.

Your learning journal entry must be a reflective statement that considers the following questions

Describe what you did. This does not mean that you copy and paste from what you have posted or the assignments you have prepared. You need to describe what you did and how you did it

  • This was the second week of this course, it discussed various ways of analyzing the cost of algorithms in general, with a focus on time complexity.
  • I started my week on Sunday by doing the self-quiz, then I read the required reading assignment, solved the discussion forum questions, watched the optional video lectures, and finally filling up my learning journal.

Describe your reactions to what you did

  • The reading assignment was pretty challenging, it took me around 20 hours to finish the reading and take notes.
  • and I still find it hard to distinguish between the meaning of omega, theta, and big-O notation.
  • We used the big-O notation in previous courses and practically it was easy understanding how such an algorithm falls under a specific big-O notation; but understanding the meaning of the notation itself was a bit challenging.

Describe any feedback you received or any specific interactions you had. Discuss how they were helpful

  • The discussion assignment asked about analyzing the time complexity of two algorithms A = 1000n^2 and B = 2^n.
  • I used some online tool to graph the two functions to find where do hey intersect and which one is faster.
  • After I submitted my solution and read through my classmates’ solutions and feedback, I realized that I discussed my functions in too short domain of n (n < 10), and that’s why I got the wrong answer.
  • Reading through the feedback, I went back to my functions and played with the graphing tool for a little while to find out that the two functions flip over at n > 24.
  • I went back to my answer and rewrite it again with the correct analysis, and resubmitted it.

Describe your feelings and attitudes

  • To be honest, I feel frustrated and disappointed with myself for not being able to understand the difference between the three notations, despite putting too much effort into the reading and the optional video lectures.
  • I hope that with the coming weeks and more practicing analysis will help me build a strong understanding of the three notations.

Describe what you learned

  • We learned about the asymptotic analysis of algorithms, and the different growth rates of algorithms, including linear, logarithmic, quadratic, exponential, and factorial growth rates.
  • We learned about the best, worst, and average case analysis of algorithms.
  • We learned that analyzing the worst case scenario is the most important because it cancel out environmental factors that may affect the performance of the algorithm.
  • We learned that the upper bound of the growth rate is the most value a growth rate cna have at the worst case scenario.
  • We learned that lower bound of the growth rate is the least value a growth rate can have at the best case scenario.
  • The intersection between the upper bound and the lower bound defines the theta notation (shaffer, 2011).
  • We also saw lots of examples about analyzing the time complexity of different parts of computer programs including loops and recursion.

What surprised me or caused me to wonder?

  • I was surprised by how two algorithms can flip over at a specific value of n, that’s probably out of initial view of the problem.
  • I was also surprised that the big-O notation is not as precise as I thought it was, instead it was just an estimation of how things can go.

What happened that felt particularly challenging? Why was it challenging to me?

  • The difference between the three notations was challenging to me, since I was not able to fully understand the upper bound, lower bound, and how they construct the theta notation.

What skills and knowledge do I recognize that I am gaining?

  • I am gaining the ability to analyze the time complexity of algorithms, and decide which algorithm is better than the other.

What am I realizing about myself as a learner?

  • I have been in the field for a while and I understand how things work practically, but I have little understanding of the underlying theory and explanation of how things work.

In what ways am I able to apply the ideas and concepts gained to my own experience?

  • I understand that performance is important, and it is we are discussing in this course, but there are other factors that worth considering when writing software, those includes maintainability, readability, extensibility, and user experience.

Finally, describe one important thing that you are thinking about in relation to the activity

  • I am thinking that the coming weeks will help build upon the challenging concepts of this week and make them more clear.

References