You are on page 1of 15

1|P ag e

IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Course Code
:
MCSE-004
Course Title
:
Numerical and Statistical Computing
Assignment Number
:
MCA(5)/E004/Assign/2013
Maximum Marks
:
100
Weightage
:
25%
Last Dates for Submission
:
31st October, 2013 (For July 2013 Session)
30th April, 2014 (For January 2014 Session)

This assignment has eleven questions in all and carries 80 marks. The rest of the 20 marks
are for viva-voce. Answer all the questions. You may use illustrations and diagrams to
enhance the explanations. Please go through the guidelines regarding assignments given in
the Programme Guide for the format of presentation.
Question 1: If = , is approximated as 3.14, find the absolute
error relative error and relative percentage error.
Answer:
From the above question here, x =
and xa = 3.14

(6 marks)

i.e. x = 3.1428 and xa = 3.1400


therefore,
Absolute Error:

=| x - xa|
= 3.1428 3.1400
= 0.0028
Relative Error:
= |x xa| / x
= |3.1428 3.1400| / 3.1428
= 0.000890
= 0.890X 10-3
Percentage Relative Error: = Relative Error X 100
= 0.000890 X 100
=0.089
=0.89 X 10-1
Question 2: Using Regula Falsi method, find the real-root of the
3
2
equation x x 2 = 0
Answer:

(6 marks)

Let f(x) = x3 x2 2 =0
f(0) = 03 - 02- 2= -2 (-ve)
f(2) = 23 -22 2=8 4 2= 2 (+ve)
We shall find the root that lies between (0,2)
( )
( )

( )
( )

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

2|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

Now, f(1)= 13 -12-2 = -2


therefore, the root lies between (1,2)
( )
( )

( )
( )

( )

(
(

)
)

f(1.5)= 1.53 -1.52-2 = -0.875


now, therefore the root lies between (1.5,1)
( )
( )

(
(

)
)

( ) (

= 1.8 approx.
now,
f(1.8)= 1.83 -1.82-2 = -0.59
therefore, the root lies between (1,1.5)
(
(

(
(

)
)

( )
( )

)
) (

)
)

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

3|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

f(1.61)= 1.613 -1.612-2 = -0.42


so the foot lies between (1.6,1.8)
(
(

)
)

(
(

)
)

Now,
f(1.68)= 1.683 -1.682-2 = -0.08
so, the root lies between (1.68,1.61)
(
(

)
)

(
(

)
)

(
(

)
)

Since, | x7 x6| = 0.01, the approximation X8 = 1.66 is correct to decimal places and hence, the
root is = 1.6
Question 3: Solve by Jacobi iteration method, the system of
equations 3x 3y + 2z = 0; 6x + 3y + 12z = 35
and 4x + 11y z = 33
Answer:

(6 marks)

To apply Jacobi iteration method, we have to check that diagonal elements are dominant.
i.e. 3 < 3+2, 3< 12=6, 1<4+11
therefore, we can see that the above comparison does satisfy the condition of
dominancy, so we must rearrange the system of equation such that it become
dominant.
i.e.
3x - 3y +2z =0,
6x + 12z +3y = 35,
4x z + 11y = 33
-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

4|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Now, dominancy test,
3 > (-3) +2; 12 > 6+3 ; 11 > 4 + 2

Therefore,
Or,

Or,

------------- (1)

-------------- (2)
-------------- (3)

First Iteration:
From the above equation, we start with x = y = z = 0
x(1)

y(1)
z(1)

= -33

Second Iteration:
Consider the new value of x (1), y (1), z (1) in equation (1), (2) and (3)
x(2)

))

= 33.66666
y(2)

(2)

))

= 143.66666
= 4*0 + 11* 11.66666 -33
= 128.33326 - 33
= 95.33326

Third Iteration:
Consider the new value of x (2), y (2), z (2) in equation (1), (2) and (3)
x(3)

))
)

= 80.11115
y(3)

(3)

)
)

= 436.9996
= 4*33.66666 + 11* 143.66666 -33
= 1681.9999

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

5|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Iteration
X
Y
Z
1
0
11.66666
-33
2
33.66666
143.66666
95.33326
3
80.11115
436.99969
1682.99999

Hence, from the above table we can say that the values of x, y, z does not match in any iteration.
So we can say that we cannot find the exact solution to the given equation system.
Question 4: Prove that { logf(x) } = log [

( )
( )

(8 marks)

Answer:

log f(x) = log f (x +h) log f(x)


= log [
( )

log [

( )

)
( )

------- LHS.

] = log [

( )

( )
(

= log [

= log [

( )

)
( )

------- RHS.

Now LHS = RHS;

log [

)
( )

] = log [

Hence:
{ logf(x) } = log [

)
( )

( )
( )

Proved.

Question 5: Estimate the missing term in the following data, using


Difference table
x
:
1
2
3
4
5
f(x)
:
3
7
?
21
31
Answer:
Let the missing value be a.

(6 marks)

Since, third degree are to be same 39 3a = 3a 39, or 6a = 78 and a = 13.


-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

6|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

Question 6: Given the following system of linear equations, determine


the value of each of the variable using LU Decomposition
method.
6x1 2x2 = 14; 9x1 x2 + x3 = 21;
3x1 7x2 + 5x3 = 9
Answer:
We write A = LU, with uii = 1 as

(8 marks)

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

7|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

Solving the system of Equations


After decomposing A as A = LU, the next step is to computate the solution. We have,
LUX = b,
set UX = y
Solve first Ly = b, by forward substitution. Then, solve Ux = y, by backward substitution to get
the solution vector x.
Question 7: Find the interpolating polynomial that fits the data
xk
0
1
2
5
fk
2
3
12
147
Answer:

(8 marks)

Using the Lagrange interpolation formula we have

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

8|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------2
Question 8: Solve the initial value problem u = 2tu
(8 marks)
with u(0) = 1 and h = 0.2 on the interval [0, 1].
Use the fourth order classical Runge-Kutta Method.
Answer:
2

We have X0 = 1, u0 = 1, h = 0.2, and f(t, u) = 2tu


For n=0

Question 9: Calculate the value of the integral


by
a) Trapezoidal rule
c) Simpsons 3/8 rule
b) Simpsons 1/3 rule
d) Weddles rule
Answer:
Assume h = 0.2. compare the numerical solutions with the exact solution.
Taking h = 0.2, divide the range of integration (4, 5.2) into six equal parts.

(8 marks)

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

9|P ag e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

The values of log x for each point of sub-division are given below:

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

10 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

11 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Question 10: Study the case below and answer the respective questions.
(8 marks)
Ticket of a game costs Rs. 500/- per person, the game comprises of an experiment
where 3 coins are to be tossed once and for each tail the organizer claims to pay Rs.
200/- and for each head a sum of Rs. 100/- is to be paid.

i) Prepare the probability distribution table


ii) What type of probability distribution it is
iii) Is it profitable to play the game, give justification on the basis of the analysis of
probability distribution table.
Answer:
i) If we toss 3 coins one time, then the experiment has a total of eight possible outcomes, and
they are as follows:
Let assume the H denotes Head and T denotes Tails.
a1 = {HHH};
a2 = {HHT};
a3 = {HTH};
a4 = {HTT};
a5 = {THH};
a6 = {THT};
a7 = {TTH};
a8 = {TTT};
Denoting the event corresponding to getting K heads, K=0, 1, 2, 3.. as {X=K}, observe that:
{X=0} => {a8};
{X=1} => {a4, a6, a7};
{X=2} => {a2, a3, a5};
{X=3} => {a1};
Denoting the event corresponding to getting K Tails, K=0, 1, 2, 3.. as {X=K}, observe that:
{X=0} => {a1};
{X=1} => {a2, a3, a5};
{X=2} => {a4, a6, a7};
{X=3} => {a8};
If we assumed that the coins are unbiased and the toss has been performed independently, the
probabilities of all the outcomes of the sample space are equal, that is:
P(ai) = P(a2) = .. P(a8) =
There for, using the probability law of disjoint events we can easily obtain the
a) Probabilities for K heads:
P({X = 0}) = P({a8}) =
P({X = 1}) = P({a4},a6,a7) = P({a4}) + P ({a6}) + P({a7}) =
P({X = 2}) = P({a2},a3,a5) = P({a2}) + P ({a3}) + P({a5}) =
-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

12 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------P({X = 3}) = P({a1}) =

b) Probabilities for K Tails:


P({X = 0}) = P({a1}) =
P({X = 1}) = P({a2},a3,a5) = P({a2}) + P ({a3}) + P({a5}) =
P({X = 2}) = P({a4},a6,a7) = P({a4}) + P ({a6}) + P({a7}) =
P({X = 3}) = P({a8}) =
Therefore, in this case, the random variable X takes four values 0,1,2,3 with the probabilities
,

respectively. It is also import to observe that:

P({X = 0}) + P({X = 1}) + P({X = 2}) +P({X = 3}) = 1


It is not a coincidence, it is true. If we add the probabilities of all possible values of a random
variable it is always one.
Now the figure below demonstrates the schematic representation of a random variable X.
X

HHT, HHT, HTH, HTT,


THH, THT, TTH, TTT,

{0, 1, 2, 3}

Suppose X is random variable denoting the number of Heads or Tails obtained in one
independent tosses of 3 coins, then the probabilities mass function (p.m.f) p is the function, p:
X R, such that;
P(0) =

, P(1) = P(2) =

, P(3) =

Therefore, p(ai) = Pi 0, for all ai and

=1

In this case the p.m.f of the random variable by the function p and the corresponding probability
distribution is the set

{(0 , ) , (1 , ) , ( 2, ) , (3 , )}

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

13 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Now the:

Probability distribution Table for the number of heads in one independent toss of 3 coins:
The number of heads (X values)

Probability

Probability distribution Table for the number of Tails in one independent toss of 3 coins:
The number of tails (X values)

Probability

ii)

This is Random Variable Method of probability. A Random experiment or a Statistical


experiment is any act whose outcome cannot be predefined and predicated in advance.
Any outcome of random experiment is known as event.

iii)

Yes this is possible to play the game after knowing the probability table. Because we
know that;
The game cost for one person is RS. 500/- each.
Total No. of Coins are 3.
The claim amount paid by organiser for Head RS. 200/- for each head and
The claim amount paid by the organiser for Tail RS. 100/- for each Tail.

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

14 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
-------------------------------------------------------------------------------------------------------------------------------------Now as the Probability table we know that we have two probabilities are available for
Head and Tails are and .

Now if the organiser has only one player then if:


3 Head comes:
200+200+200=600-500=-100 Loss
3 Tail comes:
100+100+100=300-500=200 Profit
2 Head comes:
200+200+100=500-500=0 No Profit & No Loss
2 Tail comes:
100+100+200=400-500=100 Profit
1 Head comes:
200+100+100=400-500=100 Profit
1 Tail comes:
100+200+200=500-500=0 No Profit & No Loss
Through the above calculation it is clear that there is only one chance is there when the organiser
can face loss otherwise the rest probability cant make any loss. There is maximum chance to
organiser to earn profit. Hence this game can be playable for both organiser and person.

Question 11: A survey was conducted to relate the time required to


deliver a proper presentation on a topic, to the performance
of the student with the scores received, as below

i)
ii)

(8 marks)

Find the regression equation to predict students score on the basis of


duration of study.
If a student has studied for 0.85 hours, what is the predicted score of the
student?

Answer:
We will arrange the data in the form of a chart to enable us to perform the computations easily.

-------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

15 | P a g e
IGNOU MCA 5th Semester July 2013 January 2014 (MCSE-004) Fully Solved Assignment
--------------------------------------------------------------------------------------------------------------------------------------

(a)

(b)

Thus, the predicted score of the student who had studied 0.85 hours is approximately 64.00.
-------------------------------------------------------------------------------------------------------------------Dont Forget to Say Thanks!
E-mail: lokeshchandrasingh@gmail.com
Web: ignoumcaassignmentsolution.blogspot.com
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------By: Mr. Lokesh Chandra Singh. (09334255802)

You might also like