Overlapping subproblems vs non overlapping -divide & conquer

  • Context: Undergrad 
  • Thread starter Thread starter lsepolis123f
  • Start date Start date
  • Tags Tags
    Overlapping
Click For Summary

Discussion Overview

The discussion revolves around the distinction between overlapping and non-overlapping subproblems in the context of dynamic programming and divide-and-conquer algorithms. Participants explore definitions, examples, and implications of these concepts within algorithmic paradigms.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • One participant introduces the concepts of overlapping and non-overlapping subproblems as foundational to dynamic programming and divide-and-conquer algorithms, respectively.
  • Another participant requests examples to clarify the differences between overlapping and non-overlapping subproblems.
  • A participant provides the Mergesort algorithm as an example of a divide-and-conquer algorithm, explaining its non-overlapping subproblems and presenting its recurrence relation.
  • The same participant mentions Dijkstra's algorithm as an example of dynamic programming, noting the complexity of understanding overlapping subproblems without prior knowledge of the method.
  • Some participants seek clarification on the meaning of overlapping subproblems, suggesting it involves the reuse of subproblems in recursive procedures.
  • Another participant reiterates that overlapping subproblems are reused multiple times, contrasting them with the separate nature of non-overlapping subproblems in divide-and-conquer algorithms.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the definitions and implications of overlapping versus non-overlapping subproblems. No consensus is reached on the nuances of these concepts, and multiple interpretations are present.

Contextual Notes

Some participants highlight the importance of optimal substructure in dynamic programming, while others focus on the structural differences in problem-solving approaches between the two paradigms. The discussion reflects differing levels of familiarity with the algorithms mentioned.

lsepolis123f
Messages
13
Reaction score
0
In dynamic programming vs divide-and-conquer
We have
overlapping subproblems vs non overlapping subproblems
How distinguished, in other words what means overlapping subproblems...?

Discrete Mathematics and Its Applications Seventh Edition Kenneth H. Rosen
Ch.8 Advanced Counting Techniques

"We will discuss two ways that recurrence relations play important roles in the study of algorithms. First, we will introduce an important algorithmic paradigm known as dynamic programming. Algorithms that follow this paradigm break down a problem into overlapping subproblems. The solution to the problem is then found from the solutions to the subproblems through the use of a recurrence relation. Second, we will study another important algorithmic paradigm, divide-and-conquer. Algorithms that follow this paradigm can be used to solve a problem by recursively breaking it into a fixed number of non overlapping subproblems until these problems can be solved directly.The complexity of such algorithms can be analyzed using a special type of recurrence relation. In this chapter we will discuss a variety of divide-and-conquer algorithms and analyze their complexity using recurrence relations."
 
Mathematics news on Phys.org
Can you provide an example of each - that seems the difference...
 
lsepolis123f said:
Can you provide an example of each - that seems the difference...

I'll give an answer in the context of Computer Science.

Think of the Mergesort algorithm for example. This is a divide-and-conquer algorithm. An outline of its steps is:

- Divide array into two halves.
- Recursively sort each half.
- Merge two halves to make sorted whole.

Its recurrence relation has two parts: ##T(n) \leq 0## if n = 1 or ##T(n)\leq T(\lceil{n/2}\rceil) + T(\lfloor{n/2}\rfloor) + n## otherwise,
where
T(n) = number of comparisons to mergesort an input of size n. Its solution in terms of Big - Oh notation is ##T(n) = O(n log_2{n})##.
Can you see that the subproblems, that this algorithm goes into, are non overlapping? In order to see this clearly, you have to follow the recursion on each half, till there are just two elements left - for each half, before merging takes charge.

Now, for dynamic programming, the key concept is optimal substructure. I would recommend to take a look into the Wikipedia page https://en.wikipedia.org/wiki/Dynamic_programming. A classic example in Computer Science, is Dijkstra's algorithm for the shortest path problem. It is a bit tricky to understand why the sub-problems are overlapping in this case, if you don't understand the method we proceed in dynamic programming first.

Now, all that said, Divide-and-Conquer and Dynamic Programming are mathematical methods, so they are used in pure mathematical problems as well. Dynamic programming in this context is a mathematical optimization method.
 
Last edited:
  • Like
Likes   Reactions: lsepolis123f
overlapping means pass from the same point sometime? or the one half part pass sometime from first half part?
 
lsepolis123f said:
overlapping means pass from the same point sometime? or the one half part pass sometime from first half part?

Let me clarify this more. When we say overlapping subproblems of a problem, we basically mean subproblems that are potentially reused several times or the recursive procedure we use - essentially algorithm, solves the same subproblem over and over instead of generating new subproblems. This is the case for dynamic programming and the subproblems solved during the course of a running algorithm in this method, are intimately related.

On the other hand, non - overlapping subproblems of a divide-and-conquer algorithm are separate (see my previous post for this).
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 86 ·
3
Replies
86
Views
24K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 16 ·
Replies
16
Views
3K