CS-07 : DISCRETE MATHEMATICS DEC 1998

 

Time : 3 Hours

Max. Marks : 75


Note : Question number 1 is compulsory. Answer any three from the rest.
 

1. (a) Rewrite the following after correcting the errors (if any)
1. READ J,K) X, Y
2. DIMENSION SIX(6)
3. MAD = 3 HUR
4. IF A/B, 6, 5, 4
5 GO TO (33, 13, 14), A
  (b) Write a FORTRAN program to compute the sum : 1/sqrt(2) + 1/sqrt(3) + 1/sqrt(4)+ .... + 1/sqrt(9)
  (c) Find the inverse of the following matrix :
 1      1
-1      2
2. (a) What is the distinction between EQUIVALENCE and COMMON declarations in the context of FORTRAN programming ?  illustrate with an example.
  (b) Consider the following statements :
LOGICAL X,XX
DIMENSION X(25), XX(50)
DATA X/25*. TRUE./., 25*.FALSE., 25*TRUE./
write single statement for these three statements to achieve the same purpose
3.   Defining x as an array that can hold upto 500 observations, write a program to determine their mean and standard deviation
4. (a) The following datum is keyed in at columns 1 to 8 : 9876.543
Write fortran statements to read the value in the variables I, J,K,A,B in such a way that I = 76, J = 54, K = 43 and A = 76.54 and B = 6.543 State 5 rules that apply to use of the Do loops in Fortran Programming
5.   Write a fortran program to evaluate the definite integral ex(x+1)dx by using the trapezoidal rule.  Include a subroutine to calculate the same using the standard formula from integral calculus, and to compare the two results
6. (a) What are main characteristics of a normal distribution ?
  (b) What is the probability that  in a normal distribution, x lies beyond (µ ± 3row)?
7.   Explain very briefly and precisely the meaning o f the following terms.
1. Types of class intervals
2. Distinction between median and mode
3. Scatter diagrams
4. Bayes theorem
5. Poisson Distribution