Week 5
Week 5 Learning Journal: Advanced Algorithm Analysis and Graph Theory
During Week 5, my studies centered on the refinement of sorting techniques and the practical application of graph theory. A major focus was the Master Theorem, which provides a streamlined "cookbook" method for determining the asymptotic bounds of recurrence relations. Applying this to Divide and Conquer algorithms like Merge Sort and QuickSort helped me visualize how the number of subproblems (a) and the size of those subproblems (n/b) directly dictate the overall time complexity.
I also spent significant time on Decrease-and-Conquer algorithms. While Divide and Conquer breaks a problem into multiple subproblems, Decrease-and-Conquer reduces a problem to a single, smaller instance. A prime example I studied was Binary Search. Understanding its O(log n) efficiency is vital, but I also learned about its application in Topological Sorting.
I specifically focused on Kahn’s Algorithm, which uses a queue-based approach to order vertices in a Directed Acyclic Graph (DAG). By iteratively removing nodes with an in-degree of zero, the algorithm builds a linear ordering that respects all dependencies. This concept is incredibly practical for real-world scenarios like build systems or course prerequisite scheduling.
Finally, implementing these concepts in Java for Homework 4 taught me the importance of handling edge cases, such as empty trees or graphs with disconnected components. Balancing the theoretical efficiency of QuickSort with the practical stability of Merge Sort has given me a much more nuanced perspective on algorithm selection.
Comments
Post a Comment