GOVERNMENT COLLEGE OF
ENGINEERING AND TEXTILE
Divide And Conquer Approach With
Presented By Muktarul Hoque
Guided by By Mr. Biplab Mahapatra
State Aided College Teacher, IT Department
I would like to express my special thanks of gratitude to Mr.
Biplab Mahapatra who gave me the golden opportunity to do
the illustration on the topic Divide And Conquer Approach, which
also helped me in doing a lot of research and I would come
to know about so many new things. Without the assistance of
our revered professors my presentation would not have
Introduction: Divide and Conquer Approach
Divide and Conquer is an algorithmic pattern. In
algorithmic methods, the design is to take a dispute
on a huge input, break the input into minor pieces,
decide the problem on each of the small pieces,
and then merge the piecewise solutions into a
global solution. This mechanism of solving the
problem is called the Divide & Conquer Strategy.
A typical Divide and Conquer algorithm solves a problem using the following three
1.Divide: Break the given problem into subproblems of same type. This step involves
breaking the problem into smaller sub-problems. Sub-problems should represent a
part of the original problem. This step generally takes a recursive approach to divide
the problem until no sub-problem is further divisible. At this stage, sub-problems
become atomic in nature but still represent some part of the actual problem.
2.Conquer: Recursively solve these sub-problems. This step receives a lot of smaller
sub-problems to be solved. Generally, at this level, the problems are considered
'solved' on their own.
3.Combine: Appropriately combine the answers. When the smaller sub-problems are
solved, this stage recursively combines them until they formulate a solution of the
original problem. This algorithmic approach works recursively and conquer & merge
steps works so close that they appear as one.
• Let us understand this concept with the help of an example.
• 1.Let the given array be:
Array for merge sort
2.Divide the array into two halves.
Divide the array into two subparts
Again, divide each subpart recursively into two halves until you get
Divide the array into smaller subparts
3. Now, combine the individual elements in a sorted manner.
Here, conquer and combine steps go side by side.
Combine the subparts
divide P into P1 P2 P3 .....Pk
Solving difficult problems: It is a powerful method for solving
difficult problems. Dividing the problem into subproblems so that
subproblems can be combined again is a major difficulty in
designing a new algorithm. For many such problem this algorithm
provides a simple solution.
Parallelism: Since it allows us to solve the subprblems
independently, this allows for execution in multi-processor
machines, especially shared-memory systems where the
communication of data between processors does not need to be
planned in advance, because different subproblems can be
executed on different processors.
Memory access: It naturally tend to make efficient use of memory
caches. This is because once a subproblem is small, all its
subproblems can be solved within the cache, without accessing
the slower main memory.
One disadvantage of this approach is that recursion is slow. This is beacause
of the overhead of the repeated subproblem calls. Also the algorithm need
stack for storing the calls. Actually this depends upon the implementation
style. With large enough recursive base cases , the overhead of recursion can
become negligible for many problems.
Divide and Conquer is a recursive problem-
solving approach which break a problem into
smaller subproblems, recursively solve the
subproblems, and finally combines the
solutions to the subproblems to solve the
original problem. This method usually allows
us to reduce the time complexity to a large
Parece que tiene un bloqueador de anuncios ejecutándose. Poniendo SlideShare en la lista blanca de su bloqueador de anuncios, está apoyando a nuestra comunidad de creadores de contenidos.
¿Odia los anuncios?
Hemos actualizado nuestra política de privacidad.
Hemos actualizado su política de privacidad para cumplir con las cambiantes normativas de privacidad internacionales y para ofrecerle información sobre las limitadas formas en las que utilizamos sus datos.
Puede leer los detalles a continuación. Al aceptar, usted acepta la política de privacidad actualizada.