algorithm-notes
  • Preface
  • Outline
    • Asymptotic-Analysis
    • Divide-and-Conquer (DnC)
      • Overview
      • Multiplication
      • DnC Strategy
      • Master Method
    • Randomization
      • Overview
      • Discrete Probability
      • Randomized Algorithms
      • Reservoir Sampling
    • Sorting
      • Overview
      • Selection Sort
      • Bubble Sort
      • Insertion Sort
      • Shell Sort
      • Merge Sort
      • Heap Sort
      • Quick Sort
      • Non-Comparison Sort
    • Graph Algorithms
      • Overview
      • Minimum Spanning Tree
      • Shortest Path
      • Topological Sort
    • Tree
      • Overview
      • Balanced Search Tree
        • AVL Tree
        • Red-Black Tree
        • B Tree
      • Heap
      • Disjoint Set
      • Threaded Binary Tree
      • Segment Tree
    • Searching
      • Overview
      • Binary Search
      • Graph Search
      • Hash Table
      • String Search
    • Dynamic Programming
      • Overview
      • Fibonacci Numbers
      • LCS problem
    • Greedy Algorithms
      • Overview
Powered by GitBook
On this page

Was this helpful?

  1. Outline

Divide-and-Conquer (DnC)

PreviousAsymptotic-AnalysisNextOverview

Last updated 6 years ago

Was this helpful?

Recursively, many algorithms try to call themselves multiple times for solving tightly relevant sub-problems.

The DnC paradigm takes the following steps:

  1. DIVIDE original problem into sub-problems

  2. CONQUER each sub-problem recursively

  3. (*) COMBINE solutions for sub-problem into one for the original problem

    Note: some problems don't have combination phase; for instance, BinarySearch will search for specified element in either the left (n /2) or the right (n /2) of an array and return that element if found.

Table of Contents

  • - chapter about integer multiplication, matrix multiplication and polynomial multiplication.

  • - a generalized form of mathematical interpretation is given for DnC problems.

  • - several different strategies for various problems will be covered.

Multiplication
Master Method
DnC Strategy