Undergrad Overlapping subproblems vs non overlapping -divide & conquer

  • Thread starter Thread starter lsepolis123f
  • Start date Start date
  • Tags Tags
    Overlapping
Click For Summary
Overlapping subproblems in dynamic programming refer to subproblems that are reused multiple times during the algorithm's execution, leading to potential inefficiencies if solved repeatedly. In contrast, divide-and-conquer algorithms, such as Mergesort, break problems into non-overlapping subproblems that are solved independently before combining their results. The complexity of divide-and-conquer algorithms can be analyzed using recurrence relations, while dynamic programming relies on optimal substructure and memoization to improve efficiency. An example of a dynamic programming algorithm is Dijkstra's algorithm for finding the shortest path, which illustrates the overlapping nature of its subproblems. Understanding these distinctions is crucial for selecting the appropriate algorithmic approach for different types of problems.
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 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).
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 86 ·
3
Replies
86
Views
23K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
Replies
29
Views
5K