CBNST Notes For BCA PU 3rd Sem Based On Syllabus PDF
CBNST Notes For BCA PU 3rd Sem Based On Syllabus PDF
Semester-3
BCA 301
CBNST
(Computer Based Numerical and Statistical Techniques)
Unit – 1
Floating Point Arithmetic
The term floating point refers to the fact that a number's radix point
(decimal point, or, more commonly in computers, binary point) can "float";
that is, it can be placed anywhere relative to the significant digits of
the number.
x = ±(0.d1d2 · · · dn)β × β e
where
0.d1d2 · · · dn is a β-fraction called the mantissa and e is an integer called the
exponent. Such a floating point number is called normalised if
For More Information go to www.dpmishra.com
3
Keep Learning with us VBSPU BCA 3rd sem. Software Engineering
d1 6= 0, or else, d1 = d2 = · · · = dn =.
The exponent e is limited to a range m < e < M Usually, m = −M.
Operations–
A floating-point operation is any mathematical operation (such as +, -, *, /)
or assignment that involves floating-point numbers (as opposed to binary
integer operations).
Normalization–
Many floating point representations have an implicit hidden bit in the
mantissa. This is a bit which is present virtually in the mantissa, but not
stored in memory because its value is always 1 in a normalized number.
Iterative methods
Iterative method. In computational mathematics, an iterative method is a
mathematical procedure that uses an initial guess to generate a sequence
of improving approximate solutions for a class of problems, in which the n-
th approximation is derived from the previous ones.
Bisection methods–
The bisection method in mathematics is a root-finding methodthat
repeatedly bisects an interval and then selects a subinterval in which a root
must lie for further processing. ... The method is also called the interval
halving method, the binary searchmethod, or the dichotomy method.
How To Solve
There is no any specific formula to find the root of a function using bisection
method:
for i = 1, 2, 3, ..., n
Below are certain steps to get the solution for the function.
For a continuous function g(x)
Step 1: Find two points, say m and n st m < n and g(m) * g(n) < 0
Step 4: Divide the interval [m, n]. If g(t) * g(n) < 0, let m = t, else if g(t) *
g(m) < 0 then let n = t.
Solution:
First find the value of g(x) at m = 1 and n = 2
Since function is continuous, its root lies in the interval [1, 2].
Examples:
Find the root between (2,3) of x3+ - 2x - 5 = 0, by using regular falsi method.
Given
f(x) = x3 - 2 x - 5
f(2) = 23 - 2 (2) - 5 = -1 (negative)
Taking a = 2.058 and b = 3. we have the second approximation to the root given
by
x2 = (a f(a) - b f(b))/(f(b)-f(a))
= (2.058 x f(3) - 3 x f(2.058)) /(f(3) - f(2.058))
= (2.058 x 16 -3 x -0.4) / (16 - (-0.4))
= 2.081
Let x0 be a good estimate of r and let r = x0 + h. Since the true root is r, and h = r −
x0, the number h measures how far the estimate x0 is from the truth.
h ≈ − f(x0)/ f’(x0) .
It follows that
r = x0 + h ≈ x0 − f(x0) / f’(x0) .
x1 = x0 − f(x0) / f’(x0) .
The next estimate x2 is obtained from x1 in exactly the same way as x1 was
obtained from x0:
x2 = x1 − f(x1) f0 (x1) .
Continue in this way. If xn is the current estimate, then the next estimate xn+1 is
given by
Unit – 2
Simultaneous Linear Equations
Solution of systems of linear equations–
The purpose of this section is to look at the solution of simultaneous linear
equations. We will see that solving a pair of simultaneous equations is
equivalent to finding the location of the point of intersection of two
straight lines.
2x − y = 3
x − y=2
This means that we must find values of x and y that will solve both equations.
We must find two numbers whose sum is 10 and whose difference is 2.
The two numbers, obviously, are 6 and 4:
6 + 4 = 10
6 − 4=2
x − y=2
-- are linear equations (Lesson 33). Hence, the graph of each one is a straight
line. Here are the two graphs:
The last equation gives the second equation now gives finally the
Pivoting–
The main draw back of the above elimination process is division by the
diagonal term while converting the augmented matrix into upper triangular
form. If the diagonal element is zero or a vanishingly very small then the
elements of the rows below this diagonal become very large in magnitude
and difficult to handle because of the finite storage
storage capacity of the
computers. Alternative is to convert the system such that the element
which has large magnitude in that column comes at the pivotal position i.e.,
the diagonal position.
and then leaving the first row and first column, the largest among the remaining
elements is brought to the pivotal 2 x2 position and so on by using both row and
column transformations, is called complete pivoting. During row transformations
the last column of the augmented matrix also has to be considered but this
column is not considered to find the largest element in magnitude. Since the
column transformations are also allowed in this process, there will be a change in
the position of the individual elements of the unknown vector X. Hence in the end
the elements of the unknown vector X has to be rearranged by applying inverse
column transformations in reverse order to all the column transformations
preformed.
Note that this is before the effects of round-off error are taken into
account; conditioning is a property of the matrix, not the algorithm or
floating point accuracy of the computer used to solve the corresponding
system. In particular, one should think of the condition number as being
(very roughly) the rate at which the solution, x, will change with respect to
a change in b. Thus, if the condition number is large, even a small error in b
may cause a large error in x. On the other hand, if the condition number is
small then the error in x will not be much bigger than the error in b.
Refinement of solution–
For More Information go to www.dpmishra.com
15
Keep Learning with us VBSPU BCA 3rd sem. Software Engineering
Unit – 3
Interpolation and approximation
Finite Differences–
In mathematics, finite-difference methods (FDM) are numerical
methods for solving differential equations by approximating them
with difference equations, in which finite differences approximate the
derivatives. FDMs are thus discretizationmethods.
Finite differences play a key role in the solution of differential equations
and in the formulation of interpolating polynomials. The interpolation is the
art of reading between the tabular values. Also the interpolation formulae
are used to derive formulae for numerical differentiation and integration.
Difference Table–
An auxiliary table to facilitate interpolation between the numbers of the
principal table giving approximate differences in values of the tabulated
function corresponding to certain submultiples (such as tenths) of the
constant smallest increment of the independent variable in the table.
Polynomial Interpolation–
Polynomial interpolation. In numerical analysis, polynomial interpolation is
the interpolation of a given data set by the polynomial of lowest possible
degree that passes through the points of the dataset.
This formula is particularly useful for interpolating the values of f(x) near the beginning
of the set of values given. h is called the interval of difference and u = ( x – a ) / h, Here
a is first term.
Example :
Input : Value of Sin 52
Output :
This formula is useful when the value of f(x) is required near the end of the table. h is
called the interval of difference and u = ( x – an ) / h, Here an is last term.
Example :
Input : Population in 1925
Output :
Langrange’s interpolation–
Unit – 4
Statistics
Statistics and its role in decision making–
Unit – 5
Correlation
Types of correlation–
Positive correlation–
Negative correlation–
Simple–
Partial–
Multiple correlation–
Linear and non-linear correlation–
Coefficient of correlation–
Regression Lines–
Regression equation of Y on X–
Regression equation of X on Y–