0% found this document useful (0 votes)
37 views10 pages

Divide and Conquer

This document discusses the divide and conquer algorithm design paradigm. It begins by defining divide and conquer as recursively breaking down a problem into identical or related sub-problems, solving those sub-problems, and then combining the solutions to solve the original problem. Next, it outlines the key steps of divide, conquer, and combine. Examples of divide and conquer algorithms include binary search, merge sort, quick sort, and matrix multiplication. Advantages are that divide and conquer can solve problems more efficiently than naive approaches and is suitable for parallel processing. Merge sort is then discussed as a specific divide and conquer algorithm that works by dividing an array, sorting subarrays, and merging the sorted subarrays.

Uploaded by

shashwat.ch2015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views10 pages

Divide and Conquer

This document discusses the divide and conquer algorithm design paradigm. It begins by defining divide and conquer as recursively breaking down a problem into identical or related sub-problems, solving those sub-problems, and then combining the solutions to solve the original problem. Next, it outlines the key steps of divide, conquer, and combine. Examples of divide and conquer algorithms include binary search, merge sort, quick sort, and matrix multiplication. Advantages are that divide and conquer can solve problems more efficiently than naive approaches and is suitable for parallel processing. Merge sort is then discussed as a specific divide and conquer algorithm that works by dividing an array, sorting subarrays, and merging the sorted subarrays.

Uploaded by

shashwat.ch2015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

ANALYSIS AND DESIGN OF ALGORITHM

By – S h a s hwat c h o u d h a r y

(RA2011003020466)
DIVIDE AND
CONQUER
L E T ’ S D I V E I N

2
What is Divide and conquer
algorithm?
Divide and conquer is an algorithm design paradigm. A divide-and-
conquer algorithm recursively breaks down a problem into two or
more sub-problems of the same or related type, until these become
simple enough to be solved directly. The solutions to the sub-
problems are then combined to give a solution to the original
problem.

3
How Divide and Conquer
Algorithms Work?
Here are the steps involved:

• Divide: Divide the given problem into sub-problems using


recursion.
• Conquer: Solve the smaller sub-problems recursively. If the
subproblem is small enough, then solve it directly.
• Combine: Combine the solutions of the sub-problems that are
part of the recursive process to solve the actual problem.
4
5
Applications of Divide and
Conquer
1. Binary Search
2. Merge Sort
3. Quick Sort
4. Strassen's Matrix multiplication
5. Karatsuba Algorithm

6
Advantages of Divide and Conquer
Algorithm
• The complexity for the multiplication of two matrices using the
naive method is O(n3), whereas using the divide and conquer
approach (i.e. Strassen's matrix multiplication) is O(n2.8074). This
approach also simplifies other problems, such as the Tower of
Hanoi.
• This approach is suitable for multiprocessing systems.
• It makes efficient use of memory caches.
7
Merge Sort
Merge sort is a sorting algorithm that works by dividing an array into
smaller subarrays, sorting each subarray, and then merging the sorted
subarrays back together to form the final sorted array.

In simple terms, we can say that the process of merge sort is to divide
the array into two halves, sort each half, and then merge the sorted
halves back together. This process is repeated until the entire array is
sorted

8
9
THANK YOU

You might also like