CST370 - Module 2
What did I learn in the second week of CST370?
This is the second week of CST370, as we went from going over algorithms to analyzing how efficient they are when applied. Basically, this week's module introduced asymptotic notations (Big‑O, Big‑Ω, and Big‑Θ), providing a mathematical way in describing how the algorithms function within programs. Furthermore, through the lectures and readings, I have learned how these notations can be used to compare algorithms without independent hardware or details listed by a computer, which helps me to build up a long-term mindset in evaluating the functionality of programs and there corresponding operations.
Another thing that I gleamed from this week was learning how to analyze non-recursive algorithms. Basically, through breaking down loops, nested loops, and basic operations into a simplified format with Θ‑notation, I began to understand how one can be systematic in algorithm analysis when identifying basic operations, counts within programs, and finding the dominant term. On the other hand, recursive algorithms required a different methodology to understand the algorithms functionality through a backward substitution or pattern recognition. Therefore, to practice this the instructor provided puzzles that emphasized logical reasoning and step-by-step deduction, for example a puzzle called 'racing cars' or '4Gallons-water'.
The last topic of the week was over the brute-force algorithm design. Although the title of the algorithm may be off-putting, it guarantees correctness and provides a base solution before going into more advanced algorithms. In the end, the instructor provided a basic rundown on what a brute-force algorithm is through a sequential search example, which detailed a philosophy through checking each element one by one until the targeted index is found within the array. In the end, the brute-force algorithm is but a base to work off of, as using it as is would be inefficient.
Comments
Post a Comment