Chapter 21 Recurrences886
where:
1.x 0 is large enough so thatTis well-defined,2.a 1 ;:::;akare positive constants,3.b 1 ;:::;bkare constants between 0 and 1,4.g.x/is a nonnegative function such thatjg^0 .x/jis bounded by a polynomial,5.jhi.x/jDO.x=log^2 x/.Then
T.x/D‚xp1 C
Zx1g.u/
upC^1duwherepsatisfies
Xk
iD 1aibipD1:The Akra-Bazzi theorem can be proved using a complicated induction argument,
though we won’t do that here. But let’s at least go over the statement of the theorem.
All the recurrences we’ve considered were defined over the integers, and that is
the common case. But the Akra-Bazzi theorem applies more generally to functions
defined over the real numbers.
The Akra-Bazzi formula is lifted directed from the theorem statement, except
that the recurrence in the theorem includes extra functions,hi. These functions
extend the theorem to address floors, ceilings, and other small adjustments to the
sizes of subproblems. The trick is illustrated by this combination of parameters
a 1 D 1 b 1 D1=2 h 1 .x/Dlx
2m
x
2
a 2 D 1 b 2 D1=2 h 2 .x/Djx
2k
x
2
g.x/Dx 1which corresponds the recurrence
T.x/D 1 Tx
2C
lx
2m
x
2CT
x
2C
jx
2k
x
2Cx 1DTlx
2m
CTjx
2k
Cx 1:This is the rigorously correct Merge Sort recurrence valid for all input sizes,
complete with floor and ceiling operators. In this case, the functionsh 1 .x/and