Posts

Showing posts from January, 2025

CST 370 - Design and Analysis of Algorithms - Week 3

Image
  This week in CST370, we focused on understanding various brute force and exhaustive search algorithms, such as string matching, depth-first search and breadth-first search. I learned that brute force is a straightforward approach to solving problems by directly applying the problem's definition. For instance, selection sort and bubble sort are classic examples of brute force algorithms where elements are compared and swapped until the array is sorted. The brute force string matching algorithm was particularly insightful, as it involves searching for a pattern in a given text through character by character comparisons. We also learned about its efficiency in terms of best case and worst case scenarios, noting that its average case efficiency is linear, Θ(n). This helped me understand the importance of time complexity when analyzing algorithms and how different cases affect performance. In addition to brute force algorithms, we learned about exhaustive search approaches, such as th...

CST 370 - Design and Analysis of Algorithms - Week 2

Image
  This week in CST-370, we learned more about algorithm analysis and how to determine the efficiency of algorithms using asymptotic notations such as Big O, Theta, and Omega. These notations help categorize an algorithm's growth rate based on its input size, which is important for understanding its performance under different conditions. We reviewed more about the importance of identifying the basic operation within an algorithm and counting how many times it executes to estimate its time complexity. The professor's explanations helped clarify concepts that were more challenging to understand from the textbook, particularly simplifying time complexity expressions using standard rules. We also focused on learning the differences between analyzing recursive and non-recursive algorithms, with recursive algorithms often requiring recurrence relations and substitution methods for accurate analysis. Additionally, we relearned about the brute force approach, which is a straightforward...

CST 370 - Design and Analysis of Algorithms - Week 1

Image
  This week in CST 370, I gained a foundational understanding of algorithms and their importance in solving computational problems efficiently. I learned that an algorithm is a sequence of clear and finite instructions designed to solve a problem for any valid input. Euclid's algorithm for calculating the greatest common divisor (GCD) stood out as an excellent example of how simple steps can lead to powerful solutions. Also, I learned about alternative methods for GCD calculation, such as the Consecutive Integer Checking Algorithm and the Middle-School Procedure, which showed different approaches to solving the same problem. These methods helped me understand the complexity of algorithm design and how problem solving can be approached from multiple perspectives. I also learned more about data structures and algorithm analysis, which are crucial for evaluating the efficiency of solutions. Understanding the principles of sorting and searching was important in order to understand algo...