Abstract—This paper suggests an embedded analysis method to estimate the complexities of problems. It is generally difficult to estimate tight lower bounds for many problems and algorithms. Traditionally, lower bounds are obtained either by reduction or by a direct analysis. In this paper, a new idea is presented for estimating the lower bounds of problems and algorithms. In conjunction with two algorithm design paradigms divide and conquer and incremental construction, we can derive good lower bounds from the lower bounds of the corresponding sub-problems.
Index Terms—algorithm, computational complexity, lower bounds
I. INTRODUCTION
he lower bounds of problems are generally obtained by the following two ways:
(1) By means of a direct argument on the height of the computation/decision tree[1];
(2) By means of transformations of the problem [1, 5]. In this paper, a new train of thought is introduced.
Suppose we want to estimate the lower bound of problem
Q
. We may first find another problemP
such that problemQ
is contained in problemP
as its sub-problem when we solve problemP
by a certain algorithm. If problemP
exists, the lower bound of problemQ
may be obtained by taking advantage of the relation betweenQ
andP
if the lower bound of problemP
is known so far or it is easier to estimate.We shall show the power of the technique to analyze the lower bound of a problem in this manner later. We are interested in the asymptotic analysis, i.e., the behavior of the algorithm as the input size approaches infinity. Since expected case analysis is usually harder to tackle, and moreover the probabilistic assumption is sometimes difficult to justify, our emphasis will only be placed on the worst case analysis.
Manuscript received January 10, 2011. This work was supported in part by the Natural Science Foundation of Fujian under Grant No.2009J01295 and the Haixi Project of Fujian under Grant No.A099.
Xiaodong Wang is with College of Mathematics & Computer Science, Quanzhou Normal University, Quanzhou 362000, China (phone: +86-595-22916878; fax: +86-595-22916879; e-mail: wangxiaodong@ qztc.edu.cn).
Weibin Wu and Daxin Zhu are with College of Mathematics & Computer Science, Quanzhou Normal University, Quanzhou 362000, China (e-mail: [email protected]).
In the following 4 sections we describe our new ideas on obtaining the lower bounds of problems.
In section 2 we describe the notation and definitions necessary for following discussions. In section 3 we provide a novel idea for embedding analysis with divide-and-conquer algorithm design paradigm. In section 4 another idea for estimating the lower bounds of problems in conjunction with algorithm design paradigm incremental construction is presented. Finally some concluding remarks are in section 5.
II. NOTATION AND DEFINITIONS
Let
A
(
P
)
represent the set of all the algorithms for solving the problemP
. IfA
∈
A
(
P
)
and the size of the problemP
isn
, the corresponding ADT (Algebraic Decision Tree)or ACT (Algebraic Computation Tree) is denoted by
)
(
n
PAT
and the height ofPAT
(
n
)
denoted by))
(
(
PAT
n
H
.Definition 2.1 For any
A
∈
A
(
P
)
, if there exists a real functionf
P(
n
)
such thatH
(
PAT
(
n
))
=
Ω
(
f
P(
n
))
, thenf
P(
n
)
is said to be an asymptotic lower bound of the problemP
[1].Definition 2.2 If
f
P(
n
)
is an asymptotic lower bound of the problemP
and there existsA
∈
A
(
P
)
such that))
(
(
))
(
(
PAT
n
O
f
n
H
=
P , thenA
is said to be anasymptotically optimal algorithm to solve the problem
P
andf
P(
n
)
is called the asymptotic infimum ofP
[1].Definition 2.3 If there exist a real function
f
P(
n
)
and positive constantsc
andn
0 independent ofA
∈
A
(
P
)
such that for anyA
∈
A
(
P
)
,H
(
PAT
(
n
))
≥
cf
P(
n
)
, whenn
≥
n
0, thenf
P(
n
)
is called a strong asymptotic lower bound ofP
[1].Proposition 2.4 If problem
P
has a strong asymptotic infimum then it has an asymptotic infimum too, and the strong asymptotic infimum ofP
is the asymptotic infimum ofP
. Any strong asymptotically optimal algorithm to solve problemP
is also asymptotically optimal[1].Definition 2.5 For a problem of size
n
, we can partition the problem intoa
sub-problems, each of sizen
/
b
(
a
≥
b
>
1
), and recursively solve each sub-problem andAn Embedded Analysis Method for
Complexities of Problems
Xiaodong Wang, Weibin Wu, and Daxin Zhu
then combine the solutions of the
a
sub-problems to obtain the solution of the original problem. This type of problem solving techniques is called a(
a
,
b
)
divide-and-conquer algorithm or an(
a
,
b
)
-DAC for short.In divide-and-conquer algorithms, the proto typical recurrence has the form
)
(
)
/
(
)
(
n
aT
n
b
d
n
T
=
+
(1.1)where
a
>
0
andb
>
1
are arbitrary real numbers, and1
)
(
n
≥
d
is the driving function. Examples include the case2
=
=
b
a
,d
(
n
)
=
n
(Mergesort [7]), anda
=
7
,2
=
b
,d
(
n
)
=
n
2 (Strassen’s matrix multiplication [1]). In the spirit of improving Strassen’s algorithm, many similar recurrences have appeared in matrix multiplication, e.g.,143640
=
a
,b
=
70
,d
(
n
)
=
n
2 in an algorithm of Pan[8].
Recurrences arise naturally in computer science from the analysis of algorithms, combinatorial analysis. Techniques for solving recurrences are among the standard repertoire of algorithmic textbooks (e.g., [4, 6, 8]).
In an influential note, Bentley, Haken and Saxe proved a master theorem for the divide-and-conquer algorithms [3]
under a fairly general hypothesis on
d
(
n
)
. The master recurrence can be generalized to)
(
)
/
(
)
(
1
n
d
b
n
T
a
n
T
k
i
i
i
+
=
∑
=
(1.2)
Wang and Fu [11, Theorem 3.5] gave an integral bound on solutions to a parametric form of (1.1) in which the constants
b
a
,
are now functions ofn
. Roura [9] and Verma [10]provide the general theorems for the multi-term recurrences (1.2).
The ideas of the above techniques for solving master recurrences will be useful in the following discussion.
III. EMBEDDED ANALYSIS WITH DIVIDE-AND-CONQUER
Let problem
Q
be the merge step problem of the problemP
if(
a
,
b
)
-DAC algorithm is employed to solve problemP
. For convenience, suppose a unit time is needed for solving problemP
of size 1. IfT
P(
n
)
denotes the total time spent by the(
a
,
b
)
-DAC algorithm in solving problemP
of sizen
andM
Q(
n
)
denotes the time spent in solving problemQ
of sizen
, thenT
P(
n
)
satisfies the following recursive equation:
>
+
=
=
1
)
(
)
/
(
1
1
)
(
n
n
M
b
n
aT
n
n
T
Q p
P (3.1)
Without loss of generality, let k
b
n
=
, thenk
=
log
bn
. Since(
/
)
=
P(
1
)
=
1
k
P
n
b
T
T
, we can easily derive fromrecursive equation (3.1) that
T
(
n
)
, the total time spent bythe
(
a
,
b
)
-DAC algorithm is
+
=
∑
=
i k
i
i Q k
P
n
a
M
b
a
T
(
)
1
(
)
/
1
(3.2)
Let
f
P(
n
)
be an asymptotic lower bound ofP
. Without loss of generality, assume that∞
↑
)
(
n
f
P whenn
↑
∞
(3.3) Setk
=
log
bn
,a P
k k P P
b
n
n
f
a
b
f
k
g
(
)
=
(
)
/
=
(
)
/
log andlim
sup
g
P(
k
)
=
α
, thenα
may be one of the following three cases:(1)
α
=
0
, (2)0
<
α
<
+∞
, (3)α
=
+∞
.Now let us examine the efficiency of the
(
a
,
b
)
-DACalgorithm for solving problem
P
in the three cases respectively.A. The results with
α
=
0
When
lim
sup
(
)
=
0
+∞
→
g
Pk
k , k
lim
→+∞g
P(
k
)
=
0
due to0
)
(
k
≥
g
P .Theorem 3.1 Let
lim
(
)
/
log=
0
∞ →
a P
n
b
n
n
f
,then))
(
(
)
(
n
o
T
n
f
P=
P .Proof. It follows from (3.2) that
0
)
(
/
)
(
)
(
)
(
)
(
0
log0
→
≤
=
<
∑
=
a P k
i
i i Q k
P
P P
b
n
n
f
b
a
M
a
n
f
n
T
n
f
When
n
→
∞
.Thus
lim
(
)
/
(
)
=
0
∞
→
f
Pn
T
Pn
n .
That is
f
P(
n
)
=
o
(
T
P(
n
))
.■Theorem 3.1 indicates that if
α
=
0
then any(
a
,
b
)
-DACalgorithm to solve problem
P
cannot reach the order of)
(
n
f
P . Therefore, iff
P(
n
)
is the asymptotic infimum of the problemP
, then any(
a
,
b
)
-DAC algorithm to solve theproblem
P
is not optimal.B. The results with
0
<
α
<
+∞
Theorem 3.2 Let
=
<
+∞
∞
→
α
a P
n
b
n
n
f
(
)
/
logsup
lim
, then))
(
(
)
(
n
f
n
T
P=
Ω
P .Proof. From
=
<
+∞
∞
→
α
a P
n
b
n
n
f
(
)
/
logsup
lim
, we knowthat for a given
ε
,0
<
ε
<
α
,α
ε
α
2
/
)
(
log a≤
+
<
Pb
n
n
f
, whenn
is sufficiently)
(
)
(
/
)
(
)
(
)
(
log0
n
f
n
n
f
b
a
M
a
n
f
n
T
P a
P k
i
i i Q k
P P
b
≥
=
∑
=Therefore,
0
2
1
)
(
)
(
=
>
α
n
f
n
T
P
P when
n
is sufficiently large. This meansT
P(
n
)
=
Ω
(
f
P(
n
))
.■Theorem 3.2 indicates that
f
P(
n
)
is an asymptotic lower bound of the(
a
,
b
)
-DAC algorithm if0
<
α
<
+∞
.In other words, we can know nothing about the lower bound of the problem
Q
from the lower bound of the problemP
if)
(
n
f
P is an asymptotic lower bound ofP
.C. The results with
α
=
+∞
In order to obtain meaningful results we make a further assumption herein that
for
a
≥
b
>
1
, there exists an integern
0 such that0
)
/
(
)
(
)
(
n
=
f
n
−
af
n
b
>
d
P P P (3.4)where
n
≥
n
0. In this case we havea P P
k k P k P P
P b
n
b
n
af
n
f
a
b
af
b
f
k
g
k
g
log1
)
(
)
(
/
)
(
)
(
)
1
(
)
(
−
−
=
−
−=
−
Therefore
lim
sup
g
(
k
)
lim
g
P(
k
)
kP
k→+∞
=
→+∞=
=
∞
+
α
.Theorem 3.3 Let
f
P(
n
)
be an asymptotic lower bound of the problemP
and0
)
(
n
>
d
P ,=
+∞
∞ →
a P
n
b
n
n
f
(
)
/
loglim
,then
d
P(
n
)
is an asymptotic lower bound of the problemQ
, i.e.,M
Q(
n
)
=
Ω
(
d
P(
n
))
.Proof. Suppose there is an algorithm
B
to solve problemQ
such that
M
Q(
n
)
=
o
(
d
P(
n
))
.)
(
n
T
P , the computing time required by the(
a
,
b
)
-DACalgorithm employing algorithm
B
, is given by (3.2). Thus,) (
/ ) (
) (
) (
0 0
n f
b a M a
n f
n T
P k
i
i i Q k
P
P =
∑
=<
k k k
k P k
i
i i Q k
Y X a
b f
b a M a
= =
∑
=/ ) (
/ ) ( 0
Since k k
Q k
k
k
X
X
M
b
a
X
=
−
1=
(
)
/
∆
−a P P
k k P k P k k
k b
n
b
n
af
n
f
a
b
af
b
f
Y
Y
Y
log1
1
=
(
)
−
(
)
=
(
)
−
(
/
)
−
=
∆
− −it follows from
d
P(
n
)
>
0
that∆
Y
k>
0
whenk
is sufficiently large.It follows from the assumption
=
+∞
∞ →
a P
n
b
n
n
f
(
)
/
loglim
that
Y
k→
+∞
whenk
→
+∞
. By Stolz's theorem [2] we conclude thatk k k k k
k→∞
X
/
Y
=
lim
→∞∆
X
/
∆
Y
lim
0
)
(
)
(
lim
)
(
)
(
)
(
lim
1=
=
−
=
∞ → − ∞
→
d
n
n
M
b
af
b
f
b
M
P Q
n k P k P
k Q
k .
Therefore,
0
)
(
)
(
lim
=
∞
→
f
n
n
T
P P
n .
That means
T
P(
n
)
=
o
(
f
P(
n
))
.This contradicts the fact that
f
P(
n
)
is an asymptotic lowerbound of the problem
P
.Thus, for any algorithm to solve the problem
Q
we always haveM
Q(
n
)
=
Ω
(
d
P(
n
))
, i.e.,d
P(
n
)
is an asymptotic lower bound ofQ
. ■Theorem 3.4 Under the assumption of Theorem 3.3, for a
given
(
a
,
b
)
-DAC algorithm to solve the problemP
, if))
(
(
)
(
n
O
d
n
M
Q=
P , then(1) in the
(
a
,
b
)
-DAC algorithm, the algorithm to solve theproblem
Q
is asymptotically optimal andd
P(
n
)
is the asymptotic infimum of the problemQ
.(2) the
(
a
,
b
)
-DAC algorithm is asymptotically optimal and)
(
n
f
P is the asymptotic infimum of the problemP
.Proof. Conclusion (1) follows from Theorem 3.3
immediately. So, only conclusion (2) remains to be proved. From
M
Q(
n
)
=
O
(
d
P(
n
))
we know that there exist positive constantsc
>
0
andn
0>
0
such that)
(
)
(
n
cd
n
M
Q≤
P whenn
≥
n
0. Seti
0=
log
bn
0
+
1
, thenb
n
0i
≥
when
i
≥
i
0.Thus
(
)
(
i)
P i
Q
b
cd
b
M
≤
wheni
≥
i
0.Consequently, when
k
≥
i
0,i k
i i
i Q i
i
i
i Q i
k
i
i
Q
b
a
M
b
a
M
b
a
M
(
)
/
(
)
/
(
)
/
0 0 1
0
0
∑
∑
∑
= −
= =
+
=
i k
i i
i
P
b
a
d
c
c
(
)
/
0
1
∑
=
∑
= −
−
−
+
=
ki i
i i P i
i P
a
b
f
a
b
f
c
c
0
1 1
1
(
)
(
)
−
+
=
1 −1−10 0
)
(
)
(
i i P k
k P
a
b
f
a
b
f
c
c
k k
P
b
a
cf
c
2+
(
)
/
≤
It follows from (3.2) that when
n
≥
n
0,)
(
)
/
)
(
(
)
(
log2
2
cf
b
a
c
n
cf
n
c
a
n
T
P≤
k+
P k k=
ba+
P .Noticing
n
logo
(
f
P(
n
))
ab
=
, we have
T
P(
n
)
=
O
(
f
P(
n
))
.Therefore, the
(
a
,
b
)
-DAC algorithm is asymptoticallyoptimal and
f
P(
n
)
is the asymptotic infimum of the problemP
.■Especially, given
a
≥
b
>
1
,β
≥
log
ba
andγ
≥
1
, we have the following corollary.Corollary 3.5 Let
n
βlog
γn
be an asymptotic lower bound of the problemP
and the problemQ
be the merge step problem of the(
a
,
b
)
-DAC algorithm to solve the problemP
, then(1)
h
(
n
)
is an asymptotic lower bound of problemQ
; (2) the algorithm to solve problemQ
inO
(
h
(
n
))
time is asymptotically optimal.In this situation,
h
(
n
)
is the asymptotic infimum ofQ
;n
n
βlog
γ is the asymptotic infimum ofP
and the corresponding(
a
,
b
)
-DAC algorithm to solve the problemP
is asymptotically optimal, where
=
<
=
ββ γγ− ββb
a
n
n
b
a
n
n
n
h
1log
log
)
(
Proof. Taking
f
P(
n
)
=
n
βlog
γn
in Theorem 3.3 and Theorem 3.4 one can see immediately thatf
P(
n
)
↑
+∞
and
=
−=
+∞
∞ → ∞
→
f
n
n
n
n
a
n a P
n
b
b
lim
βlog
γ/
)
(
lim
log log .)
/
(
)
(
)
(
n
f
n
af
n
b
d
P=
P−
P)
/
(
log
)
/
(
log
n
a
n
b
n
b
n
β γ−
β γ=
)
log
(
log
log
log
1
n
1n
o
n
1n
b
b
a
n
n
b
a
− −+
−
−
=
β γ β γβ γ γ β β
Thus,
d
P(
n
)
>
0
whenn
is sufficiently large. This yields that all of the conditions of Theorem 3.4 and Theorem 3.5 are satisfied. Noticingd
P(
n
)
=
Θ
(
h
(
n
))
, we finish the proof from Theorem 3.3 and Theorem 3.4.It is a more special case when
β
=
1
andγ
=
1
in Corollary 3.5.In this case
a
=
b
.Corollary 3.6 Let
n
log
n
be an asymptotic lower bound of problem P and the problemQ
be the merge step problem of the(
a
,
b
)
-DAC algorithm to solve the problemP
, then (1)n
is an asymptotic lower bound of problemQ
; (2) the algorithm to solve the problemQ
inO
(
n
)
time is asymptotically optimal.In this situation, the corresponding
(
a
,
b
)
-DAC algorithmto solve the problem
P
is asymptotically optimal;n
is the asymptotic infimum ofQ
andn
log
n
is the asymptotic infimum ofP
.IV. THE INCREMENTAL CONSTRUCTION
Now let us consider another type of algorithm, the so-called incremental construction. The main idea of the algorithm of this type is that the solution is constructed or computed in an iterative manner. For a problem
P
(
n
)
with sizen
, the solution ofP
(
1
)
is constructed first, and then the solution of)
1
(
i
+
P
is recursively constructed from the solution of)
(
i
P
,i
=
1
,
2
,
L
,
n
−
1
.Let the problem
Q
(
n
)
connected with the problemP
(
n
)
be the iterative computation ofP
(
n
)
. LetR
Q(
n
)
be the time spent in solving the problemQ
(
n
)
andT
P(
n
)
be the time spent in solving the problemP
(
n
)
by thecorresponding incremental algorithm, then
T
P(
n
)
satisfies the following equation:∑
−=
=
11
)
(
)
(
ni Q
P
n
R
i
T
For this type of algorithm construction we have the following results.
Theorem 4.1 Let
f
P(
n
)
be an asymptotic lower bound of)
(
n
P
andf
P(
x
)
be a continued differentiable function on)
,
0
(
+∞
, andf
'
P(
x
)
↑
+∞
whenx
↑
+∞
, then)
(
'
n
f
P is an asymptotic lower bound ofQ
(
n
)
.Proof. It is easily seen from Lagrange's mid-value theorem
and the properties of
f
P(
x
)
that)
(
'
)
(
)
1
(
)
1
(
'
x
f
x
f
x
f
x
f
P+
>
P+
−
P>
P (4.1))
1
(
)
(
)
(
'
)
(
)
1
(
x
+
−
f
x
>
f
x
>
f
x
−
f
x
−
f
P P P P P (4.2)
If there is an algorithm to solve the problem
Q
(
n
)
such that))
(
'
(
)
(
n
o
f
n
R
Q=
P , the corresponding incremental construction algorithm to solve the problemP
(
n
)
will spend a computing time of∑
−=
=
11
)
(
)
(
ni Q
P
n
R
i
T
.Thus,
n n
P n
i Q
P P
Y X n f
i R
n f
n
T = =
≤
∑
−
=
) (
) ( )
( ) ( 0
1
1
)
1
(
1
=
−
−
=
∆
X
nX
nX
n−R
Qn
)
1
(
'
)
1
(
)
(
−
−
>
−
=
∆
Y
nf
Pn
f
Pn
f
Pn
Therefore, when
n
is sufficiently large,∆
Y
n>
0
and+∞
=
+∞ → n
n
lim
Y
.It follows from Stolz's theorem [2] that
n n n
n n
n
X
Y
=
∆
X
∆
Y
≤
+∞ → +∞
→
/
lim
/
lim
0
0
)
1
(
'
)
1
(
lim
)
1
(
)
(
)
1
(
lim
=
−
−
≤
−
−
−
=
+∞ → +∞
→
f
n
n
R
n
f
n
f
n
R
P Q
n P
P Q
n
Thus
lim
(
)
/
(
)
=
0
+∞
→
T
Pn
f
Pn
n , i.e.,
T
P(
n
)
=
o
(
f
P(
n
))
. This is a contradiction. ThereforeR
Q(
n
)
=
Ω
(
f
'
P(
n
))
. This means thatf
'
P(
n
)
is an asymptotic lower bound of)
(
n
Q
. ■Theorem 4.2 Under the assumption of Theorem 4.1, if there
is an algorithm to solve the problem
Q
(
n
)
such that))
(
'
(
)
(
n
O
f
n
R
Q=
P , then(1) the algorithm to solve the problem
Q
(
n
)
is asymptotically optimal andf
'
P(
n
)
is the infimum of)
(
n
Q
;(2) the corresponding incremental algorithm to solve the problem
P
(
n
)
is asymptotically optimal andf
P(
n
)
is the asymptotic infimum ofP
(
n
)
.Proof. The conclusion (1) follows from Theorem 4.1
immediately. So only the conclusion (2) remains to be proved. From
R
Q(
n
)
=
O
(
f
'
P(
n
))
we know that there exist positive constantsc
>
0
andn
0>
0
such that)
(
'
)
(
n
cf
n
R
Q≤
P whenn
≥
n
0. According to (4.2),))
1
(
)
(
(
)
(
n
≤
c
f
n
−
f
n
−
R
Q P P whenn
≥
n
0.Thus, when
n
is sufficiently large,∑
∑
∑
−= −
= −
=
+
=
=
1 11 1
1 0
0
)
(
)
(
)
(
)
(
nn i
Q n
i Q n
i Q
P
n
R
i
R
i
R
i
T
(
)
∑
−=
−
+
+
≤
1 10
)
(
)
1
(
nn i
P
P
i
f
i
f
c
c
(
(
)
(
0)
)
(
(
))
1
c
f
n
f
n
O
f
n
c
+
P−
P=
P=
Therefore, the corresponding incremental algorithm is asymptotically optimal and
f
P(
n
)
is the asymptotic infimum ofP
(
n
)
. ■Corollary 4.3 Let
β
≥
1
andγ
>
0
andn
βlog
γn
be anasymptotic lower bound of
P
(
n
)
, thenn
β−1log
γn
is an asymptotic lower bound ofQ
(
n
)
.V. CONCLUDING REMARKS
Lower bound problems are generally concerned in the field of design and analysis of algorithms. It is difficult however to estimate their tight lower bounds for many algorithms. Traditionally, lower bounds are obtained either by reduction or by a direct analysis. In this paper, a new idea is presented for estimating the lower bounds of problems. In conjunction with two algorithm design paradigms divide and conquer and incremental construction, we can derive good lower bounds from the lower bounds of the corresponding sub-problems. This is a powerful tool for design and analysis of algorithms.
REFERENCES
[1] A. V. Aho, Hopcroft, and J. D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, Massachusetts, 1974.
[2] T. M. Apostol, Mathematical Analysis, Addison-Wesley, Reading, Massachusetts, Second Edition, 1974.
[3] J. L. Bentley, D. Haken, and J. B. Saxe. A general method for solving divide-and-conquer recurrences. ACM SIGACT News, 12(1): 36–44, 1980.
[4] G. Brassard and P. Bratley. Fundamentals of Algorithms. Prentice-Hall, Inc, Englewood Cliffs, 1996.
[5] T. H. Corman, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. The MIT Press and McGraw-Hill Book Company, Cambridge, Massachusetts and New York, second edition, 2001. [6] J. Kleinberg and ´ E. Tardos. Algorithm Design. Addison Wesley,
Boston, 2005.
[7] G. S. Lueker. Some techniques for solving recurrences. Computing Surveys, 12(4): 419–436,1980.
[8] U. Manber. Introduction to Algorithms: A Creative Approach. Addison-Wesley, Reading, Mass., 1989.
[9] S. Roura. Improved master theorems for divide-and-conquer recurrences. J. of the ACM, 48(1): 170–205,2001.
[10] R. M. Verma. A general method and a master theorem for divide-and-conquer recurrences with applications. J. of Algorithms, 16(1): 67–79,1994.