Mathematical Foundation of Computer Science

(Chris Devlin) #1
DHARM

30 MATHEMATICAL FOUNDATION OF COMPUTER SCIENCE


Similarly we define numeric function S–I an, i.e.,
S–I an = an + I for n ≥ 0

For example, let an = RS^1010211 forfor ≤≤≥
T

n
n

Then, S^5 an =
00 14
5 5

for 5
for

≤≤− =

R
S
T −

n
ann

()

Now determine an–5, for n ≥ 5, so there exists two cases,


  • Since an = 1 (independent of n) for 0 ≤ n ≤ 10, now replace n by n – 5, therefore


an (^) –5 = 1 for 0 ≤ n – 5 ≤ 10 or 5 ≤ n ≤ 15.



  • Similarly, an–5 = 2 for n – 5 ≥ 11 or n ≥ 16.


Hence, S^5 an =

004
1515
216

for
for
for

≤≤
≤≤

R
S
|
T|

n
n
n
and S–5 an = an+5 for n ≥ 0
To determine an+5, for n ≥ 0, we obtain

S–5 an = an+5 =
1051005 0
25116

for or since
for or

≤+≤ ≤≤ ≥
+≥ ≥

R
S
T

nnn
nn

()

Example 2.7. Let an be a numeric function such that


an = 2for0n3
25forn4n

≤≤
+≥

R
S
T

Find S^2 an and S–2 an.
Sol. Using definition S^2 an, we have


S^2 an =
00121
2 2

for
for

≤≤=−

RS
T −

n
ann

()

Now to determine numeric function an–2, for n ≥ 2 we have,


  • For 2 ≤ n ≤ 3, an = 2 (independent of n) therefore an–2 = 2 for 2 ≤ n – 2 ≤ 3 or 4 ≤ n ≤ 5.


• For n ≥ 4, an = 2–n + 5, so an (^) –2 = 2–(n – 2) + 5 for n – 2 ≥ 4 or n ≥ 6.
Therefore,
S^2 an =
001
22
23
245
252 6
for
for
for
for
for
≤≤


=
≤≤
+≥
R
S
|
|
T
|
|−−
n
n
n
n
()n n
From the definition of S–2 an, we have
S–2 an = an+2 for n ≥ 0
To determine the numeric function an+2 , for n ≥ 0 we have,



  • Since an = 2, for 0 ≤ n ≤ 3, therefore an+2 = 2, for 0 ≤ n + 2 ≤ 3 or 0 ≤ n ≤ 1

  • For n ≥ 4, an = 2–n + 5, therefore an+ 2 = 2–(n + 2) + 5, for n + 2 ≥ 4 or n ≥ 2.


Hence, S–2 an =
201
252 2

for
for

≤≤
+≥

R
S
T
−+

n
()n n
Free download pdf