Overlapping subproblem

Overlapping subproblem

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.

For example, the problem of computing the Fibonacci sequence exhibits overlapping subproblems. The problem of computing the n-th 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.

ee also

*Dynamic programming


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Overlapping subproblems — 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 …   Wikipedia

  • Maximum subarray problem — In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one dimensional array of numbers (containing at least one positive number) which has the largest sum. For example, for the sequence of… …   Wikipedia

  • Dynamic programming — For the programming paradigm, see Dynamic programming language. In mathematics and computer science, dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems. It is applicable to problems… …   Wikipedia

  • Divide and conquer algorithm — In computer science, divide and conquer (D C) is an important algorithm design paradigm based on multi branched recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more sub problems of the same (or… …   Wikipedia

  • Longest common subsequence problem — Not to be confused with longest common substring problem. The longest common subsequence (LCS) problem is to find the longest subsequence common to all sequences in a set of sequences (often just two). Note that subsequence is different from a… …   Wikipedia

  • Algorithm — Flow chart of an algorithm (Euclid s algorithm) for calculating the greatest common divisor (g.c.d.) of two numbers a and b in locations named A and B. The algorithm proceeds by successive subtractions in two loops: IF the test B ≤ A yields yes… …   Wikipedia

  • Problem Frames Approach — Problem Analysis or the Problem Frames Approach is an approach to software requirements analysis. It was developed by British software consultant Michael A. Jackson. The Problem Frames Approach was first sketched by Jackson in his book Software… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”