Divide
& Conquer is a general algorithm design strategy with a general plan as
follows:
(i)
DIVIDE:
A problem’s instance is divided into several smaller instances of the same
problem, ideally of about the same size.
(ii)
RECUR:
Solve the sub-problem recursively.
(iii)
CONQUER: If
necessary, the solutions obtained for the smaller instances are combined to get
a solution to the original instance.
Diagram
1 shows the general divide & conquer plan
Figure: Diagram 1.
Advantages
of Divide & Conquer technique:
(i)
For
solving conceptually difficult problems like Tower of Hanoi, divide &
conquer is a powerful tool.
(ii)
Results
in efficient algorithms.
(iii)
Results
in algorithms that use memory cache efficiently.
No comments:
Post a Comment