--- title: Divide and Conquer created_date: 2024-10-22 updated_date: 2024-10-22 aliases: tags: --- # Divide and Conquer This is an algorithm design paradigm, where the main problem is split into sub problems, which then are split into further sub problems to be finally solved on a smaller level and if needed stitched back together to the overall solution. This recursive approach is often used in [[computer science]]. Mathematically, the algorithms are often proved to be true by [[mathematical induction]]. ## Example Algorithms - [[Sorting Algorithms]] such as quicksort or merge sort - Multiplying large numbers: [[Karatsuba Algorithm]] - Find the closest pair of points - Computing the discrete Fourier Transform ([[Fast Fourier Transform |FFT]]) It can also be used in [[Computer Vision]] by first defining interesting [[Region of Interests |ROI]]s and only running the heavy algorithm on the subpart of the image. ## Advantages - [[GPU]]s can be used to parallelize those subtasks and thus run the process much faster - simplification: the problems become simpler to solve - Algorithmic efficiency: reduce the [[big-O notation]] - Memory Access: If the problem is small enough one can use only the computer [[cache]] to solve the subproblem, which makes it way faster