3. Decrease and Conquer#
Decrease and conquer algorithms take the following approach:
Decrease or reduce the problem instance to smaller instance of the same problem.
Conquer the problem by solving smaller instance of the problem.
Extend solution of smaller instance to obtain solution to original problem .
Basic intuition of the decrease-and-conquer technique is based on exploiting the relationship between a solution to a given instance of a problem and a solution to its smaller instance. This approach is also known as incremental or inductive approach.
Decrease and Conquer algorithms contrasts with the Divide and Conquer approach in the scope of the problem reduction.
Decrease and Conquer |
Divide and Conquer |
---|---|
Problem is reduced to a smaller instances in a chain like manner, piecing off one element at a time |
Problem is reduced to two or more smaller instances in a tree like manner |
Decrease by a constant amout |
Decrease by a constant factor |
Example: Insertion, Selection Sort |
Example: Binary Search, Merge Sort |