Mathematical Foundation of Computer Science

(Chris Devlin) #1
DHARM

DISCRETE NUMERIC FUNCTIONS AND GENERATING FUNCTIONS 31

Example 2.8. Let an be a numeric function s.t.

an = RS1for0n503 for n 51≤≤≥
T
Find S–25 an.
Sol. Using definition we have S– 25 an = an+25 for n ≥ 0. To determine the numeric function
an+25, for n ≥ 0, we have



  • Since an = 1 for 0 ≤ n ≤ 50, also an+25 = 1 for 0 ≤ n + 25 ≤ 50 or 0 ≤ n ≤ 25.

  • For n ≥ 51, an = 3, also an+25 = 3 for n + 25 ≥ 51 or n ≥ 26.


Therefore, S–25 an = SR^1025226 forfor ≤≤≥
T

n
n
2.2.7. Let an be a numeric function then accumulated sum of an is defined by
an
k

∑ (for k = 0 to n)
is a numeric function. For example if an describes the monthly income of worker then its
annual income is given by the accumulated sum (bn) of an where,

bn =
k

an
=


0

12

Example 2.9. Let an = P (1.11)n for n = 0. Find accumulated sum of an for n = m.
Sol. Let bn be the accumulated sum of an, i.e.,

bn =
k

m
an
=


0

=
k

m
k
=


0

P(. ) (^111) for m ≥ 0
= P (1 + 1.11 + 1.11^2 + ........+ 1.11m)
= P (1.11m+1 – 1)/ (1.11 – 1)
= 100 P (1.11m+1 – 1)/11 for m ≥ 0
2.2.8 Let an be a numeric function then its forward difference is denoted by ∆an, and
defined as,
∆an = an+1 – an for n = 0
Likewise, backward difference is denoted by ∇an, and defined as,
∇=


−≥
R
S
T −
a
an
n aann n
0
1
0
1
for
for
For example, if an describes the annual income of a worker then,



  • ∆an will describe the change in income from nth year to (n + 1)th year, and

  • ∇an will describe the change in income from nth year over (n – 1)th year.
    Consider a numeric function an. i.e.


a

n
n= n

≤≤

R
S
T

07
18

for 0
for
then ∆an = an+1 – an for n ≥ 0
Free download pdf