Mathematical Foundation of Computer Science

(Chris Devlin) #1

2.1 INTRODUCTION


In Chapter 1 we have studied that function is a process of transformation of objects from one
form to other. Thus, function is binary relation from set of objects called domain to set of
objects called range and from the domain set each object has a unique value in the range set.
Present chapter discuss special purpose functions called numeric functions that are common
in computation theory and digital systems. In this context numeric functions over discrete set
of objects are of greater concern.
Discrete Numeric function is defined from set of natural numbers to set of real num-
bers. So, if f is a discrete numeric function then
f :{set of natural no.} → {set of real no.}
Here domain set consists of natural numbers and range set consists of real number.
Discrete numeric function can also be represented as,
fn = f(n) for n = 0, 1, 2, ......
where n is the natural number and function fn returns value f(n) that is an expression of n.
For example, if An will be amount on initial deposit of Rs 100 after n years at interest
rate of 5% per annum then
An = 100 (1 + 5/100)n [using simple compound interest formula]
or An = 100 (1.05)n [ for n = 0]
Now Fig. 2.1 shows the output returned for various values of n (0, 1, 2, .....).


n 01 2 3 4 5 ......
An 100 105 110.25 115.76 121.55 127.63 ......

Fig. 2.1
Consider another example, as we experience that due to policy decisions of the govern-
ment interest rates are fluctuating. Suppose a person credited Rs 1000 on rate of interest per
annum 15 %. After couple of years interest rate lifted to 18 % per annum and after 5 years
interest rate down to 10 %. Then the amount in the account appeared after each changing year
will be An, i.e.,
An = 1000 (1 + 15/100)n = 1000 (1.15)n for 0 ≤ n ≤ 2
Since 1000(1.15)^2 = Rs 1322.5, therefore
An = 1322.5 + 1322.5 (1 + 18/100)n for 2 ≤ n ≤ 8


2


Discrete Numeric Functions


and Generating Functions


26
Free download pdf