[This page is auto-generated; please prefer to read the article’s PDF Form.]
Suppose for a given problem of size n, we know a way to divide it into two subproblems and combine their results. But we need to find out, in what sizes should the two subproblems be created so as to minimize the total work. For this, we will first need an estimation of how the work required by each subproblem relates to its size.
For a subproblem of size s (s ≥ 1), let f(s) denote an estimate of the amount of work required to solve it. Note that f(s) will depend upon how exactly we solve the subproblem. We can recursively solve it by dividing it into two subproblems of certain sizes (say, equal sizes), and find an estimate based on that. As we have found above, any D2C algorithm will involve at least some work which is linear in s. Sometimes, the nature of the problem can also help us relate problem size to the work required; for example, sorting by comparison requires at least Θ(slog2(s)) comparisons.
For this discussion, we only need to find out whether the estimated f(s) follows the below two properties or not (instead of finding the precise f(s)), for any positive integers s1 < s2:
Some simple examples of such function f are (c > 0 is a constant):
Copyright © 2021 Nitin Verma. All rights reserved.