DAA : Divide and Conquer approach

In divide and conquer approach, a problem is divided into smaller problems, then the smaller problems are solved independently, and finally the solutions of smaller problems are combined into a solution for the large problem.

Generally, divide-and-conquer algorithms have three parts −

Divide the problem into a number of sub-problems that are smaller instances of the same problem.

Conquer the sub-problems by solving them recursively. If they are small enough, solve the sub-problems as base cases.

Combine the solutions to the sub-problems into the solution for the original problem.

Pros and cons of Divide and Conquer Approach

Divide and conquer approach supports parallelism as sub-problems are independent. Hence, an algorithm, which is designed using this technique, can run on the multiprocessor system or in different machines simultaneously.

In this approach, most of the algorithms are designed using recursion, hence memory management is very high. For recursive function stack is used, where function state needs to be stored.

Examples: The specific computer algorithms are based on the Divide & Conquer approach:

  1. Maximum and Minimum Problem

  2. Binary Search

  3. Sorting (merge sort, quick sort)

  4. Tower of Hanoi.

  1. Introduction

  2. Asymptotic Notations

  3. Algorithm Design Techniques

  4. Recurrence Relation

  5. Divide and Conquer approach

© 2019 by Techy Bande Official.

Developed By : RK JAMERIA