# Divide and Conquer Technique

Post date: Nov 5, 2013 6:13:10 AM

< Previous-Polynomial Vs.Exponential Running Time Next - Greedy Technique>

Divide and Conquer approach basically works on breaking the problem into sub problems that are similar to the original problem but smaller in size & simpler to solve. once divided sub problems are solved recursively and then combine solutions of sub problems to create a solution to original problem.

At each level of the recursion the divide and conquer approach follows three steps:

**Divide**: In this step whole problem is divided into several sub problems.**Conquer**: The sub problems are conquered by solving them recursively, only if they are small enough to be solved, otherwise step1 is executed.**Combine**: In this final step, the solution obtained by the sub problems are combined to create solution to the original problem.

Divide and conquer approach has several **advantages **as follows:

- Solving conceptually difficult problems, it just require to divide them into sub problems. for example: Tower of Hanoi
- Divide and Conquer approach helps in discovering efficient algorithms like Strassen's Algorithm for matrix multiplication.
- Divide and Conquer also adapts itself to execute in multiprocessor machines. There fore parallel execution of sub problems on different processors with shared memory helps in parallel execution if master problem, results in increased algorithm performance.

Following are the problems which has become very efficient with use of Divide and Conquer approach:

- Binary Search.
- Finding the Maximum and Minimum.
- Merge Sort.
- Quick Sort.
- Selection Sort.
- Strassen's Matrix multiplication.
- Convex Hull.

All above mentioned problems will be explained on other pages with concerned topics or you can click on provided link to directly read them.

< Previous-Polynomial Vs.Exponential Running Time Next - Greedy Technique>