Decrease and Conquer
Decrease and Conquer
• 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.
• Bottom up usually implemented iteratively, starting with a solution to the smallest instance of the problem.
Decrease by a constant Decrease by a constant Variable size decrease
factor
• The size of the instance is reduced by the same constant on each iteration of the algorithm
• Bottom up usually implemented iteratively, starting with a solution to the smallest instance of the problem.
DEFINITION
DECREASE BY A CONSTANT FACTOR
• This technique suggests reducing a problem instance by the same constant factor on each iteration of the algorithm.
• Algorithm
• //Input: An array A[0..n-1] of n orderable elements
• //Output: Array A[0..n-1] sorted in nondecreasing order
• For I = 1 to n – 1 do
DIGITAL COMMUNICATIONS
Cloud
Local
Hybrid
THANK YOU
[email protected]