ArticleslgStudy

science

Overlapping subproblems

Overlapping subproblems is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Overlapping subproblems rather than just read about it. In short: In computer science, a problem is said to have overlapping subproblems if the problem can be broken down into subproblems which are reused several times or a recursive algorithm for the problem solves the same subproblem over and over rather than always generating new subproblems. For example, the problem of computing the Fibonacci sequence exhibits overlapping subproblems.

Key takeaways

  • Overlapping subproblems belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Overlapping subproblems to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Overlapping subproblems from memory before moving on to harder problems.

Reference excerpt

In computer science, a problem is said to have overlapping subproblems if the problem can be broken down into subproblems which are reused several times or a recursive algorithm for the problem solves the same subproblem over and over rather than always generating new subproblems.

For example, the problem of computing the Fibonacci sequence exhibits overlapping subproblems. The problem of computing the nth Fibonacci number F(n), can be broken down into the subproblems of computing F(n − 1) and F(n − 2), and then adding the two. The subproblem of computing F(n − 1) can itself be broken down into a subproblem that involves computing F(n − 2). Therefore, the computation of F(n − 2) is reused, and the Fibonacci sequence thus exhibits overlapping subproblems. A naive recursive approach to such a problem generally fails due to an exponential complexity. If the problem also shares an optimal substructure property, dynamic programming is a good way to work it out.

Fibonacci sequence example In the following two implementations for calculating fibonacci sequence, fibonacci uses regular recursion and fibonacci_mem uses memoization. fibonacci_mem is much more efficient as the value for any particular n is computed only once.

When executed, the fibonacci function computes the value of some of the numbers in the sequence many times over, whereas fibonacci_mem reuses the value of n which was computed previously:

The difference in performance may appear minimal with an n value of 5; however, as n increases, the computational complexity of the original fibonacci function grows exponentially. In contrast, the fibonacci_mem version exhibits a more linear increase in complexity.

See also Dynamic programming

References

Worked examples

Example 1 — a first encounter with Overlapping subproblems

Start with the simplest possible case. Write down what Overlapping subproblems claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Overlapping subproblems before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Overlapping subproblems ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Overlapping subproblems

In research
Overlapping subproblems appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Overlapping subproblems in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Overlapping subproblems is common in secondary-school and first-year university syllabi. It links to neighbouring topics Dynamic programming, so understanding it makes those chapters shorter.
In everyday life
Look for Overlapping subproblems outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Overlapping subproblems in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Overlapping subproblems means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Overlapping subproblems out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Overlapping subproblems in simple terms?

In computer science, a problem is said to have overlapping subproblems if the problem can be broken down into subproblems which are reused several times or a recursive algorithm for the problem solves the same subproblem over and over rather than always generating new subproblems. For example, the…

Why does Overlapping subproblems matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Overlapping subproblems?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Overlapping subproblems.

Tags

  • Dynamic programming

Keep exploring