algorithmrecursiondivide-and-conquer

Difference between Divide and Conquer & Subtract and Conquer?


I have been reading about recursion and solving recurrence equations. Came across a term "subtract and conquer". How is it different from the "Divide and Conquer" technique?
Can I solve these kind of problems using the same techniques used for solving divide and conquer recurrence equations (like master theorem or recursion tree)?


Solution

  • "The master theorem applies to divide and conquer algorithms. Some algorithms lead to recurrences of the form T(n) = aT(n-b) + Θ(nd). These might be called "subtract and conquer" or "giant step, baby step" algorithms."

    Actually subtract differs from divide, that size of sub problem not divided, but subtracting, everything else is the similar.

    Check this link for more details http://www.eecis.udel.edu/~saunders/courses/621/11s/notes/notes/Master-theorem.html