You are on page 1of 175

V.S.B.

ENGINEERING COLLEGE, KARUR


Department of Computer Science and Engineering
Academic Year: 2019-2020 (EVEN Semester)
Class: II Year / IV Semester B.E. CSE

2 MARKS & 16 MARKS QUESTION BANK

MA6451/PROBABILITY AND RANDOM PROCESSES


UNIT 1 RANDOM VARIABLES
PART –A
3x 2 ,0  x  1
1. A continuous random variable X has probability function f ( x )   ,find k
 0, otherwise
such that p(X>k)=0.5. Nov./Dec. 2010 May/June.2014
Ans:
3x 2 ,0  x  1
Given, f ( x )  
 0, otherwise
K

 f ( x)dx  0.5
0
K
3 x 2 dx  0.5
0
k
 x3 
3   0.5
 3 0
K=0.7937
 
2. If X is uniformly distributed in ( , ) .find the pdf of Y=tanX.
2 2
Nov./Dec. 2010
Ans:
Given, Y = tanX.

 0, x  0
3. TheCDF of a continuous random variable is given by F ( x )   
x ,find the PDF
1  e 5 ,0  x  
and mean of X.
Nov./Dec. 2011 April / May.2011
Ans:
 0, x  0
Given, F ( x )   
x
1  e 5 ,0  x  
 0, x  0
F ( x)   
x \
1  e 5 ,0  x  
  
x

x
Pdf f(x) = d F ( x)  d 1  e 5   1 e 5
dx dx   5
  x
1 
E(X) =  xf ( x)dx  x e 5 dx 5
0 0
5
4. Establish the memory less property of the exponential distribution.
April / May.2011
Ans:
Statement:-
If X is exponential distributed, then P X  s  t X  s   P X  t ,  s, t  0

Proof:- P X  K    e x dx
k

   e x dx
k

 e  x 
  
   k
 e k ..........................(1)
P X  s  t.and . X  s 
P X  s  t X  s  
P X  s 
P X  s  t.

P X  s 
by (1)
e   s t 
  s
e
 t
e
 P X  t 
Hence P X  s  t X  s   P X  t  .The converse of this result is also true.
(ie ) P X  s  t X  s   P X  t  Then X follows an exponential distribution.
 x ,1  x  1
5. Test whether F ( x)   can be the probability density function of a continuous
 0, otherwise
random variable.
Nov./Dec. 2014 April / May 2015
Ans:

Toprove f ( x )dx  1


L.H .S .
 1 0 1

f ( x )dx  
1
x dx  1
xdx   xdx
0
0 1
 x  x 2 2


f ( x )dx       
  1  2  0
2


f ( x )dx 1


f ( x )dx R.H .S

Hence the proof.


6. What do you mean by MGF? Why it is called so? Nov./Dec. 2014
Ans:
MGF means Moment generating function.
MX(t)=E(etx)
It generates moments of a random variable.
7. A continuous random variable x has the probability density function given by
a(1  x 2 ),2  x  5
F ( x)  
 0, otherwise
Find a and P(X<4).
May/June.2014

Ans:
4
 (ii ) p ( X  4)   f ( x)dx
(i)  f ( x)dx  1 2
 4 1
5 p ( X  4)   (1  x 2 ) dx
  (1  x )dx  1
2
2
2 24
4
1  x3 
5
 x3 
 x    1 p ( X  4)   x  
 3 2 24  3 2
1 31
 p ( X  4) 
42 63
The moment generating function of a random variable X is given by M (t )  e3( e 1) ,what is
t

P(X=0).

Nov./Dec. 2012
n
2
8.FindC,if p( X  n )  C   : n  1,2,...
 3
May/June.2012
Ans:
 p ( X  n)  1
 n
2
 C  3 
n 1
1

 2   2  2  2  3 
C         ........  1
 3   3   3  
 2   2  
1

C   1     ........  1
    
3 3 
1
 2   2  
C   1   . 1
 3   3  
1
C
2

9. If the probability that a target is destroyed on any7 one shot is 0.5 find the probability that
it would be
Destroyed on 6th attempt. Nov./Dec. 2012
Ans:
Given: p = 0.5:
q = 1-0.5
= 0.5
p( X  r )  q r 1 p
1
p( X  6)  q 5 p  (0.5) 5 .(0.5) 
64
10.Define random variable.
Nov./Dec. 2013
Ans:
A real valued function defined on the outcome of a probability experiment is called a
random variable.
11. Define geometric distribution.
Nov./Dec. 2013
Ans:
A random variable X is said to follow a geometric distribution with parameters p if its
x 1 q x 1 p, x  1,2,.....
probability mass function is given by P( X  x)  (1  p) p X is
 0, otherwise
called a geometric random variable.
 0, x  1
1
 ( x  1),1  x  3
12.A random variable X has cdf F ( x)   2 find the pdf of X and the expected
 1, x  3


value of x. May/June.2013
Ans:
 0, x  1
1
 ( x  1),1  x  3
F ( x)   2
 1, x  3


 0, x  1
1
 ,1  x  3
pdf , f ( x)  F ( x)  F ( x)   2
d
dx  1, x  3


 1 3 
E(X) =  xf ( x)dx   xf ( x)dx   xf ( x)dx   xf ( x)dx
0 0 1 3
3
1
 0   x dx 0
1
2
2

13. Find the moment generating function of binomial distribution. May/June.2013


Ans:
The moment generating function of binomial distribution is

 c
14. Find c if a continuous random variable X has the density function f ( x )   , -
1  x
2

∞<x<∞. Nov./Dec. 2014


Ans:
 c
Given, f ( x )  
1  x
2

 f ( x)dx  1


c
1 x

2
dx  1


1
c dx  1
 1  x
2


2c tan 1 x 0  1 

1
c

15. Find the moment generating function of Poisson distribution.
Nov./Dec. 2014
Ans:
Given, the moment generating function of Poisson distribution
16.X and Y are independent random variables with variance 2 and 3 .find the variance of
3x+4Y.
May/June.2014
Ans:
Given, var(X) =2
Var(Y) =3
Var(3X+4Y)=32Var(X)+42Var(Y)
=66
𝑒 −𝑥 , 𝑥 ≥ 0
17. Show that the function 𝑓(𝑥 ) = { is a probability density function of a random
0,𝑥 < 0
variable 𝑋. April/May.2015
Ans:

∫ 𝑓(𝑥)𝑑𝑥 = 1
−∞
∞ 𝑒 −𝑥 ∞
∫0 𝑒 −𝑥 𝑑𝑥 = [ −1 ] = −( 𝑒 −∞ − 𝑒 0 ) = 1
0

18. The mean and variance of a binomial distribution are and . Determine the distribution.
Ans:
April/May.2015
𝑥 𝑛−𝑥
𝑝(𝑥 ) = 𝑛𝐶𝑋 𝑝 𝑞
mean(𝑛𝑝) = 5
Variance (𝑛𝑝𝑞 ) = 4
𝑛𝑝𝑞 4 4
𝑞= = ,𝑝 =1−𝑞 = 1−5
𝑛𝑝 5
𝑛𝑝 = 5implies𝑛 = 25
1 𝑥 4 25−𝑥
𝑝(𝑥 ) = 25𝐶𝑋 ( ) ( ) , 𝑥 = 0,1,2 …
5 5
19. Assume that 𝑋 is a continuous random variable with the probability density function
3
(2𝑥 − 𝑥 2 ), 0 < 𝑥 < 2
𝑓 ( 𝑥 ) = {4 . Find 𝑃(𝑋 > 1) .
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Nov/Dec.2015
Ans:
2
23 3 𝑥3
𝑃(𝑥 > 1) = ∫1 4 (2𝑥 − 𝑥 2 )𝑑𝑥 = 4 [𝑥 2 − ]
3 1
3 8 1 1
= [(4 − ) − (1 − )] =
4 3 3 2
20. A random variable 𝑋 is uniformly distributed between 3 𝑎𝑛𝑑 15. Find the variance of 𝑋.
Ans:
Nov/Dec.2015
1
𝑉𝑎𝑟(𝑋) = 12 [𝑏 − 𝑎]2 ; 𝑎 = 3, 𝑏 = 15
1
= [15 − 3]2 = 12
12
𝐾𝑒 −𝑥 , 𝑥 ≥ 0
21.If𝑓 (𝑥 ) = { is the PDF of a random variable 𝑋, the n find the value of 𝐾.
0 ,𝑥 < 0
Ans:
May/Jun.2016

∫ 𝑘𝑒 −𝑥 𝑑𝑥 = 1
0
−𝑥 ∞
𝑒
𝑘[ ] = 𝑘 – ( 𝑒 −∞ − 𝑒 0 ) = 1
−1 0
𝑘=1

22. Write the formula for moment generating function of Poisson distribution.
Nov./Dec. 2017
Ans:
Given, the moment generating function of Poisson distribution

PART B

PROBLEM RELATED TO PMF& PDF


01. The probability mass function of random variable X is defined as P( X  0 )  3C 2 ,
P( X  1 )  4C  10C 2 , P X  2  5C 1 , where C  0 and P X  r   0 if r  0 ,1, 2 . Find
2
(i) The value of C. Ans: C 
7
(ii) The distribution function of X
12 28
Ans: F ( x )  0 , x  0 :  ,0  x 1 :  ,1  x  2 :  1, 2  x
49 49

The largest value of X for which F  X  


1
(iii) Ans: x  0
2
(iv) P0  X  2 / X  0  Ans:
16
P 
37
April/May2010
02. The probability density of the random variable X is given by
x, 0  x 1

f ( x )  k 2  x , 1  x  2 . Find
X
0,
 otherwise
(i) The value of ‘k’ Ans: k  1
The distribution function of f ( x )

x2 x2
Ans: F  X   0, x  0 : , 0  x  1: 2 x   1,1  x  2 :1, x  2
2 2
(ii) P0.2  x 1.2 Ans:
P  X   0.66
(iii) P0.5  x 1.5 / x 1 Ans: P  X   0.75
April/May2011
03. The probability function of an infinite discrete distribution is given by
P X  j 
1
, j  1, 2,3, .. . Find
2 j
(i) Mean of X Ans: E X   2

Ans: P  X  
1
(ii) P( X is even ) and
3

Ans: P  X  
1
(iii) P( X is divisible by 3 )
7
Nov./Dec. 2011
 k
 ,   x 
04. A continuous random variable X has the PDF f ( x )  1  x 2 . Find
0 , otherwise
1
(i) The value of ‘k’ Ans: k 

1 
(ii) Distribution function of X Ans: F  X   tan 1 x  
 2
(iii) P  X  0 Ans: P  X   0.5

Nov./Dec. 2011

 1
 , x  1, 2, 3,...
05. Show that the probability function P X  x   x x  1 E X  does not exist.
0 ,
 otherwise

[This is divergent series. So Mean and Moments do not exists] Nov./Dec. 2012

06. A random variable X has the following probability distribution.


x : 0 1 2 3 4 5 6 7
Find
p ( x) : 0 k 2k 2k 3k k2 2k 2 7k 2  k
1
(i) The value of k. Ans: K 
10
5
(ii) P1.5  X  4.5 | X  2, and Ans: P 
7
(iii) The smallest value of  for which P X   ,  1 . Ans:   4
2
May/June.2014 May/June.2013 April/May2011
07. If X and Y are independent RVs each normally distributed with mean zero and variance
y
 2 ,find the pdf of R  x 2  y 2 and   tan 1 ( ) .
x
Nov./Dec. 2013
08. A continuous random variable X that can assume any value between X=2 and X=5 has a
probability density function f(x)=k(1+x).FindP(X<4). April/May2015
09. If the probability mass function of a random variable X is given by
P(X=x)=kx3,x=1,2,3,4,find the value of k,P((1/2<X<5/2)/X<1),mean and variance of X
April/May2015

2𝑥 , 0 ≤ 𝑥 ≤ 𝑏
10. The pdf of a random variable 𝑋 is given by 𝑓 (𝑥 ) = { . For what value of 𝑏
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
is 𝑓(𝑥)a valid pdf?
Also find the cdf of the random variable 𝑋 with the above pdf. Nov/Dec.2015
11. If the probability that a target is destroyed on any short is 0.5.What is the probability that
it would be destroyed on 6th attempt? Nov/Dec.2017
12.A car hire firm has 2 cars.The number of demands for a car on each day is distributed as
poisson variate with mean 0.5.Caluculate the proportion of days on which (1) neither car is
used (2)some demand is refused.
April/May2017.

PROBLEM RELATED TO MOMENTS


2 x
13. A continuous random variable has PDF f ( x)  Kx e , x  0 . Find K, rth moment,
mean, and variance.
 r  2  E[ X ]  3, V [ X ]  3
1
Ans: K  1
2
 ,
r
2

May/June.2013

 2 1  x , 0  x  1
14. If the probability density of X is given by f ( x )   . Find its rth
 0 , otherwise


moment. Hence evaluate E 2 X  12 .  
Ans: '  
2  
, E 2 X 12   3
r  r  1r  2  
Nov./Dec. 2012
2e 2 x , x  0
15. A random variable X has the pdf f ( x )   obtain the mgf and first four
 0, x  0
moments about the origin.Find the mean and variance of the same. Nov./Dec.
2014
 x
 x ,x 0
16. Find the MGF of a random variable X having the pdf f ( x )   2
4e
0, elsewhere .Also

deduse the first four moments about the origin.

PROBLEM RELATED TO MGF


 1  2
 e ,  0
01. Find MGF corresponding to the distribution f     2 and hence find its
0,  0
 1
t 0
mean and variance. Ans: M X t   
1  2t EX  2,V X  4 Nov./Dec. 2012

1, t 0
 x
 x  2
02. Find the MGF of the random variable X having the PDF f ( x )   e , x  0 . Also
4

0, x0
 1
 t 0
deduce that first 4 moments about the origin. Ans: M X t    1  2t 2
1, t 0

1,  4,  2,  24, 3, 192,  4, 1920.

May/June.2013 April/May2011

03. Find the nth moment about mean of normal distribution. Nov./Dec. 2014
04. State and prove memoryless property of Geometric distribution. Nov./Dec. 2015

PROBLEM RELATED TO BINOMIAL DISTRIBUTIONS

01. Find moment generating function of the Binomial distribution. Hence find its Mean and
Variance.
 
Ans: M X t   q  pe t ,
n
E[ X ]  np, V [ X ]  npq

02.Describe binomial B(n,p) distribution & obtain the mgf.hence compute (i) first four
moments and (ii)the recursion relation for the central moments.
May/June.2014
03. A coin is biased so that a head is twice as likely to appear as a tall. If the coin is tossed 6
times, find the probabilities of getting (1) exactly 2 heads, (2) atleast 3 heads, (3) atmost 4
heads. May/June.2016

PROBLEM RELATED TO POISSON DISTRIBUTIONS


01. Find the MGF of a Poisson distribution and hence deduce its mean&variance.
 
  e t 1
Ans: M X t  e  
,  , April/May2011

02. Derive Poisson distribution from the binomial distribution. Nov./Dec. 2014
Nov./Dec. 2013
03. Suppose that a customer arrive at a bank according to a poisson process with a mean rate
of 3 per minute.find the probability that during a time interval of 2 min.(1)exactly 4
customers arrive and (2)more than 4 customers arrive.
Nov./Dec. 2013

04.An office has four phone lines .each is busy about 10% of the time.Assume that the phone
lines act independently(1)what is the probability that all four phones are busy?(2)what is the
probability that atleast two of them are busy?
May/June.2013

05.The number of monthly breakdowns of a computer is a random variable having a poisson


distribution with mean equal ti 1.8.Find the probability that this computer will function for a
month (1) without a braekdown (2)with only one breakdown. Nov./Dec. 2017

PROBLEM RELATED TO GEOMETRIC DISTRIBUTIONS

01. If the probability that an applicant for a driver’s license will pass the road test on any
given trial is 0.8, what is the probability that he will finally pass the test
(i) On the fourth trial and Ans: P( x  4)  0.0064
(ii) In less than 4 trials. Ans: P( x  4)  0.992
April/May2010 April/May2015

02. Prove the memory less property of the geometric distribution.

PROBLEM RELATED TO UNIFORM DISTRIBUTIONS

01. Find the MGF and hence the mean and variance of the uniform distribution.

e bt  e at ba (b  a) 2
M X t   , mean  , var iance 
Ans: t (b  a) 2 12

A random variable X is uniformly distributed over (0,10).find (1)p(X<3),P(X>7)and


02.
P(X<5)(2)P(X=7).
May/June.2013

03.A random variable Y is defined as 𝑐𝑜𝑠𝑛𝜋,where X has a uniform probability density


1 1
function over (− 2 , 2).Find the mean and S.DApril/May2017

PROBLEM RELATED TO EXPONENTIAL DISTRIBUTIONS

01. Find the MGF of the two parameter exponential distribution whose density function is
   x  a 
given by f ( x )   e  , x  a and hence find the mean and variance.

 e  a e  a
Ans: M X t   , EX  
 t 
April/May2010

02. The time in hours required to repair a machine is exponentially distributed with parameter
 1 2 .
(i) What is the probability that the repair time exceeds 2 hours?Ans:
P  X  2  0.3679
(ii) What is the conditional probability that a repair takes atleast 10 hours given that its
duration exceeds 9 hours? Ans: P  X  10| X  9  P  X 1  0.6065

May/June.2012

e  x , for0  x  
f ( x)  
06.The random variable X has exponential distribution with  0, otherwise Find
the density function of the variable given by (1)Y=3X+5 (2)Y=X 2
Nov./Dec. 2012
07. The length of time a person speaks over phone follows exponential distribution with
mean 6 mins. What is the probability that the person will talk for (1) more than 8 mins, (2)
between 4 and 8 mins.
May/June.2016

08.Suppose X has an exponential distribution with mean equal to 10.Determine the value of x
such that 𝑝(𝑋 < 𝑥 ) = 0.95. April/May2017
PROBLEM RELATED TO GAMMA DISTRIBUTIONS

01. Define Gamma distribution and find its mean and variance of the same.
 
Ans: mean  , var iance  2
 
Nov./Dec. 2014, Nov./Dec. 2013May/June.2013,Nov./Dec. 2017
02. The daily consumption of milk in excess of 20,000 liters is approximately distributed as
1
gamma random variable with parameter k  2,   . If the city has a daily stock of
10,000
30,000 liters on a given day, find the probability that the stock is insufficient.
Ans: px  10,000  0.7357
03. Find moment generating function of the Gamma distribution. Hence find its Mean and
Variance.

Ans: M X t   1  t


, mean 



, var iance  2

04. Define the mgf of a random variable? Derive the mgf,mean,variance and the first four
moments of a gamma distribution.
May/June.2014
05. In a certain city, the daily consumption of electric power in millions of Kilowatt – hours
can be considered as a random variable following gamma distribution with parameters 𝜆 =
1
and 𝛼 = 3. If the power plant in this city has a daily capacity of 12 million Kilowatt hours,
2
what is the probability that this supply of power will be insufficient on any given day?
May/June.2016

PROBLEM RELATED TO NORMAL DISTRIBUTIONS

01. Assume that the radiation of a person’s oxygen consumption during a period of
Transcendental Meditation (T.M) is a continuous random variable X normally distributed
with mean 37.6 cc/min and S.D 4.6 cc/min. determine the probability that during a period
of T.M a person’s oxygen consumption will be reduced by
(i) At least 44.5 cc/min Ans: P X  44.5  0.0668
(ii) At most 35.0 cc/min Ans: P X  35  0.2877
(iii) Anywhere from 30.0 to 40.0 cc/min. Ans: P30  X  40  0.65
Nov./Dec. 2012

02. Given that X is distributed normally, if P X  45  0.31 and P X  64  0.08 find the
mean and standard deviation of the distribution. Ans:   50,   10
May/June.2012

03. If X and Y are independent random variables following N( 8, 2 )and N ( 12, 4 3


)respectively, find the value of  such that P 2 X  Y  2   P X  2Y    .
26
Ans:   April/May2011
3
04. The marks obtained by a number of students in a certain subject are assumed to be
normally distributed with mean 65 and standard deviation 5. If 3 students are selected at
random from this group, what is the probability that two of them will have marks over 70?
Ans: P X  70  0.1587, 3C 2 p 2 q  0.06357 April/May2011 April/May2010
05.Let X and Y be independent normal variates with mean 45 and 44 and standard deviation
2and 1.5 respectiively.what is the probability that randomly chosen values of X and Y differ
by 1.5 or more?
Nov/Dec 2011
06. In a normal distribution, 31% of items are under 45 and 8% of items are over 64. Find
the mean
and standard deviation of the distribution. Nov./Dec. 2015
07.In a test on 2000 electric bulbs,it was found that the life of a philips bulbs was normally
distributed with an average of 2400 hours and S.D of 60 hours.Estimate the number of bulbs
likely to burn for(i) more than 2150 hours,(ii) less than 1950 hours. Nov./Dec. 2017
05. 08.A manufacturer produces covers where weight is normal with mean 𝜇 =
1.950 𝑔 𝑎𝑛𝑑 𝑆. 𝐷. 𝜎 = 0.025 𝑔. The covers are sold in lots of 1000.How many covers in
a lot may be heavier than 2g? April/May2017

PROBLEM RELATED TO FUNCTION OF A RANDOM VARIABLE

01. If X is uniformly distributed in (-1,1), then find the probability density function of
X
Y  sin .
2

h y
1
;  1 y 1
y 2
Ans:  1 y
April/May2011

02. If X is uniform random variable in the interval(−2, 2). Find the PDF of Y  X and EY 

hY  y   Ey   1
1
,
Ans: 2 Nov./Dec. 2011

UNIT 2

(TWO DIMENSIONAL RANDOM VARIABLES)

PART –A

1. Let X and Y be continuous random variable with joint probability density function
x( x  y )
f xy ( x, y )  ,0  x  2, x  y  x
8

y
and f xy ( x, y )  0 elsewhere find f y ( ) Nov./Dec. 2010 April / May.2011
x
x

Ans:
x( x  y )
Given, f xy ( x, y )  ,0  x  2, x  y  x
8
x( x  y )
x x
x3
f ( x)  
x
f ( x, y )dx  
x
8
dx 
4
x( x  y )
f ( x, y ) 8 1
f Y ( y / x)   3
 3 ( x  y)
X
f ( x) x 2x
4

2. State central limit theorem for two random variables.

Nov./Dec. 2010 May/June.2012may/June.2014

Ans:

If X , X , X , ....... X the random variables have the same distribution with mean  and
1 2 3 n
variance  2 then the R.V S  X  X  X  .......  X , follows a normal distribution
n 1 2 3 n
with mean n and variance n 2 , i.e S   n , n 2 
n  
3.Find the value of k,if f(x,y)=k(1-x)(1-y) in 0<x,y<1 and f(x ,y)=0 otherwise is to be the
joint density function.

April / May 2010

Ans:
 

  f ( x, y)dxdy  1
  
1 1

  k (1  x)(1  y)dxdy  1
0 0
1 1
k  (1  x)dx  (1  y )dy  1
0 0

 1  1 
k     1
 2  2 
k4

4. The joint probability density function of a two dimensional R.V x, y  is given by
f x, y   k 6  x  y ;

0  x  2; 2  y  4 Find K April / May 2010


Ans:
Given f x, y   k 6  x  y ; 0  x  2; 2  y  4

To find K:-

  f x, y dxdy  1
x y

2 4
k   6  x  y dxdy  1
0 2

4
2
 y2 
k  6 y  xy   dx  1
0 
2 2

2
 16 4
k  24  4 x   12  2 x  dx  1
0 
2 2

2
k  6  2 x dx  1
0


k 6x  2x
2

2
2

0
 1
k 12  4  1

8k  1

1
k
8

e  ( x  y ) , x  0, y  0
5. If the point of (X,Y) is f xy ( x, y )   ,check whether X and Y are
 0, otherwise
independent.

Nov./Dec. 2011

Ans:

e ( x  y ) , x  0, y  0
Given, f xy ( x, y)  
 0, otherwise

f ( x)   e ( x  y ) dy  e  x
0

f ( y )   e ( x  y ) dx  e  y
0

f ( x ) f ( y )  e  x e  y  e  ( x  y )  f ( x, y )

6. The regression equations of X on Y and Y on X are respectively 5x-y = 22


and 64x-54y = 24.find the means of X and Y. Nov./Dec. 2011

Ans:
Since both the regression equation pass thro. (x,y)
5x-y = 22………….(1)
64x-45y =24……….(2)
From (1) and (2)
X=6 and y=8.
7. Find the acute angle between the two lines of regression assuming the two lines off
regression.

APRIL / MAY.2011 Nov./Dec. 2012

Ans:

6
 ( x  y 2 ),0  x  1,0  y  1
8. Find the marginal density function off X and Y if f ( x, y )   5
 0, otherwise
Nov./Dec. 2012

Ans:
 
6 6 1
f ( x)   f ( x, y )dy   ( x  y 2 )dy  ( x  )
0 0
5 5 3
 
6 6 1
f ( y )   f ( x, y )dx   ( x  y 2 )dx  ( y 2  )
0 0
5 5 2
9.Let X and Y be two discrete random variables with joint probability mass unction
 1
( 2 x  y ), , x  1,2andy  1,2
P( X  x, Y  y )  18 .find the marginal probability mass
 0, otherwise
function of X and Y.

May/June.2012

Ans:

 1
( 2 x  y ), , x  1,2andy  1,2
Given, P( X  x, Y  y )  18
 0, otherwise

Y 1 2 Px(X)=Pi*

1 3/18 4/18 7/18

2 5/18 6/18 11/18

Py(y)=P*j 8/18 10/18 1

The marginal probability mass function of X and Y are

P(X=1) =7/18

P(X=2) =11/18&

P(Y=1) =8/18

P(Y=2) =10/18

10. The joint pdf of the random variables (x,y) is given by f ( x, y )  kxye( x  y2 )
2
,x>0,y>0.find
the value of k

Nov./Dec. 2013

Ans:
Given f x, y   kxye x  y2  x  0. y  0
2

To find K:

  f x, y dxdy  1
X Y
 
 dxdy  1
  Kxye
 x2  y2

x 0 y 0


K   xyex  y2 dxdy  1
2

0 0

Put y 2  t; 2 ydy  dt; ydy  dt


2

2  
 
K  xe  x  1  e t dt dx  1
2
0  0 

 

K  xe  x  1 e dx  1
2 t 

2  1 0
0  


xe x 0  1dx  1
2
2
K
0

2
 x2
K xe dx  1
0

4
K e t dt  1
0

K
4
e  1  1t 

K e  1 t 

4 1 0

K  1; K  4
4

11. Comment on the statement:”ifCOV(X,Y)=0,then X and Y are uncorrelated”.


Nov./Dec. 2013 Nov./Dec. 2014

Ans:

(i) If X and Y are independent the COV(X,Y) =0 then X and Y are correlated.
(ii) (ii) If COV(X,Y)=0 then X and Y are uncorrelated and Y need not be
independent.
12. The joint pmf of the random variables (x,y) is given by
kxy, x  1,2,3 : y  1,2,3
p X ,Y ( x, y )   ,find the value of k. May/June.2013
 0, otherwise

Ans:

Given,

kxy, x  1,2,3 : y  1,2,3


p X ,Y ( x, y )  
 0, otherwise

1 2 3

1 K 2k 3k

2 2k 4k 6k

3 3k 6k 9k

Total probability=1

36k=1

K=1/36

x2
13. The joint pdf of the random variables (x,y) is given by f xy ( x, y )  xy 2 
8
,0≤x≤2,0≤y≤1.find P(X<y). May/June.2013

Ans:

x2
Given, f xy ( x, y)  xy 2 
8
1 y
x2
p( X  Y )    xy 2  dxdy
0 0
8
y
1
 2 x2  1
 y4 y3  53
p( X  Y )    xy   dy     dy 
0 
8 0 0 
2 24  480

14. Define the joint pmf of a two dimensional discrete random variable.
Nov./Dec. 2014

Ans:
P( X  x, Y  y )  P( x, y ) provided
 p( x, y)  1,0  p( x, y)  1
x y

15. State the basic properties of joint distribution of (x,y) when X and Y are random
variables.May/June.2014

Ans:

1.F (, )  1
2.F (,)  0, F (, y )  0, F ( x,)  0,
3.F ( x 2 , y 2 )  F ( x1 , y 2 )  F ( x1 , y 2 )  F ( x 2 , y1 )  P( x1  X  x 2 ; y1  Y  y 2
2+𝑦 2)
16. Find the value of 𝑘, if 𝑓 (𝑥, 𝑦) = 𝑘𝑥𝑦𝑒 −(𝑥 ∶ 𝑥 ≥ 0 , 𝑦 ≥ 0 is to be a joint probability
density function.
∞ ∞ 2+𝑦 2)
Ans:𝑘 ∫0 ∫0 𝑥𝑦𝑒 −(𝑥 𝑑𝑥𝑑𝑦 = 1 April. / May 2015
∞ 2 ∞ 2
𝑘[∫0 𝑥𝑒 −𝑥 ][∫0 𝑦𝑒 −𝑦 ] = 1 _______________ (1)

∞ 𝑑𝑡 1 𝑒 −𝑡 1
∫0 𝑒 −𝑡 2
= 2 [ −1 ] = 2
0

11
(1) ⇒ 𝑘 2 2 = 1 ⇒ 𝑘 = 4

17. What is the angle between the two regression lines?


April. / May 2015
𝜎𝑥 𝜎𝑦 1−𝑟 2
Ans: 𝑡𝑎𝑛𝜃 = 𝜎 2 2
[ ]
𝑥 𝜎𝑦 𝑟

18. Let (𝑋, 𝑌) be a two dimensional random variable. Define covariance of (𝑋, 𝑌). If 𝑋 and 𝑌
are independent,

what will be the covariance of (𝑋, 𝑌)? May / June 2016

Ans: 𝑋, 𝑌 are independent, then 𝐸 (𝑋𝑌) = 𝐸 (𝑋). 𝐸(𝑌)

𝐶𝑜𝑣 (𝑋, 𝑌) = 0
1
, 0 < 𝑥, 𝑦 < 2
19. If the joint pdf of (𝑋, 𝑌) is 𝑓(𝑥, 𝑦) = {4 . Find 𝑃(𝑋 + 𝑌 ≤ 1) .
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
May / June 2016
1 1−𝑦 1
Ans: 𝑃(𝑋 + 𝑌 ≤ 1) = ∫0 ∫0 𝑑𝑥𝑑𝑦
4

1 1−𝑦
= ∫0 [𝑥 ]0 𝑑𝑦
1
1 1 𝑦2 1
∫0 1 − 𝑦 𝑑𝑦 = [𝑦 − ] =
4 2 0 8

20. The regression equations are 3𝑥 + 2𝑦 = 26 𝑎𝑛𝑑 6𝑥 + 𝑦 = 31.Find the means of X and
Y. April/May.2017
Ans:
21. Find k if the joint probability density function of a bivariate r.v.(X,Y) is given by
𝑘(1 − 𝑥 )(1 − 𝑦), 𝑖𝑓 0 < 𝑥 < 1,0 < 𝑦 < 1
𝑓 (𝑥, 𝑦) = { Nov/Dec.2017
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Ans: If f(x,y) is a joint p.d.f then

∞ ∞
∫ ∫ 𝑓 (𝑥, 𝑦)𝑑𝑥 𝑑𝑦 =1
−∞ −∞

1 1
∫ ∫ 𝑘(1 − 𝑥 )(1 − 𝑦)𝑑𝑥 𝑑𝑦 = 1
0 0

1 1
𝑘 ∫ (1 − 𝑥 )𝑑𝑥 ∫ (1 − 𝑦) 𝑑𝑦 = 1
0 0

1 1
𝑘 (1 − − 0) (1 − − 0) =1
2 2
𝑘 = 4.

PART - B

PROBLEM RELATED TO MDF&CDF

01. If X and Y are independent Poisson random variables with parameters  1 and  2 .
Calculate the conditional distribution of X, given that X + Y = n.
r n r
     
Ans: PX  r / X  Y  n  nc r  1   2 
 1   2   1   2  April/May2011

02. The joint PDF of a two dimensional random variable is given by


 2 x2
x y  , 0  x  2 ,0  y  1
f x , y    8 . Compute
0,
 otherwise
   
   
PY  1  , P X  1|Y  1  , P X Y  1  ,
 2  2
Ans: PY 1 / 21 / 4, 5 / 6, Nov./Dec.2012May/June.2014
03. If the joint distribution function of X and Y is

1  e  x  e
  y  e x  y  : x  0 , y  0
F  x ,y   





, Find
 0 : otherwise

x y
(i) Marginal densities of X and Y.Ans: f ( x )  e , & f ( y )  e ,
(ii) P x  1, y  1 Ans: p( x 1, y 1)  0.3996
 
(iii) P   x y   1 Ans: p( x  y 1)  0.2642
(iv) P x  1  and check whether X and Y are independent.
Ans: P x  1   0.6321
 

April/May2015
04. The joint PDF of the random variable (X, Y) is given by

  x 2  y 2 



f x, y  k x y e 









 : x  0, y  0 . Find


0 

: otherwise
i. Find k Ans: k  4
ii. Find Cov  X ,Y  Ans: Cov x, y   0
iii. Prove that X and Y are independent
May/June2012

05. The joint probability density function of the two dimensional RV is



 8

 x y : 1 x  y  2
f  x, y    9
 
.


0 : otherwise

i. Find the marginal density functions of X and Y

Ans: f ( x) 
4x
9
 
4  x 2 ,1  x  2 & f ( y ) 
4y 2
9
 
y  1 , 1 y  2

ii. Find the conditional density function of Y given X.


Ans: f  y  
2y
April/May2010Nov./Dec.2011
 x  4  x2

06. Two random variables X and Y have the JPDF given by


k 1  x 2 y 


 : 0  x  1, 0  y  1
f x ,y  








 


0 

: otherwise
i. Find the value of ‘k’ Ans: k  6 / 5

ii. Obtain the marginal probability density functions of X and Y


Ans: f x  
3
5
 
2  x 2 , f  y   3  y 
2
5
iii. Also find the correlation coefficient between X and Y.
Ans: r   0.125 Nov./Dec.2010
07. Find the bivariate probability distribution of (X,Y) given below. Find the marginal
distributions, conditional of X given Y = 1 and conditional distribution of Y given X = 0.
y 5 6
1 2 3 4
x
0 0 0 1/32 2/32 2/32 3/32
1 1/16 1/16 1/8 1/8 1/8 1/8

2 1/32 1/32 1/64 1/64 0 2/64

April/May2010
16.The joint density of X and Y is given by p x, y   k (2 x  3 y ) ,x=0,1,2,y=1,2,3.find the
marginal and
conditional distribution. Nov./Dec.2013 Nov./Dec.2014
1
( ) ( )
17. The joint probability mass function of (𝑋, 𝑌) is given by 𝑝 𝑥, 𝑦 = 72 2𝑥 + 3𝑦 , 𝑥 =
0,1,2and 𝑦 = 1,2,3. Find all the marginal and conditional probability functions of 𝑋and 𝑌.
Nov./Dec.2015
( ) ( ) −(x+y)
18.The joint pdf of X, Y id f x, y = e , x, y ≥ 0. Are X and Y
independent?Nov./Dec.2015

19.The waiting times X and Y of two customers entering a bank at different times are
−𝑥
𝑓 (𝑥 ) = { 𝑒 , 𝑖𝑓 𝑥 > 0 and
assumed to be independent random variables with p.d.f s 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑒 −𝑦 , 𝑖𝑓 𝑦 > 0 𝑋
𝑓(𝑦) = { .Find the joint p.d.f of 𝑈 = 𝑋 + 𝑌, 𝑉 = 𝑋+𝑌. Nov./Dec.2017
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
( )
20. If X and Y are independent random variables with p.d.f s 𝑓 𝑥 =
𝑒 −𝑥 , 𝑖𝑓 𝑥 > 0 𝑒 −𝑦 , 𝑖𝑓 𝑦 > 0
{ and 𝑓(𝑦) = { .Find the joint p.d.f of 𝑉 = 𝑋 + 𝑌, 𝑈 =
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑋
.Check whether U and V are April/May2017
𝑋+𝑌 independent random variables.
24𝑥𝑦; 𝑥 > 0, 𝑦 > 0, 𝑥 + 𝑦 ≤ 1
21.The joint PDF of (X,Y) is given by 𝑓 (𝑥, 𝑦) = { .Find the
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
conditional mean and variance of Ygiven X. April/May2017

ROBLEM RELATED TO COVARIANCE


Find the covariance of X and Y, if the random variable has the joint PDF
01.
x  y , 0  x, y  1
f x , y    Ans: Cov  X ,Y    1/ 144
0, otherwise
April/May2010
−5𝑦
02. The joint pdf of a random variable (𝑋, 𝑌) is 𝑓 (𝑥, 𝑦) = 25𝑒 , 0 < 𝑥 < 0.2, 𝑦 > 0. Find
the covariance of 𝑋 and 𝑌. Nov. / Dec 2015
03. Let (𝑥, 𝑦) be a two dimensional non – negative continuous random variable having the
joint density.
2
−(𝑥 +𝑦 ) 2
𝑓 (𝑥, 𝑦) = {4𝑥𝑦𝑒 , 𝑥 ≥ 0 , 𝑦 ≥ 0, Find the density function of 𝑈 = √𝑥 2 + 𝑦 2.
0, 𝑂𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
May. / June 2016
04. The join pdf of the random variable (X,Y) iff. (x, y) = (x + y), 0 ≤ x ≤ 1,0 ≤ y ≤ 1, find
cov(X,Y) Nov./Dec.2017
1
𝑓 (𝑥, 𝑦) = {3 (𝑥 + 𝑦); 0 ≤ 𝑥 ≤ 1 .Find the
05. Two random variables have the joint PDF 0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
correlation coefficient and regression lines.
April/May2017

PROBLEM RELATED TO CORRELATION COEFFICIENT

01. The independent variables X and Y have the probability density functions given by
4ax , 0  x  1 4ay , 0  y  1
f x    and f  y    . Find the correlation coefficient
0, otherwise 0, otherwise
between X + Y and X – Y. Ans: r  0
May/June2013
02. The joint probability density function of the two dimensional random variable (X,Y) is
2  x  y , 0  x , y  1
f x , y    . Find the correlation coefficient between X and Y.
0, otherwise
Ans: r  1 / 11 Nov./Dec.2011
03. Calculate the Correlation coefficient between height of father (x ) and height of son ( y )
65 66 67 67 69 68 70 72
Ans: r  0.6030
67 68 65 68 72 72 69 71
April/May2015
04. If X and Y are uncorrelated random variables with variances 16 and 9. Find the
correlation co efficient between X + Y and X – Y Ans: r  0.28

May/June2012

05. If the independent random variables X and Y have the variances 36 and 16 respectively,
5
find the coefficient of correlation between X+Y and X–Y Ans: r 
13
Nov./Dec.2012

PROBLEM RELATED TO REGRESSION

01. The regression equation of X on Y is 3Y – 5X + 108 = 0. If the mean value of Y is 44 and


the variance of
the X is 9/16th of the variance Y. Find the mean value of X and the correlation coefficient.
Ans: 48, r  0.8 April/May2011May/June2013
02. In a partially destroyed laboratory record onlu the lines of regressions and variance of 𝑥
are available. The regression equations are 8𝑥 − 10𝑦 + 66 = 0 and 40𝑥 − 18𝑦 = 214 and
variance of 𝑥 = 9. Find
i. The correlation coefficient between 𝑥 and 𝑦
ii. Mean values of 𝑥 and 𝑦
iii. Variance of 𝑦. May. /June 2016

PROBLEM RELATED TO TRANSFORMATION OF RANDOM VARIABLES

1, 1  x  2
01. If X and Y are independent random variables with density function f x   
0, otherwise
y
 , 2 x4
and f  y    6 find the density function of Z = XY. Ans:
0 , otherwise

1
 z  2, 2  z  4
6
f z    April/May2011
 1 8  z , 4  z  8

12
02. If X and Y are independent random variables with probability density functions
f  x   4 e  4 x , x  0; f  y   2 e  2 y , y  0; respectively
X
i. Find the density function of U  and V  X  Y .
X Y
Ans: f u, v   8 v e 2uvv 
ii. Are U and V independent?
iii. What is PU  0.5
Nov./Dec.2012

 x y : 0 x, 0 y
03. If the JPDF. of a RV (X, Y) is f  x, y  



. Find the density function of


0 : otherwise
U  X Y

u ,
2
0  u 1
f u   

2u  u , 1  u  2
2
Ans:

April/May2015May/June2012
x y
04. If X and Y are independent random variables with PDF f  x   e , x  0 and f  y   e , y0 .
Find the PDF for X – Y (or)
If X and Y are independent exponential random variables each with parameter 1. Find the PDF
of U = X – Y
f u   e u , u  0
1
Ans: 2
Nov./Dec.2011Nov./Dec.2013
  x  x 
  1 2 ,x ,x 0
05. If the JPDF is given f x1 , x 2   e 1 2 , find the probability of
0, otherwise
X
Y 1
X X
1 2
Ans: f Y   1
If X and Y are independent continuous random variables, show that the PDF of U = X + Y is

given by hu    f v  f u  v  dv

Nov./Dec.2010
06. The random variables 𝑋 and 𝑌 each follow exponential distribution with parameter 1 and
are independent.
Find the pdf of 𝑈 = 𝑋 − 𝑌.Nov./Dec 2015
07. Three balls are drawn at a rando, without replacement fom a box containing 2 white, 3red
and 4 black balls. If 𝑥 denotes the number of white balls drawn and 𝑦 denotes the numbere of
red balls drawn, find the joint probability distribution of (𝑥, 𝑦). May. /June 2016

PROBLEM RELATED TO CENTRAL LIMIT THEOREM

01. State and prove Central Limit Theorem.


May/June2013Nov./Dec.2013
Nov./Dec.2014
02. A sample of size 100 is taken from a population whose mean is 60 and variance is 400.
Using central limit theorem, with what probability can assert that the mean of the sample
Ans: p x    4  0.9544

will not differ from   60 by more than 4.
April/May2010
03. The life time of particular verity of electric bulbs may be considered as a random variable
with mean 1200 hours and standard deviation 250 hours. Using central limit theorem finds
the probability that the average life time of 60 bulbs exceed 1250 hours. Ans:
px 1250  0.0606 April/May2011 Nov./Dec.2014
04. If V , i  1. 2, ...20 are independent noise voltages received in an adder and V is the sum of
i
voltage received, find the probability that the total incoming voltage V exceeds 105, using
central limit theorem. Assume that each of the random variables V is uniformly distributed
i
over (0, 10).
Ans: pS n 105  0.3483 Nov./Dec.2010
05. If X , X , X , ....... X are uniform variates with mean = 2.5 and variance = 3/4, use CLT
 
1 2 3 n
to estimate P 108  S  126 where S  X  X  X  .......  X , n  48
n n 1 2 3 n

Ans: P 108  S  126  0.5328
n
 Nov./Dec.2011
06. Let X , X , X , ....... X be Poisson variates with parameter   2 . Let
1 2 3 n

1 2 3 n n

S  X  X  X  .......  X , where n  75 , find P 120  S  160 using CLT.
n

Ans: p120  S n 160  0.7868 May/June2012

UNIT 3

(RANDOM PROCESSES)

PART –A

1. Consider the random process X (t )  cos(t   ) where  a random variable with density
function is
1  
f ( )  ,   Check whether or not the process is wide sense stationary.
 2 2 .
Nov./Dec. 2010
Ans:
Given, X (t )  cos(t   ) , f ( )  1 ,      
 2 2

E ( X (t ))   X (t ) f ( )d


2
1
  cos(t   )  d

2

2
 cos t

= not a constant.
The process is not wide sense stationary .

2. State the postulates of a Poisson process.


Nov./Dec. 2010 April / May.2011,Nov./Dec. 2017
Ans:

i. Poisson process is Markov process.


ii. The sum of independent Poisson processes is a Poisson process.
iii. The difference of two independent Poisson processes is not a Poisson process.

3. Define a WSS process.


April / May .2010 May/June.2013 May/June.2012,Nov./Dec. 2017,April / May .2017
Ans:

A random process X (t ) is said to be wide sense stationary process if it satisfies the


following conditions
i. The mean of the process is constant (i.e.) EX t   cons tan t
ii. Its auto correlation function depends only on the time difference
(i.e.) EX t X t     RXX    f ( )
4. Define a Markov chain and give an example. April / May .2010
Ans:

A discrete parameter Markov process is called a Markov chain. (Or)


For all n,
PX t n   x n / X t n1   x n1, X t n2   x n2 .............X t1   x1,   PX t n   x n / X t n1   xn1 
then the process is called a Markov chain. (a1 , a 2 , ...a n ,...) is called the states of the
Markov chain.

5. When is a random process said to be mean ergodic? Nov./Dec. 2011


Ans:

A random process is said to be Ergodic Random process if its ensemble averages


T
are equal to appropriate time averages. i.e. E X (t )  X T  lim  X t .dt
1
T  2T
T

6. Is a Poisson process a continuous time Markov chain? Justify your answer.


April / May 2010
Ans:
Yes, Poisson process have a continuous parameter’s and X i  is discrete.
7. Define the transition probability matrix. Nov./Dec. 2011 April / May 2010
Ans:
TPM: When the Markov chain is homogeneous, the one step transition probability is
denoted by Pij . The matrix P  Pij  is called transition probability matrix satisfying
the conditions.

and  ij
Pij  0 P  1 for all i, j

5 1
8. If the initial state probability distribution of a Markov chain is P ( 0 )   and the
 6 6 
transition probability
0 1
Matrix is  1 1  .find the probability distribution of the chain after 2 steps.
 2 2 
May/June.2012
Ans:
5 1
P (0)  
Given  6 6 
0 1
p  1 1
 2 2 
Let
5 1   0 1   1 11 
p (1)  p ( 0) p   1 1  
6 6   12 12 
 2 2  
 1 11   10 1 
1  
11 13 
p ( 2)  p (1) p   
 
12 12   2 2   24 24 

9. Prove that a first order stationary process has a constant mean. April / May.2011
Ans:
Consider a random process X(t) at two different instants t1 and t2.

E ( X (t1 )   xf

x ( x, t1) dx


E ( X (t 2 )   xf

x ( x, t 2) dx

Let t2=t1+C


E ( X (t 2 )   xf

x ( x, t1  c)dx


E ( X (t 2 )   xf

x ( x , t1 ) Its value must be a constant.

E ( X (t 2 )  E ( X (t1 )

10. Define a Strictly stationary random process. Nov./Dec. 2012


Ans:

A random process is called a SSS process if the joint distribution of


X (t1 ), X (t 2 ),... X (t n ) is the same as that of X (t1  h), X (t 2  h),... X (t n  h) for all
t1 , t 2 ,....t n
11. Prove that sum of two independent Poisson processes is again a Poisson process.
Nov./Dec. 2012
Ans:
Let X(t) =X1(t)+X2(t)

n
P ( X (t )  n )   [ P( X
r 0
1 (t )  r ][ P ( X 2 (t )  n  r ]
n
e 1t (1 (t )) r e 2t (2 (t )) n  r
 
r 0 r! ( n  r )!
e ( 1 2 ) n
n! (1 (t )) r (2 (t )) n  r

n!

r 0 r! ( n  r )!
e ( 1 2 )
 (1t  2 t ) n
n!
X (t) =X1(t)+X2(t) is a Poisson distribution with parameter λ 1+ λ2

12. Define random variable. Nov./Dec. 2013


Ans:
A random variable is a function of the possible outcomes of an experiment.
13. DefineMarkov process. Nov./Dec. 2013 Nov./Dec. 2014
Ans:

If the future behavior of a process depends only the present state but not on past,
then the process is called a Markov process.
i. e A random process is said to be a Markov Process if for any
t1  t 2  t 3 ........  t n .
PX t n   x n | X t n 1   x n 1, X t n 2   x n  2 ............. X t1   x1, 
 PX t n   xn | X t n1   xn1 

14. Define Stochastic Process. Nov./Dec. 2014


Ans:
In a square matrix the sum of all the elements of each row is 1 ,is called a Stochastic
Process.

15. Explain any two applications function of a binomial process. May/June.2014


Ans:

Binomial process is defined as a sequence of partial sums S n  ; n  1,2,3.. where


S n  X 1  X 2  ...  X n
with the following assumptions.
i. The time is assumed to be divided into unit intervals. Hence it is
discrete time process.
ii. At most one arrival can occur in any interval
iii. Arrivals can occur randomly and independently in each interval with
probability P.

16. Define SSS Process. Nov/Dec.2015

Ans: If a random process is stationary to all order then the random process is said to be strict
sense stationary

process.

17.Write down any two properties of Poisson process. Nov/Dec.2015

Ans: The Poisson process is a Markov process:

(i) The Poisson process possesses the Markov property.


(ii) Sum of two independent Poisson processes is a Poisson processes.

(iii) Difference of two independent Poisson processes is not a Poisson process.

18. Define stationary process. May/June.2016

Ans: A random process is called stationary to order one, if its first order density function
does not change with a shift in time origin.

19. Define Markov process. May/June.2016

Ans :Theprocess whose future behavior cannot be accurately predicted from its past behavior
(except the

current or present behavior) and which involves random chance or probability is called
Markov Process.

Behavior of a business or economy, flow of traffic, progress of an epidemic, all are examples
of Markov processes.

20.If the customers arrive at a bank according to a poisson process with mean rate 2 per
minute,find the probability that during a 1-minute interval no customer arrives,

PART –B

PROBLEM RELATED TO STATIONARY PROCESS

01. Determine a stationary stochastic process. If X (t ), t  T  is a process with probability


distribution.
 at n 1
 , n 1, 2, 3.....
 1  at n 1
PX t   n  Verify whether a stationary process.
 at
 , n0
1  at
E[ X (t )] 1  const
Ans:
Ver[ X (t )]  2at  const

Nov./Dec. 2010 Nov./Dec. 2011 Nov./Dec. 2012 May/June.2014 Nov./Dec. 2014

02. If X (t )  A cos t  B sin t , where A and B are two independent normal random variables
 2 2
 
with EA  0  EB, E A    E B and  is a constant, prove that X (t ) is a strict
2

sense stationary process of order 2.


Ans: RXX (t, t   )  RXX (t  h, t  h   )
April / May.2011
PROBLEM RELATED TO WSS PROCESS

01. Show that the random process X (t )  A sin( t   ) is WSS, where A and  are constants
and  is uniformly distributed in 0, 2 
E[ X (t )]  0  const
Ans: A2 April / May .2010
R XX (t , t   )  cos  
2
02. If X (r )  Y cos t  Z sin t for all‘t’ where Y and Z are independent binary random
variables, each of which assumes the values – 1 and 2 with the probabilities 2/3 and 1/3
respectively, prove that X (r ) is wide sense stationary.
E[ X (t )]  0  const
Ans:
R XX (t , t   )  2 cos 
April / May.2011 May/June.2013

03. Show that the random process X (t )  A cos(0 t   ) is WSS process where A, and  0 are
constants and  is uniformly distributed random variable in 0, 2  .
E[ X (t )]  0  const
Ans: A2
R XX (t , t   )  cos  0 
2
Nov./Dec. 2011

 
04. If X t  is a WSS process with auto correlation R   A e , determine the second order
moment of the random variable X 8  X 5 .

Ans: V U   2 A 1  e
3

May/June.2012

05.Mention any three properties each of auto correlation and of cross correlation functions of
a WSS.

May/June.2013
06.If the two random variables Ar and Br are uncorrelated with zero mean and
n
E ( A )  E ( B )   ,show that the process X (t )   ( Ar cos t Br sin t ) is WSS.what are
2
r
2
r
2
r
r 1

the mean and autocorrelation of X(t)?


Nov./Dec. 2014 Nov./Dec. 2013

07.Examine whether the random process {𝑋(𝑡)} = 𝐴 cos(𝑤𝑡 + 𝜃)is a wide sense stationary if
Aand w are constants and 𝜃 is uniformly distributed random variable in (0,2𝜋)
Nov./Dec. 2017
PROBEM RELATED TO ERGODIC PROCESS
01. The random binary transmission process X (t ) is a WSS process with zero mean and

Auto correlation function R   1  , where T is a constant. Find the mean and variance
T
of the time average of X (t ) over 0, T  . Is X (t ) mean Ergodic.
Ans: lim Ver[ X T ]  2  0
T  3
April / May .2010

02. Given that WSS random process X (t ) 10 cos(0 t   ) where  is uniformly distributed
over   ,   . Prove that the process X (t ) is correlation Ergodic?
R( )  50 cos( 0 )
Ans:
lim Z T  50 cos( 0 )
T 

NOTE: The Same problem they may ask by putting  0  100


Nov./Dec. 2010 May/June2012 Nov./Dec. 2012 May/June.2014

03. A random process has sample functions of the form X ( t )  A cos( t   ) , where  is
constant, A is a random variable with mean zero and variance one and  is a random
variable that is uniformly distributed between 0 and 2 . Assume that the random variables
A and  are independent. Is X t  a mean – Ergodic process?

April / May.2011
PROBLEM RELATED TO MARKOV PROCESS

01. The transition probability matrix of a Markov chain X n  , three states 1, 2, and 3 is
 0.1 0.5 0.4
P  0.6 0.2 0.2 and the initial distribution is P 0   0.7 0.2 0.1. Find
0.3 0.4 0.3
1. PX 2  3 And Ans:
PX 2  3  0.279
2. PX 3  2, X 2  3, X 1  3, X 0  2 Ans:
PX 3  2, X 2  3, X 1  3, X 0  2  0.0048

April / May .2010

02.Usinglimitingbehaviour of homogeneous markov chain,find steady state probability of the


0.1 0.6 0.3
chain given by transcation probability matrix, 𝑝 = (0.5 0.1 0.4). April /
0.1 0.2 0.7
May.2017

PROBLEM RELATED TO POISSON PROCESS


State the Postulates of a Poisson process and derive the probability distribution. Also
01. prove that the sum of two independent Poisson processes is a Poisson process.
Nov./Dec. 2011 May/June.2013 Nov./Dec.
2013

02. If the process X t  ; t  0 is a Poisson process with parameter  obtain P X t   n . Is the


process first order stationary?

Nov./Dec. 2010 Nov./Dec. 2012 May/June.2014

03. Suppose that customers arrive at a bank according to a Poisson process with mean rate of
2 per minute. Find the probability that the interval between 2 consecutive arrival is
i. More than 1 minute
Ans: PT  1  0.135
ii. Between 1 minute and 2 minute and
Ans: P1  T  2  0.117
iii. 4 minute or less.
Ans: PT  4  0.999
May/June.2012

04. Assume that the number of messages input to a communication channel in an interval of
duration t seconds, is a Poisson Process with mean rate 0.3. compute
i. The probability that exactly 3 messages will arrive during 10 second interval.
Ans:
PX ( 10 )  3  0.0747

ii. The probability that the number of message arrivals in an interval of duration 5
seconds is between 3 and 7.
7
Ans:  P X ( 5 )  i   0.1910
i 3

April / May .2010

05.Prove that the interval between two succeve occurrences of a poisson process with
1
parameter  has an exponential distribution with mean

April / May.2011
06.Thereare 2 whitemarbles in Urn A and 3 red marbles in Urn B.At each step of the process,
a marble is selected from each urn and the 2 marbles selected are interchanged. The state of
the related markov chain is the number of red marbles in urn A after the interchange. What is
the probability that there are 2 red marbles in urn A after 3 steps? In the long run, what is the
probability that there are 2 red marbles in urn A?
April/May2015
07.A radioactive source emits particles at a rate of 5 per minute in accordance with
Poissonprocess.Each particle emitted has a probability 0.6 being recorded.Find the
probability that 10 particles are recorded in 4 minute period.

April/May2015
08. Suppose that customers arrive at a bank according to a Poisson process with mean rate of
3 per minute. Find the probability that during the interval of 3 mins
i. Exactly four customers arrive.
ii. Greater than 4 customers arrive
iii. Fewer than 4 customers arrive. Nov./Dec. 2015
09. A man either drives a car or catches a train to go to office each day. He never goes two
days ina row by train.
But he drives one day, then the next day is just as likely to drive again as he is to travel by
train. Now suppose
that on the first day of the week, the man tossed a fair dive and drove to work if and only if a
6 appeared.
Find the probability that he takes a train on the fourth day and the probability that he
drives to work on the
fifth day. Nov./Dec. 2015
10. Prove that the difference of two independent Poisson processes is not a Poisson process.
May/June.2016
11.A fisherman catches a fish at a poisson rate of 2 per hour from a large lake with lots of
fish.If he starts at 10.00 a.m.What is the probability that he catches one fish by 10.00 a.m and
three fishes by noon?
April / May.2017

PROBLEM RELATED TO GAUSSION PROCESS

01. If is a Gaussian process with mean  t   10 and C  t1 , t 2   16e 


t1 t 2
, find the probability
that
i. X 10  X 6  4 Ans:
P X 10  X 6  4  0.5222
ii. X 10 8 Ans: PX 10 8  0.3085
April / May.2011 Nov./Dec. 2013
0.2 
02. Suppose that X (t ) is a Gaussian Process with  x  2 , R XX    5e  . Find the
Probability that X 4 1
Ans: PX 4  1  0.8413 May/June.2012

PROBLEM RELATED TO SINE WAVE PROCESS

01. Prove that a random telegraph signal process Y t    X t  is a Wide sense Stationary
Process when  is a random variable which is independent of X t  , assumes values – 1
2 t t
and 1 with equal probability and , R XX t1 ,t 2   e  1 2

Nov./Dec. 2010 Nov./Dec. 2012 May/June.2014

02. Define a semi random telegraph signal process and prove that it is evolutionary

May/June.2013
03. Define a random telegraph signal process and prove that it is WSS.
Nov./Dec. 2013 Nov./Dec. 2014 April / May.2015

PROBLEM RELATED RANDOM TELEGRAPH PROCESS

01. Define semi random telegraph signal process and prove that it is an evolutionary process.
Nov./Dec. 2015
02. Prove that a random telegraph signal process 𝑦(𝑡) = 𝛼𝑥(𝑡) is a WSS process, where 𝛼 is
a random variable which is independent of 𝑥(𝑡), assumes values −1 and 1 with equal
probability and 𝑅𝑥𝑥 (𝑡1 , 𝑡2 ) = 𝑒 −2𝜆|𝑡1 −𝑡2 | .
03.Define random telegraph signal process and prove that it is an wide sense stationarys.
Nov./Dec. 2017
( )
04. Prove that a random telegraph signal process 𝑦 𝑡 = 𝛼𝑥(𝑡) is a WSS process

April / May.2017

UNIT 4

(CORRELATION AND SPECTRAL DENSITIES )

PART –A

1. Find the variance of the stationary process X(t) whose auto correlation function is given by
2 
Rxx ( )  2  4e Nov./Dec. 2010 Nov./Dec. 2012
Ans:
2 
Given, Rxx ( )  2  4e
2 2 
( X )  lim Rxx ( )  lim 2  4e 2
   

Mean =2
E ( X 2 (t ))  Rxx (0)  2  2
var( X (t ))  E ( X 2 (t ))  ( E ( X (t ))) 2  2  2  2  2
2. State any two properties of cross correlation function. Nov./Dec. 2010
Ans:

Properties of Cross Correlation Function:


i. If the process X t  and Y t  are orthogonal then RXY    0
ii. If the process X t  and Y t  are independent, then the Auto Covariance is
zero.
9
3. The auto correlation function of a stationary random process is R xx ( )  16  .find
1  6 2
the mean and
Variance of the process. April / May .2010 April / May.2011 May/June.2012
Ans:
9
Given, R xx ( )  16 
1  6 2
2 9
( X )  lim Rxx ( )  lim 16   16
    1  6 2
Mean =4
E ( X 2 (t ))  Rxx (0)  16  4  20
var( X (t ))  E ( X 2 (t ))  ( E ( X (t ))) 2  20  16  4
4. Find the power spectral density function of the stationary process whose autocorrelation
function is given by e   April / May .2010
Ans:

Given Rxx ( )  e

S XX     R   e
XX
i  
d


e

 e  i   d

0 

e d   e  e i   d
 i  
 e
 0

1 1
 
1  i 1  i
2

1  2

5. Find the variance of the stationary Ergodic process X(t) whose auto correlation function iis
4
given by Rxx ( )  25  . Nov./Dec. 2011 May/June.2014
1  6 2
Ans:

6. Prove that for a WSSprocess (t), Rxx (t, t   ) is an even function of 


Nov./Dec. 2011 April / May.2011 Nov./Dec. 2012
Ans:


R XX    E X t X t    

R XX     E X t X t    
put , t    p
t  p 

R XX     E X  p   X  p  
R XX     E X  p X  p   
R XX     R XX  

7. Define power spectral density function. Nov./Dec. 2013 May/June.2012


Ans:

The power spectral density S XX   of a continuous time random process X t  is


defined as the Fourier

Transform of RXX   AS


i.e. S XX     R  eXX
i  
d


8. State wiener khintchin theorem. Nov./Dec. 2013 Nov./Dec. 2014

Ans:

Statement: Let X t  be a real WSS process with power spectral density S XX () . Let X T t 
be the portion of the process X t  in the time interval –T to T.
 X t ,  T  t  T
X T t   
0, otherwise
Let X T   be the Fourier transform of X T t  then prove that

S XX    lim
1
T  2T
E X T  
2
 
9. A random process X(t) is defined by X(t)=Kcoswt ,t>0 where w is a constant and kis
uniformly distributed

Over (0,2).find the auto correlation function of X(t). May/June.2013

Ans:

1
 , in (0,2)
f k    2
0, otherwise
X(t)=kcoswt

X (t   )  k cos  (t   )


R XX    E X t X t    
R XX    E k cos t k cos  (t   
2
R XX    cos t cos  (t   )  k 2 dk
1
0
2

R XX   
4
cos t cos  (t   )
3

10. Define cross correlation function of X(t) and Y(t) .when do you say that they are
independent? May/June.2013

Ans:
The cross correlation function of the two random process X t  and Y t  is
defined by
RXY t1 , t 2   EX t1 .Y t 2 

11. Write any two properties off auto correlation. Nov./Dec. 2014

Ans:
If X t  is WSS then
i. RXX   is an even function
ii. RXX    RXX 0
iii. 
R XX 0  E X 2 t  
Auto correlation function RXX   is periodic function.

12. Define Cross Correlation function and state any two of its properties. May/June.2014

Ans:
The cross correlation function of the two random process X t  and Y t  is defined by
RXY t1 , t 2   EX t1 .Y t 2 

Properties of Cross Correlation Function:


i. If the process X t  and Y t  are orthogonal then RXY    0
ii. If the process X t  and Y t  are independent, then the Auto Covariance is
zero.
13. The auto correlation function of a stationary process with no periodic components is
4
R XX (τ) = 25 + .
1+6τ2

Find the mean value of the process X(t).

Ans:
4
Given R XX (τ) = 25 + 1+6τ2

4
̅]2 = lim [25 +
We know that lim R XX (τ) = [X ]
τ→∞ 1+6τ2
τ→∞

4
= 25 + ∞ = 25 +0 = 25

Mean value of the process ̅


X=5

32. Prove that the spectral density of a real random process is an even function.Nov./Dec.
2015

Ans: We have 𝑠𝑋𝑋 (𝜔) = ∫−∞ 𝑅𝑋𝑋 (𝜏)𝑒 −𝑖𝜔𝜏 𝑑𝜏

𝑠𝑋𝑋 (−𝜔) = ∫ 𝑅𝑋𝑋 (𝜏)𝑒 𝑖𝜔𝜏 𝑑𝜏
−∞

−∞
𝑠𝑋𝑋 (−𝜔) = ∫ 𝑅𝑋𝑋 (−𝑢)𝑒 𝑖𝜔(−𝑢) (−𝑑𝑢)

−∞
= −∫ 𝑅𝑋𝑋 (−𝑢)𝑒 𝑖𝜔(−𝑢) 𝑑𝑢


= ∫ 𝑅𝑋𝑋 (−𝑢)𝑒 𝑖𝜔(−𝑢) 𝑑𝑢
−∞


= ∫ 𝑅𝑋𝑋 (−𝜏)𝑒 𝑖𝜔(−𝜏) 𝑑𝜏
−∞

Since 𝜏 is a dummy variable, = 𝑅𝑋𝑋 (−𝜏)

Since 𝑅𝑋𝑋 (𝜏) = 𝑅𝑋𝑋 (−𝜏)



𝑠𝑋𝑋 (−𝜔) = ∫ 𝑅𝑋𝑋 (𝜏)𝑒 −𝑖𝜔𝜏 𝑑𝜏 = 𝑠𝑋𝑋 (𝜔)
−∞

Hence the power spectral density is even.

33. Prove that R XY (τ) = R YX (−τ). May/June.2016

Ans: R.H.S = 𝑅𝑌𝑋 (−𝜏) = 𝑅𝑌𝑋 (𝑡 + 𝜏, 𝑡)

= 𝐸 [𝑌(𝑡 + 𝜏)𝑋(𝑡)] = 𝐸[𝑋(𝑡)𝑌(𝑡 + 𝜏)]

= R XY (τ) =L.H.S

01. 34.State any two properties of cross-power density spectrums. April / May .2017
Ans: (1) The spectral density function of a real random process is an even function.

(2)A wide-sense stationary random process has a non-negative power density


spectrum.

PART - B

Problem Related to Auto Correlation Functions

02. Find the Auto Correlation function of the periodic time function X t   Asin t.
April / May .2010
03. Show that R XX    R XX 0 Nov./Dec. 2012
04. Define auto correlation and state the properties of ACF. Nov./Dec. 2012
05. A Stationary random process has an Auto Correlation function and is given by
25 2  36
R XX    . Find the mean and variance of the Process.
6.25 2  4
Ans: EX ( t )  2 & VarX ( t )  5 April / May .2010
06. If X t and Y t  are zero mean and stochastically independent random processes having
Auto Correlation function RXX    e and RYY    cos 2 respectively. Find the auto


correlation function of
i. W t   X t   Y t  and Z t   X t   Y t  Ans:
RW W    e

 cos 2
RZZ    e

 cos 2
RW Z    e

 cos 2
ii. The cross correlation function of W t  and Z t 
April / May .2010

07. Find the mean and variance of auto correlation function of the Poisson process.
May/June.2014
08. Prove that the random process X(t) and Y(t) defined by X(t)=Acoswt+Bsinwt and
Y(t)=Bcoswt-ABsinwt are jointly wide sense stationary. May/June.2014
Problem Related to Cross Correlation Functions

01. If X t  and Y t  are two WSS process, then show that R XY    R XX 0.RYY 0.
Nov./Dec. 2010

02. Two random processes X t  and Y t  are given by X t   A cost    and


Y t   A sin t    where A and  are constants and  is uniform random variable over
0, 2  . Find the cross correlation of X t  and Y t  and verify that RXY     RYX  
A2 A2
Ans: R XY    sin  & RYX     sin  May/June.2013
2 2

03. X t   3 cos t    and Y t   2 cos   t     are two random process where  is a
 2
random variable uniformly distributed in 0, 2  . prove that R XY    R XX 0.RYY 0.
April / May .2010

Problem Related To R XX τ  To SXX ω

01. State and prove Wiener – Khintchine theorem.


Nov./Dec. 2010 April / May.2011 Nov./Dec. 2011 Nov./Dec. 2012 May/June.2013
May/June.2014
02. A stationary random process X t with mean 2 has the Auto Correlation function
 1

R   4  e 10
. Find the mean and variance of Y   X t  dt
0

Ans: EY ( t )  2 & VarY ( t )  1 May/June.2012


03. Find the Power Spectral Density function whose Auto Correlation is given by
A2
R   cos 0  
2
 A2
Ans: S XX        0       0  May/June.2012
2
04. The Auto correlation of a random telegraph signal process is given by R   A2 e
2 
.
Determine the power spectral density of the random telegraph signal.
4 A2
Ans: S XX    Nov./Dec. 2013
4 2   2
05. Find power spectral density of WSS process with Auto correlation R   e  
2

 
Ans: S XX   
2
4a
e April / May.2011 Nov./Dec. 2014

06. Find the power spectral density of binary transmission process, whose Auto Correlation
 
1  :   T
function is R    T Ans:
 0, : otherwise

 T 
4 sin 2  
S XX     2 
T 2
April / May .2010 Nov./Dec. 2014 April / May .2010
07. Find the power spectral density of binary transmission process, whose Auto Correlation
1   :   1
function is R   
 0, : otherwise
 
4 sin 2  
2
Ans: S XX   
 2

Nov./Dec. 2010 Nov./Dec. 2012, Nov./Dec. 2017


08. If X (t )  A cos pt  B sin pt , where A and B are two independent normal random variables
2
 2 2
 
with EA  0  EB, E A    E B . Find the power spectral density of the
process.

Ans: S XX        p      p 
2
Nov./Dec. 2014
2
09. Find power spectral density of WSS process with Auto correlation 𝑅 (𝜏) = 𝑒 −𝑎𝜏 𝑐𝑜𝑠𝜔0 𝜏.
April / May .2017

10.The Auto Correlation function of a random process is given by


 2 :  

R    2     . Find the power spectral density of the process.
    1   , :   
    
2 
4 sin 2  
 2 
Ans: S XX    2      
2

4
Nov./Dec. 2011 Nov./Dec. 2013

Problem Related To SXX ω To R XX τ 

b
 a    :   a
01. If the power spectral density of a WSS process is given by S XX     a .
 0, : a

Find the Auto correlation of the process.
Ans: R XX    sin 2 a / 2
2b
Nov./Dec. 2013 Nov./Dec. 2014,Nov./Dec. 2017
a  2
02. Find the Auto correlation function of the process X t  for which the power density
1   : for  1
 2

spectrum is given by S XX    

 0, for   1
2  sin  cos  sin  
Ans: R XX     2  3  April / May .2010,April / May.2017
     
2  9
03. Given the power spectral density of a continuous process as S XX    4 . Find
  5 2  4
the mean square value of the process.

Ans: R XX 0  
11
12
Nov./Dec. 2011 April / May .2010

04. The power spectral density function of a zero mean WSS process X (t ) is given by
1,    0

S XX     . Find R  and show that X (t ) and X (t   ) are uncorrelated.
0
 0,    0

sin 0
Ans: R XX   

April / May .2011
1 − |τ| , if |τ| ≤ 1
05.The autocorrelation function of an ergodic process x(t) is R XX (τ) = { .
0 , Otherwise
Obtain the spectral density of x(t). May/June.2016

06.If{x(t)} and {y(t)} are two random processes with autocorrelation functions R XX (τ)and
R YY (τ) respectively and jointly WSS, then prove that |R XY (τ)| ≤ √R XX (0). R YY (0). Establish
any two properties of autocorrelation function R XX (τ). May/June.2016

Problem Related to Cross Power spectral densities


01. The Cross power spectrum of real random process and is given by
a  j b  : for  1

S XY     . Find the Cross Correlation function.

 0, : for   1
1  a sin  b cos  b sin  
Ans: R XY     
     2 
Nov./Dec. 2010 April / May.2011 Nov./Dec. 2011,Nov./Dec. 2017,April / May.2017

02. The Cross Correlation function of two Processes X t  and Y t  is given by

R XY t , t    
AB
sin  0    cos  0 2t    where A, B, and 0 are constants. Find the
2
Cross Power Spectrum S XY  
 i AB
Ans: S XY       0      0   May/June.2012
2
03. Let X t  and Y t  be both zero mean and WSS random processes consider the random
process Z t  defined by Z t   X t   Y t  . Find
i. The Auto Correlation function and the Power Spectrum of Z t  if X t  and
Y t  are jointly WSS.
Ans: S ZZ    S XX    SYY    S XY    SYX  
ii. The Power Spectrum of Z t  if X t  and Y t  are orthogonal.
Ans: S ZZ    0
May/June.2012, Nov./Dec. 2017
The Cross power spectrum of real random process and is given by
 j b
a  : for       ,   0
S XY      where α and b are constants.Find the Cross
 0, : for   1

Correlation function.
May/June.2013,

04. Define spectral density of a stationary random process X(t).Prove that for a real
random process X(t) the power spectral density is an even function. May/June.2013
05. Two random processes {X(t)}and {Y(t)} are defined as {X(t)} = Acos(ωt + θ) and
{Y(t)} = Bsin(ωt + θ) , where A, B and ω are constants and θ is uniformly distributed
random variable over (0,2π) . Find the cross correlation function of {X(t)} and
{Y(t)}.Nov./Dec. 2015
1
06. The power spectrum of a WSS process {X(t)}is given by S(ω) = . Find its
(1+ω2 )2
autocorrelation functionR(τ). Nov./Dec. 2015

08. If{Y(t)} = X(t + a) − X(t − a), Prove thatR YY (τ) = 2R XX (τ + 2α) − R XX (τ − 2α).

Hence prove that 𝑆𝑌𝑌 (𝜔) = 4𝑠𝑖𝑛2 𝛼𝜔𝑆𝑋𝑋 (𝜔). Nov./Dec. 2015
09.The autocorrelation function of the random telegraph signal process is given by R(τ) =
α2 e−2γ|τ| .

Determine the power density spectrum of the random telegraph signal.Nov./Dec. 2015

UNIT 5

(LINEAR SYSTEMS WITH RANDOM INPUTS )

PART – A

1. IfY(t) is the output of an linear time invariant system with impulse response h(t) then find
the cross

Correlation of the input function X(t) and output function Y(t). Nov./Dec. 2010

Ans:

The cross Correlation of the input function X(t) and output function Y(t) are

RXY    RXX    h , RYY    RXY    h  


2. Define linear time invariant system.April / May.2010 May/June.2013 Nov./Dec. 2013

Ans:

If Y(t+h)=f[X(t+h)],where Y(t)= f[X(t)],then f is called a time invariant system

3. State the auto correlation function of the white noise. April / May.2010

Ans:

N0
The auto correlation of the white noise is given by RNN    E t  .
2

4. State any two properties of linear time invariant system. Nov./Dec. 2011

Ans:

Two properties of Linear Time – Invariant system is



i. If the input X t  and output Y t  are related by Y  t    h  u  X  t  u  du ,


then the system is a linear time invariant system.


ii. If the input time invariant linear system is a WSS process, then the output will
also be a WSS process.

5. If X (t) and Y(t) in the system y (t )   h(u) X (t  u)du are WSSprocess,how are their


auto correlation Function related. Nov./Dec. 2011

Ans:

Given, X (t) and Y(t) in the system y (t )   h(u) X (t  u)du


The auto correlation function related to X(t) and Y(t) is

RYY    RXX   h  h  

6. Find the system transfer function,if a linear Time system has an impulse function
1
 :t c
H ( t )   2c

 0: t  c

April / May..2011 Nov./Dec. 2012

Ans:
1
 :t c
Given, an impulse function H (t )   2c

 0: t  c

sin c
The system transfer function is H   
c


7. Prove that the system y (t )   h(u) X (t  u)du

is a linear time invariant system.

May/June.2012

Ans:

8. What is unit impulse response of a system ?why is it called so? May/June.2012

Ans:

if a system is of the form Y t    hu  X t  u  du , then the system weighting function


ht  is also called unit impulse response of the system. It is called so because the response
(output) Y t  will be hu , when the input X t   the unit impulse function  t 

9. Define white noise process Nov./Dec. 2013 April / May.2011 Nov./Dec. 2014

Ans:

A sample function of n ( t ) a wide sense stationary noise random process N ( t ) is


called white noise if the power spectrum of N t  is a constant at all frequencies.

Usually, we define the constant spectral density of white noise by,


N
S NN    0 , Where N 0 is a real positive constant.
2
10. State the convolution form of the out put of a linear time invariant system.
May/June.2013
Ans:

The output Y(t) is expressed as a convolution of the input X(t) with a system
weighting function h(t).

ie. Y t    hu  X t  u  du


11.the autocorrelation function for a Stationary Ergodic process with no periodic component
4
is Rxx ( )  25  .find the mean and variance of the process X(t).
1  6 2
Nov./Dec. 2014

Ans:

12. Define a system.when is it called a linear system? May/June.2014

Ans:

The system is said to be a linear system if satisfy the following condition.

f [a1 X 1 (t )  a2 X 2 (t )]  f a1 X 1 (t )  f a2 X 2 (t )

13. Define Band Limited White noise.Nov./Dec. 2010 Nov./Dec. 2012 May/June.2014

Ans:

Noise having a non-zero and constant power spectrum over a finite frequency band
and zero

Everywhere else is called band – limited white noise.


 N0
(i.e.) S NN     2   B

0, otherwise
14. Prove that Y(t) = 2X(t) is linear. April / May.2015

Ans: Let 𝑦1 (𝑡) and 𝑦2 (𝑡) be output signals to input signals 𝑥1 (𝑡)and 𝑥2 (𝑡).

i.e, 𝑦1 (𝑡) = 2𝑥1 (𝑡) and 𝑦2 (𝑡) = 2𝑥2 (𝑡)


For any scalars 𝑐1 and 𝑐2 , the output signal for input signal 𝑥(𝑡) = 𝑐1 𝑥1 (𝑡)+𝑐2 𝑥2 (𝑡)
is given by

𝑦(𝑡) = 2𝑥(𝑡) = 2[𝑐1 𝑥1 (𝑡)+𝑐2 𝑥2 (𝑡)]

= 𝑐1 (2𝑥1 (𝑡))+𝑐2 2(𝑥2 (𝑡))

= 𝑐1 𝑦1 (𝑡) + 𝑐2 𝑦2 (𝑡)is linear.

15. State the relation between input and output of a linear time invariant system.

April / May.2015

Ans: Let𝑋 (𝑡)and 𝑌(𝑡) be the input and output of a linear time invariant system.

Then the relation between them is given by 𝑌(𝑡) = 𝑋 (𝑡) ∗ ℎ(𝑡)

16. Define transfer function of a system.Nov / Dec. 2015

PART-B

PROBLEM RELATED TO INPUT OUTPUT MULTI SYSTEMS

01. For a linear system time invariant system with X t  and impulse response ht  . Find an
expression for the output auto correlation function. Establish the relation between the
spectrum of random input signal and the spectrum of output signal. Ans:
R XY    R XX    h , RYY    R XY    h  , S YY ( )  S XX ( ) H  
2

April / May.2010 Nov./Dec. 2011


02. If the input of a time invariant stable linear system is a WSS process, then show that the
output will also be aWSS process. Also find RXY ( )

Nov./Dec. 2010 Nov./Dec. 2011 Nov./Dec. 2012 May/June.2014 April / May.2015


03. A LTI system has an impulse response ht   e .ut  . Find the output Power Spectral
 t

Density and auto correlation function RYY   corresponding to an input X t  Ans:



RYY    .R XX   u  du
1

 u
e
2 0
Nov./Dec. 2010 Nov./Dec. 2012 May/June.2014

04. Show that the power spectral densities of the input and output processes in the linear
system are connected by the relation S YY    H ( ) S XX   , where H ( ) is the Fourier
2

transform of unit impulse response function ht 


Nov./Dec. 2011 May/June.2013 April / May.2015, April / May.2017
X t  is an input voltage to a circuit and Y t  is the output voltage. X t is a stationary
random process with zero mean and correlation R   e 2  . Find the mean Y t  of and
1
power spectral density if its system function is H ( )  .
j  2
E Y (t )  0
Ans: Nov./Dec. 2010
S YY   
4
4    2 2

05. A WSSprocess X t with R   Ae where A and  are real positive constants is
 

applied to the input of a linear time invariant system with ht   e .U t  where b is a real
bt

positive constant. Find the power spectral density of the output of the system.

2A
Ans: S YY   
   2 b 2   2 
2

April / May.2011 April / May.2015

06. X t  is the input voltage to a circuit (system) and Y t  is the output voltage X t is a
stationary random process with  x  0 and RXX    e . . Find  y , S YY  , and RYY  ,
 

R
if the power transfer function is H ( )  .
R  iL 

Ans:
2 R2
E Y (t )   y  0, S YY   
 
 2   2 R 2  L2 2
 R 
  
 R    L 
RYY     
  R L  1
e  e
 

 L  2 R 
2
R2
  L2  2

 
2
L Nov./Dec. 2013 May/June.2014
07. If X t  is a band limited process such that S XX    0 when    prove that
2RXX 0  RXX     2 2 RXX 0 April / May.2010
08. Show that the cross correlation function between the input X t  and the output Y t  of a
linear system is given by RXY    RXX    h  and also Prove that
S XY    S XX    H   May/June.2012
1
09. Consider the system with transfer function H (  )  . An input signal with Auto
1  j
Correlation function m     m 2 is fed as input to the system. Find the mean and mean –
square value of the output.

 m
2

Ans: E Y t   m , E Y 2 t   m 2  . April / May.2011 May/June.2012
10. A stationary random process X t  having the Auto Correlation RXX    A   is applied
to a linear system at time t  0 where f   represent the impulse function. The linear
system has the impulse response of h t   e  bt u t  where u t  represents the units step
function. Find RYY   . Also find the mean and variance of Y t 

Ans: RYY    e , E Y t   0, V Y t  
A b  A
2b 2b
April / May.2011 May/June.2012

11. If X t  is the input voltage to a circuit and Y t  is the output voltage. X t  is a stationary
 2
random process with  x  0 and R XX    e . Find the mean  y and power spectrum
1
SYY   of the output if the system transfer function is given by H ( )  .
2  i
Ans: EY t   0, sYY   
4
Nov./Dec. 2012
4   
2 2

t

12. A linear system is described by the impulse response h t   e RC u t  .
1
Assume an
RC
input process whose Auto Correlation function is B    . Find the mean and Auto

EY t   0, RYY   
B  RC
e
Correlation function of the output process. Ans: 2RC
April / May.2011 Nov./Dec. 2014

23.A random process X(t) is the input to a linear system whose impulse function is h(t)=2e-
 2
t;t>0.The auto correlation function of the process is R XX    e .Find the power spectral
density of the output process(t).
May/June.2013

3
24.A wide sense stationary process N(t) has an auto correlation function RNN    P e

where P is a constant.Find its power spectrum. May/June.2013


25.Prove that the spectral density of any WSS process is non negative. Nov./Dec. 2013
2
26. Check whether the following system are linear (1)y(t)=tx(t)(2)y(t)=x (t).Nov./Dec. 2014

27.The power spectral density of a signal x(t) is Sx(w) and its power is P.Find the power of
the signal(t).
Nov./Dec. 2014.
h t  
1
28.A circuit has an impulse response given by ;0  t  T Express Syy(w) in terms of
T
sxx(w).
April / May.2015

29. If {X(t)} is a WSS process and if Y(t) = ∫−∞ h(u)(t − u)du, prove that
Nov./Dec. 2015,Nov./Dec. 2017
(i) R XY (τ) = R XX (τ) ∗ h(−τ)and

(ii) R YY (τ) = R XY (τ) ∗ h(τ)where * denotes convolution.

(iii) SXY (ω) = SXX (ω)H ∗ (ω)whereH ∗ (ω) is the complex conjucate of H(ω).

(iv)SYY (ω) = SXX (ω)|H(ω)|2 .

30. A Random process X(t) is the input to a linear system whose I,pulse response is h (t) =
2e−t , t ≥ 0.

If the autocorrelation fuction of the process is R XX (τ) = e−2|τ| , determine the cross
correlation

fuctionR XY (τ) between the imput process X(t) and the output process Y(t) and the cross
correlation

fuctionR YX (τ)between the outputprocess Y(t) and the imput process X(t).Nov./Dec. 2015
31. A linear time invariant system has an impulse response h(t) = e−Bt U(t). Find the power
spectral density of the output Y(t) corresponding to the input X(t). May/June.2016
32. Assume a random process X(t) is given as input to a system with transfer fuction
H(W) = 1 for −w0 < 𝑤 < w0 . If the auto correlation function of the input process is
N0
δ(T), find the autocorrelation fuction of the output process. May/June.2016
2
1
;0 ≤ t ≤ T
33. A circuit has unit impulse response given by h (T) = { T . Evaluate
0 ; otherwise
SYY (w) interms of SXX (w). May/June.2016

34. A system has an impluse response ℎ(𝑡) = 𝑒 −𝛽𝑡 𝑈(𝑡) .find the power spectral density of
the output Y(t) corresponding to the input X(t). Nov./Dec. 2017
35. If X(t) is the input voltage to a circuit and Y(t) is the output voltage, {X(t) } is a stationary
random process with 𝜇𝑥 = 0,and 𝑅𝑋𝑋 (𝜏) = 𝑒 −𝛼|𝑡| .Find 𝜇𝑦 ,𝑠𝑦𝑦 (𝑤)and 𝑅𝑦𝑦 (𝑇),if the power
𝑅
transfer function is 𝐻 (𝜔) = 𝑅+𝑖𝐿𝜔 . Nov./Dec. 2017

35.If a system is connected by a convolution integral 𝑌 (𝑡) = ∫−∞ ℎ(𝑢)𝑋(𝑡 − 𝑢)𝑑𝑢 where
X(t) is the input and Y(t) is the output then prove that the system is a linear time invariant
system.
April / May.2017
36. If X(t) is the input voltage to a circuit and Y(t) is the output voltage, X(t) } is a stationary
{
random process with 𝜇𝑥 = 0,and 𝑅𝑋𝑋 (𝜏) = 𝑒 2|𝑡| .Find 𝜇𝑦 ,𝑠𝑦𝑦 (𝑤)and 𝑅𝑦𝑦 (𝑇),if the power
1
transfer function is 𝐻 (𝜔) = 𝜔+𝑖 2 . April / May.2017
PROBLEM RELATED TO WHITE NOISE

01. If N t  is a band limited white noise centered a carrier frequency  0 such that
 N0
 :   0   
S NN     2 . Find the auto correlation N t 
0 : otherwise

N 0 B  sin  B 
Ans: RNN     . cos  0
2   B 
April / May.2010 April / May.2011 May/June.2012
02. If Y t   A cos0 t     N t , , where A is a constant,  is a random variable with a
uniform distribution in   ,   and N t  is a band limited Gaussian white noise with a
power spectral density
 N0
 , for    0   B A2
S NN     2 , Ans: S YY     (  0 )   (  0 )  S NN  
 2
0, elsewhere
Find the power spectral density of Y t  . Assume that N t  and  are independent.
April / May.2010 Nov./Dec. 2010Nov./Dec. 2012 Nov./Dec. 2013 May/June.2014
N
03. A white Gaussian Noise X t  with zero mean and Spectral density 0 is applied to a low
2
– pass RC filter shown in the figure. Determine the Auto Correlation of the output Y t 

RC

Input X t  Output Y t 


N 
RYY    0 e RC
Ans: 4 RC

Nov./Dec. 2011

CS8491 COMPUTER ARCHITECTURE


UNIT-I BASIC STRUCTURE OF A COMPUTER SYSTEM
PART-A

1. Define Computer Architecture.

 It is concerned with the structure and behavior of the computer.

 It includes the information formats, the instruction set and techniques for addressing
memory.

2. Define Computer Organization.

 It describes the function and design of the various units of digital computer that
store and process information.
 It refers to the operational units and their interconnections that realize
the architectural specifications.

3. What are the components of a computer.

 Input unit

 Memory unit

 Arithmetic and Logic Unit

 Output unit

 Control unit

4. Draw the block diagram of computer.

What is Execution time/Response time?

Response time also called execution time. The total time required for the computer
to complete a task, including disk accesses, memory accesses, I/O activities, operating
system overhead, CPU execution time, and so on.
5. What is CPU execution time, user CPU time and system CPU time?
CPU time : The actual time the CPU spends computing for
a specific task. user CPU time: The CPU time spent in a
program itself.
system CPU time: The CPU time spent in the operating system performing
tasks on behalf the program.

6. What is clock cycle and clock period?


clock cycle :The time for one clock period, usually of the processor clock,
which runs at a constant rate.
clock period :The length of each clock cycle.

6. Define CPI
The term Clock Cycles Per Instruction Which is the average number of
clock cycles each instruction takes to execute, is often abbreviated as CPI.
7.State and explain the performance equation?

N denotes number of machine Instructions, Suppose that the average number of


basic steps needed to execute one machine instruction is S, where each basic step is
completed in one clock cycle. If the clock cycle rate is R cycles per second, the processor
time is given by

T = (N x S) / R This is often referred to as the basic performance equation.

8. Define MIPS .

MIPS:One alternative to time as the metric is MIPS(Million Instruction Per Second)

MIPS=Instruction count/(Execution time x1000000).This MIPS measurement is also


called Native MIPS to distinguish it from some alternative definitions of MIPS.

9.Define MIPS Rate:

The rate at which the instructions are executed at a given time.

10. Define Throughput and Throughput rate.

 Throughput -The total amount of work done in a given time.

 Throughput rate-The rate at which the total amount of work done at a given
time.

11. What are the various types of operations required for instructions?

• Data transfers between the main memory and the CPU registers

• Arithmetic and logic operation on data

• Program sequencing and control

• I/O transfers

12. What is a Program?

A program is a set of instructions that specify the operations, operands and


the sequence by which processing has to occur.
13. What is a Computer Instruction?

A Computer instruction is a binary code that specifies a sequence of micro


operations for
the computer.

14. What is a Instruction Code?


An instruction code is a group of bits that instruct the computer to perform a
specific
operation.

15. What is a Operation Code (Opcode)?

The operation code of an instruction is a group of bits that define


operations as add, subtract, multiply, shift and complement etc.

16. Define Instruction Format.

Instructions are represented as numbers .Therefore, entire programs can be


stored in memory to be read or written just like numbers(data).Thus simplifies
software/Hardware of computer systems. Each instruction is encoded in binary called
machine code.

17. What are the Most Common Fields Of An Instruction Format?

 An operation code field that specifies the operation to be performed.

 An address field that designates, a memory address or register.

 A mode field that specifies the way the operand or the effective
address is determined

18. Explain the following the address instruction?

• Three-address instruction-it can


be represented as ADD A,
B, C
Operands a,b are called source operand and c is called destination operand.

• Two-address instruction-it can


be represented as ADD A,
B
• One address instruction-it can be
represented as LOAD A
ADD B STORE C
19. What is the straight-line sequencing?

The CPU control circuitry automatically proceed to fetch and execute instruction,
one at a time in the order of the increasing addresses. This is called straight line sequencing.
20. What is Addressing Modes?

The different ways in which the location of an operand is specified in an


instruction is called as Addressing mode.

21. What are the different types of addressing Modes?


 Immediate mode
 Register mode
 Absolute mode
 Indirect mode
 Index mode
 Base with index
 Base with index and offset
 Relative mode
 Auto-increment mode
 Auto-decrement mode

22. Define Register mode and Absolute Mode


with examples. Register mode
The operand is the contents of the processor register.
The name (address) of the register is given in the instruction.
Absolute Mode(Direct Mode):

 The operand is in new location.


 The address of this location is given explicitly in the instruction.

Eg: MOVE LOC,R2

The above instruction uses the register and absolute mode.


The processor register is the temporary storage where the data in the register are accessed
using register mode.
The absolute mode can represent global variables in the program.

Mode Assembler Syntax Addressing Function

Register mode Ri EA=Ri


Absolute mode LOC EA=LOC

Where EA-Effective Address

23. What is a Immediate addressing Mode? The operand is given explicitly in the
instruction. Eg: Move 200 immediate
It places the value 200 in the register R0.The immediate mode used to specify the value
of source operand.
24.What is a Relative Addressing mode?

It is same as index mode. The difference is, instead of general purpose register,
here we can use program counter(PC).
Relative Mode:

The Effective Address is determined by the Index mode using the PC in place of
the general purpose register (gpr).
This mode can be used to access the data operand. But its most common use
is to specify the target address in branch instruction.Eg. Branch>0 Loop
It causes the program execution to goto the branch target location. It is
identified by the name loop if the branch condition is satisfied.

Mode Assembler Syntax


Addressing Function Relative
X(PC)
EA=[PC]+X 25.Define Auto-
increment addressing mode.

The Effective Address of the operand is the contents of a register in


the instruction. After accessing the operand, the contents of this
register is automatically incremented to point to the next item in the
list.

Mode Assembler syntax Addressing Function


Auto-increment (Ri)+ EA=[Ri]; Increment Ri

26.Define Auto-decrement addressing mode.

The Effective Address of the operand is the contents of a register in


the instruction. After accessing the operand, the contents of this
register is automatically decremented to point to the next item in the
list.

PART-B

1.Explain the Eight ideas of the Computer architects in detail.(8)

2. Explain the components of a computer with the block diagram in detail. (16)

3.Explain the technologies for building computer over time with a neat graph.(6)

4. (i)Explain the chip manufacturing process with a neat diagram in detail.(10)

(ii) Explain the techniques used to measure the performance of a computer.(8)

5.(i)Prove that how performance and execution are inverse to each other.(2)
(ii) If computer A runs a program in 10 seconds and computer B runs the samem program in
15 seconds, how much faster is A than B?(2)

(iii)Write the formula to calculate the CPU execution time for a program.(2)

(iv)Write the formula to calculate the CPU clock cycles.(2)

(v)Write the formula to calculate the classic CPU Performance equation.(2)

6.Explain how clock rate and power are related to each other in microprocessor over years
with a neat graph. (6)

7. Explain the need to switch from uniprocessors to multiprocessors and draw the
performance chart for processors over years . (6)

8. Explain the basic instruction types with examples.(6)

9. (i) Explain the different types of instruction set architecture in detail(6)

(ii)Explain MIPS assembly language notation for arithmetic,Data transfer,logical,conditional


branch and unconditional branch operations.

10. Whatdo you mean by addressing modes? Explain various addressing modes with the help
of examples.(16)

UNIT-II ARITHMETIC FOR COMPUTERS

PART-A

1. State the principle of operation of a carry look-ahead adder.

The input carry needed by a stage is directly computed from carry signals obtained
from all the preceding stages i-1,i-2,…..0, rather than waiting for normal carries to
supply slowly from stage to stage. An adder that uses this principle is called carry
look-ahead adder.

2. What are the main features of Booth’s algorithm?

1) It handles both positive and negative multipliers uniformly.

2) It achieves some efficiency in the number of addition required when the


multiplier has a few large blocks of 1s.

3. How can we speed up the multiplication process?(CSE Nov/Dec 2003)

There are two techniques to speed up the multiplication process:

1) The first technique guarantees that the maximum number of summands that must be
added is n/2 for n-bit operands.

2) The second technique reduces the time needed to add the summands.
4. What is bit pair recoding? Give an example.

Bit pair recoding halves the maximum number of summands. Group the Booth-
recoded multiplier bits in pairs and observe the following: The pair (+1 -1) is
equivalent to the pair (0 +1). That is instead of adding -1 times the multiplicand m at
shift position i to +1 ( M at position i+1, the same result is obtained by adding +1 ( M
at position i.

Eg: 11010 – Bit Pair recoding value is 0 -1 -2

5. What is the advantage of using Booth algorithm?

1) It handles both positive and negative multiplier uniformly.

2) It achieves efficiency in the number of additions required when the multiplier has

a few large blocks of 1’s.

3) The speed gained by skipping 1’s depends on the data.

6. Write the algorithm for restoring division.

Do the following for n times:

1) Shift A and Q left one binary position.


2) Subtract M and A and place the answer back in A.
3) If the sign of A is 1, set q0 to 0 and
add M back to A. Where A-
Accumulator, M- Divisor, Q-
Dividend.

7. Write the algorithm for non restoring division.

Do the following for n times:

Step 1: Do the following for n times:


1) If the sign of A is 0 , shift A and Q left one bit position and subtract M from A;
otherwise , shift A and Q left and add M to A.

2) Now, if the sign of A is 0,set q0 to


1;otherwise , set q0 to0. Step 2: if the sign of A
is 1, add M to A.
8. When can you say that a number is normalized?

When the decimal point is placed to the right of the first (nonzero) significant digit,
the number is said to be normalized.

9. Explain about the special values in floating point numbers.

The end values 0 to 255 of the excess-127 exponent E( are used to represent special
values such
as:

When E(= 0 and the mantissa fraction M is zero the value exact 0 is
represented. When E(= 255 and M=0, the value ( is represented.
When E(= 0 and M (0 , denormal values are represented.

When E(= 2555 and M(0, the value represented is called Not a number.

10. Write the Add/subtract rule for floating point numbers.

1) Choose the number with the smaller exponent and shift its mantissa right a number
of steps equal to the difference in exponents.

2) Set the exponent of the result equal to the larger exponent.

3) Perform addition/subtraction on the mantissa and determine the sign of the result

4) Normalize the resulting value, if necessary.

11. Write the multiply rule for floating point numbers.

1) Add the exponent and subtract 127.

2) Multiply the mantissa and determine the sign of the result .

3) Normalize the resulting value , if necessary.

12. What is the purpose of guard bits used in floating point arithmetic

Although the mantissa of initial operands are limited to 24 bits, it is important to


retain extra bits, called as guard bits.

13. What are the ways to truncate the guard bits?

There are several ways to truncate the guard bits:1) Chooping 2) Von Neumann
rounding 3) Rounding

14. Define carry save addition(CSA) process.

Instead of letting the carries ripple along the rows, they can be saved and introduced
into the next roe at the correct weighted position. Delay in CSA is less than delay
through the ripple carry adder.

15. What are generate and propagate function?

The generate
function is
given by
Gi=xiyi and
The propagate function is
given as Pi=xi+yi.
16. What is floating point numbers?

In some cases, the binary point is variable and is automatically adjusted as


computation proceeds.
In such case, the binary point is said to float and the numbers are called floating point
numbers.

17. In floating point numbers when so you say that an underflow or overflow has
occurred?

In single precision numbers when an exponent is less than -126 then we say that an
underflow has occurred. In single precision numbers when an exponent is less than
+127 then we say that an overflow has occurred.

18. What are the difficulties faced when we use floating point arithmetic?

Mantissa overflow: The addition of two mantissas of the same sign may result in a
carryout of the most significant bit

Mantissa underflow: In the process of aligning mantissas ,digits may flow off the
right end of the mantissa.

Exponent overflow: Exponent overflow occurs when a positive exponent exceeds


the maximum possible value.

Exponent underflow: It occurs when a negative exponent exceeds the maximum


possible exponent value.

19. In conforming to the IEEE standard mention any four situations under which a
processor sets exception flag.

Underflow: If the number requires an exponent less than -126 or in a double


precision, if the number requires an exponent less than -1022 to represent its normalized
form the underflow occurs.

Overflow: In a single precision, if the number requires an exponent greater than -


127 or in a double precision, if the number requires an exponent greater than +1023 to
represent its normalized form the underflow occurs.

Divide by zero: It occurs when any number is divided by zero.

Invalid: It occurs if operations such as 0/0 are attempted.

20. Why floating point number is more difficult to represent and process than
integer?(CSE May/June 2007)

An integer value requires only half the memory space as an


equivalent.IEEEdouble-precision floatingpoint value. Applications that use only integer
based arithmetic will therefore also have significantly smaller memory requirement

A floating-point operation usually runs hundreds of times slower than an


equivalent integer based arithmetic operation.
PART-B

1.Explain the design of ALU in detail.(16)

2.Explain with an example how to multiply two unsigned binary numbers.(8)

3.Describe in detail booth’s multiplication algorithm and its hardware implementation?

4.Explain theWorking of a Carry-Look Ahead adder.(16)

5.Derive and explain an algorithm for adding and subtracting two floating point binary
numbers.(8)

6.Design a 4-bit adder/subtractor circuit using full adders and explain it’s function?(8)

7.Describe the algorithm for integer division with suitable examples.(16)

8. Perform the multiplication using Carry save addition of summands. (6)

9.Perform the integer division using non-restoring and restoring division.(10)

9/4

UNIT-III

PROCESSOR AND CONTROL UNIT

PART-A

1. Define pipelining.
Pipelining is a technique of decomposing a sequential process into sub operations
with each sub process being executed in a special dedicated segment that operates
concurrently with all other segments.

2. Define parallel processing.

Parallel processing is a term used to denote a large class of techniques that are used
to provide simultaneous data-processing tasks for the purpose of increasing the
computational speed of a computer system. Instead of processing each instruction
sequentially as in a conventional computer, a parallel processing system is able to perform
concurrent data

processing to achieve faster execution time.

3. Define instruction pipeline.


The transfer of instructions through various stages of the CPU instruction
cycle.,including fetch opcode, decode opcode, compute operand addresses. Fetch
operands, execute Instructions and store results. This amounts to realizing most (or) all of
the CPU in the form of multifunction pipeline called an instruction pipelining.
4. What are the steps required for a pipelinened processor to process the instruction?

• F Fetch: read the instruction from the memory

• D Decode: decode the instruction and fetch the source operand(s).

• E Execute: perform the operation specified by the instruction.

• W Write: store the result in the destination location

5. What are Hazards?

A hazard is also called as hurdle .The situation that prevents the next instruction in
the instruction stream from executing during its designated Clock cycle. Stall is introduced
by hazard. (Ideal stage)

6. State different types of hazards that can occur in pipeline.

The types of hazards that can occur in the pipelining were,

1. Data hazards.

2. Instruction hazards.

3. Structural hazards.

7. Define Data hazards


A data hazard is any condition in which either the source or the
destination operands of an instruction are not available at the time expected in
pipeline. As a result some operation has to be delayed, and the pipeline stalls.

8. Define Instruction hazards


The pipeline may be stalled because of a delay in the availability of an
instruction. For example, this may be a result of miss in cache, requiring the
instruction to be fetched from the main memory. Such hazards are called as
Instruction hazards or Control hazards.

9. Define Structural hazards?


The structural hazards is the situation when two instructions require
the use of a given hardware resource at the same time. The most common
case in which this hazard may arise is access to memory.

10. What are the classification of data hazards?


Classification of data hazard: A pair of instructions can produce data
hazard by referring reading or writing the same memory location. Assume that i
is executed before J. So, the hazards can be classified as,
1. RAW hazard
2. WAW hazard
3. WAR hazard

11. Define RAW hazard : ( read after write)

Instruction ‘j’ tries to read a source operand before instruction ‘i’ writes it.

12. Define WAW hazard :( write after write)

Instruction ‘j’ tries to write a source operand before instruction ‘i’ writes it.
13. Define WAR hazard :( write after read)

Instruction ‘j’ tries to write a source operand before instruction ‘i’ reads it.

14. How data hazard can be prevented in pipelining?

Data hazards in the instruction pipelining can prevented by the


following techniques. a)Operand Forwarding
b)Software Approach

15. How Compiler is used in Pipelining?

A compiler translates a high level language program into a sequence of machine


instructions. To reduce N, we need to have suitable machine instruction set and a compiler
that makes good use of it. An optimizing compiler takes advantages of various features of
the target processor to reduce the product N*S, which is the total number of clock cycles
needed to execute a program. The number of cycles is dependent not only on the choice of
instruction, but also on the order in which they appear in the program. The compiler may
rearrange program instruction to achieve better performance of course, such changes must
not affect of the result of the computation.

16. How addressing modes affect the instruction pipelining?

Degradation of performance is an instruction pipeline may be due to address


dependency where operand address cannot be calculated without available informatition
needed by addressing mode for e.g. An instructions with register indirect mode cannot
proceed to fetch the operand if the previous instructions is loading the address into the
register. Hence operand access is delayed degrading the performance of pipeline.

17. What is locality of reference?

Many instruction in localized area of the program are executed repeatedly during
some time period and the remainder of the program is accessed relatively infrequently .this
is referred as locality of reference.
18. What is the need for reduced instruction chip?

• Relatively few instruction types and addressing modes.

• Fixed and easily decoded instruction formats.

• Fast single-cycle instruction execution.

• Hardwired rather than micro programmed control

19. Define memory access time?

The time that elapses between the initiation of an operation and completion of that
operation ,for example ,the time between the READ and the MFC signals .This is Referred
to as memory access time.

20. Define memory cycle time.

The minimum time delay required between the initiations of two successive
memory operations, for example, the time between two successive READ operations.
21. Define Static Memories.

Memories that consist of circuits capable of retaining the state as long as power is
applied are known as static memories.

22. List out Various branching technique used in micro program control unit?

a) Bit-Oring

b) Using Conditional Variable

c) Wide Branch Addressing

23. How the interrupt is handled during exception?

* CPU identifies source of interrupt

* CPU obtains memory address of interrupt handles

* PC and other CPU status information are saved

* Pc is loaded with address of interrupt handler and handling program to handle it.

24. List out the methods used to improve system performance.

The methods used to improve system performance are

1. Processor clock
2.Basic Performance Equation
3.Pipelining
4.Clock rate
5.Instruction set
6.Compiler
PART-B

1.Discuss the basic concepts of pipelining.

2.State and explain the different types of hazards that can occur in a pipeline.

3.Draw and explain the modified three-bus structure of the processor suitable for four

–stage pipelined execution. How this structure is suitable to provide four -stage pipelined
execution?

4.What is data hazard?Explain the methods for dealing with the data hazards

5.Describe the data and control path techniques in pipelining.(10)

6.What is instruction hazard?Explain in detail how to handle the instruction hazards in


pipelining with relevant examples.(10)

7.Describe the techniques for handling control hazards in pipelining.(10)

8.Write note on exception handling.(6)

UNIT-IV
PARALLELISM
PART-A

1. What is Instruction Level Parallelism? (NOV/DEC 2011)


Pipelining is used to overlap the execution of instructions and improve
performance. This potential overlap among instructions is called instruction level
parallelism (ILP).

2. Explain various types of Dependences in ILP.


 Data Dependences
 Name Dependences
 Control Dependences

3. What is Multithreading?
Multithreading allows multiple threads to share the functional units of a single
processor in an overlapping fashion. To permit this sharing, the processor must
duplicate the independent state of each thread.

4. What are multiprocessors? Mention the categories of multiprocessors?


Multiprocessor are used to increase performance and improve availability. The different
categories are SISD, SIMD, MIMD.
5. What are two main approaches to multithreading?
 Fine-grained multithreading
 Coarse-grained multithreading
6. What is the need to use multiprocessors?
1. Microprocessors as the fastest CPUs Collecting several much easier than redesigning 1
2. Complexity of current microprocessors
Do we have enough ideas to
sustain 1.5X/yr? Can we deliver
such complexity on schedule?
3. Slow (but steady) improvement in parallel software (scientific apps, databases, OS)
4. Emergence of embedded and server markets driving microprocessors in addition to
desktops Embedded functional parallelism, producer/consumer model
5. Server figure of merit is tasks per hour vs. latency.

7. Write the advantages of Multithreading.


If a thread gets a lot of cache misses, the other thread(s) can continue, taking
advantage of the unused computing resources, which thus can lead to faster overall
execution, as these resources would have been idle if only a single thread was executed. If
a thread cannot use all the computing resources of the CPU (because instructions depend
on each other's result), running another thread permits to not leave these idle.
If several threads work on the same set of data, they can actually share their
cache, leading to better cache usage or synchronization on its values.

8. Write the disadvantages of Multithreading.


Multiple threads can interfere with each other when sharing hardware resources
such as caches
or translation lookaside buffers (TLBs). Execution times of a single-thread are not
improved but can be degraded, even when only one thread is executing. This is due to
slower frequencies and/or additional pipeline stages that arc necessary to accommodate
thread-switching hardware. Hardware support for Multithreading is more visible to
software, thus requiring more changes to both application programs and operating systems
than Multi processing.

9. What is CMT?
Chip multiprocessors - also called multi-core microprocessors or CMPs for short -
are now the only way to build high-performance microprocessors, for a variety of reasons.
Large uniprocessors are no longer scaling in performance, because it is only possible to
extract a limited amount of parallelism from a typical instruction stream using
conventional superscalar instruction issue techniques. In addition, one cannot simply
ratchet up the clock speed on today's processors, or the power dissipation will become
prohibitive in all but water-cooled systems.

10. What is SMT?


Simultaneous multithreading, often abbreviated as SMT, is a technique for
improving the overall efficiency of superscalar CPUs with hardware multithreading. SMT
permits multiple independent threads of execution to better utilize the resources provided
by modern processor architectures.

11. Write the advantages of CMP?


CMPs have several advantages over single processor solutions energy and silicon area
efficiency
i. By Incorporating smaller less complex cores onto a single chip
ii. Dynamically switching between cores and powering down unused cores
iii. Increased throughput performance by exploiting parallelism
iv. Multiple computing resources can take better advantage of instruction, thread, and
process level

12. What are the Disadvantages of SMT?


Simultaneous multithreading cannot improve performance if any of the shared
resources are limiting bottlenecks for the performance. In fact, some applications run
slower when simultaneous multithreading is enabled. Critics argue that it is a considerable
burden to put on software developers that
they have to test whether simultaneous multithreading is good or bad for their application in
various situations and insert extra logic to turn it off if it decreases performance.

13. What are the types of Multithreading?


 Block multi-threading
 Interleaved multi-threading

14. What Thread-level parallelism (TLP)?


 Explicit parallel programs already have TLP (inherent)
 Sequential programs that are hard to parallelize or ILP-limited can be
speculatively parallelized in hardware.
15. List the major MIMD Styles
Centralized shared memory ("Uniform Memory Access" time or "Shared
Memory Processor") Decentralized memory (memory module CPU) get more
memory bandwidth, lower memory Drawback: Longer communication latency
Drawback: Software model more complex

16. Distinguish between shared memory multiprocessor and message-passing


multiprocessor.
 A multiprocessor with a shared address space, that address space can be used
to communicate data implicitly via load and store operations is shared memory
multiprocessor.
 A multiprocessor with a multiple address space, communication of data is
done by explicitly passing message among processor is message-passing
multiprocessor.

17. What is multicore'?


At its simplest, multi-core is a design in which a single physical processor contains
the core logic of more than one processor. It's as if an Intel Xeon processor were opened
up and inside were packaged all the circuitry and logic for two (or more) Intel Xcon
processors. The multi-core design takes several such processor "cores" and packages them
as a single physical processor.The goal of this design is to enable a system to run more
tasks simultaneously and thereby achieve greater overall system performance.

18. Draw the basic structure of Basic Structure of a Symmetric Shared Memory
Multiprocessor

19. Write the software implications of a multicore processor?


Multi-core systems will deliver benefits to all software, but especially multi-threaded
programs.All code that supports HT Technology or multiple processors, for example, will
benefit automatically from multi- core processors, without need for modification. Most
server-side enterprise packages and many desktop productivity tools fall into this category.

20. What is coarse grained multithreading?


It switches threads only on costly stalls. Thus it is much less likely to slow down the
execution an individual thread.

PART-B

1. Explain instruction level parallelism in detail?

2. Explain parallel processing challenges in detail? www.studentsfocus.com

3. Explain briefly the Flynn’s classification?

4. What is hardware multithreading? Explain the various approaches in detail?

5. Explain multicore processors in detail?

6. Compare SISD, SIMD, MISD, and MIMD in detail?


7. Explain the following:

i) Implicit and Explicit multithreading.

ii) Interleaved, Blocked and Simultaneous multithreading.

8. What are multicore processors? Explain the common configurations that support

multiprocessing?

UNIT-V

MEMORY & I/O SYSTEMS

PART-A

1. What are the multimedia applications which use caches?


Some Multimedia application areas where cache is extensively used are
*Multimedia Entertainment
*Education
*Office Systems
*Audio and video Mail
*Computer Architecture - Set 6

2. Explain virtual memory technique.


Techniques that automatically move program and data blocks into the
physical memory when they are required for execution are called virtual
memory technique.

3. What are virtual and logical addresses?


The binary addresses that the processor issues for either instruction or
data are called virtual or logical addresses.

4. Define translation buffer.


Most commercial virtual memory systems incorporate a mechanism that can avoid
the bulk of the main memory access called for by the virtual to physical addresses
translation buffer. This may be done with a cache memory called a translation buffer.

5. What is branch delay slot?


The location containing an instruction that may be fetched and then
discarded because of the branch is called branch delay slot.

6. What is optical memory?


Optical or light based techniques for data storage, such memories usually
employ optical disk which resemble magnetic disk in that they store binary
information in concentric tracks on
an electromechanically rotated disks. The information is read as or written optically,
however with a laser replacing the read write arm of a magnetic disk drive. Optical
memory offer high storage capacities but their access rate is are generally less than those
of magnetic disk.

7. What are static and dynamic memories?


Static memory are memories which require periodic no refreshing.
Dynamic memories are memories, which require periodic refreshing.

8. What are the components of memory management unit?


A facility for dynamic storage relocation that maps logical memory references into
physical memory addresses. A provision for sharing common programs stored in memory
by different users .

9. What is the role of MAR and MDR?


The MAR (memory address register) is used to hold the address of the location to
or from which data are to be transferred and the MDR(memory data register) contains the
data to be written into or read out of the addressed location.
10. Distinguish Between Static RAM and Dynamic RAM?
Static RAM are fast, but they come at high cost because their cells require several
transistors. Less expensive RAM can be implemented if simpler cells are used. However
such cells do not retain their state indefinitely; Hence they are called Dynamic RAM.

11. Distiguish between asynchronies DRAM and synchronous RAM.


The specialized memory controller circuit provides the necessary control signals,
RAS And CAS
,that govern the timing. The processor must take into account the delay in the response
of the memory.
Such memories are referred to as asynchronous DRAMS.The DRAM whose
operations is directly synchronized with a clock signal. Such Memories are known
as synchronous DRAM.

12. What do you mean associative mapping technique?


The tag of an address received from the CPU is compared to the tag bits of each
block of the cache to see if the desired block is present. This is called associative mapping
technique.

13. What is SCSI?


Small computer system interface can be used for all kinds of devices including
RAID storage subsystems and optical disks for large- volume storage applications.

14. What are the two types of latencies associated with storage?
The latency associated with storage is divided into 2 categories
1. Seek Latencies which can be classified into Overlapped seek,Mid transfer seek and
Elevator seek.
2. Rotational Latencies which can be reduced either by Zero latency read or Write and
Interleave factor.

15. What do you mean by Disk Spanning?


Disk spanning is a method of attaching drives to a single host uadapter. All drives
appear as a single contiguous logical unit. Data is written to the first drive first and when
the drive is full, the controller switches to the second drive, then the second drive writes
until its full.

16. What is SCSI?


Small computer system interface can be used for all kinds of devices including
RAID storage subsystems and optical disks for large- volume storage applications.

17. Define the term RELIABILITY


“Means feature that help to avoid and detect such faults. A realible system does not
silently continue and delivery result that include interrected and corrupted data, instead it
corrects the corruption when possible or else stops.

18. Define the term AVAILABLITY:


“Means features that follow the systerm to stay operational even offen faults do
occur. A highly available systerm could dis able do the main functioning portion and
continue operating at the reduced capacity”.

19. How the interrupt is handled during exception?


* cpu identifies source of interrupt
* cpu obtains memory address of interrupt handles
* pc and other cpu status information are saved
* Pc is loaded with address of interrupt handler and handling program to handle it.
20. What is IO mapped input output?
A memory reference instruction activated the READ M (or)WRITE M control line
and does not affect the IO device. Separate IO instruction are required to activate the
READ IO and WRITE IO lines
,which cause a word to be transferred between the address aio port and the CPU. The
memory and IO address space are kept separate.

21. Specify the three types of the DMA transfer techniques?


--Single transfer mode(cyclestealing mode)
--Block Transfer Mode(Brust Mode)
--Demand Transfer Mode
--Cascade Mode
22. What is an interrupt?
An interrupt is an event that causes the execution of one program to be suspended
and another program to be executed.

23. What are the uses of interrupts?


*Recovery from errors
*Debugging
*Communication between programs
*Use of interrupts in operating system

24. Define vectored interrupts.


In order to reduce the overhead involved in the polling process, a device requesting
an interrupt may identify itself directly to the CPU. Then, the CPU can immediately start
executing the corresponding interrupt-service routine. The term vectored interrupts refers
to all interrupthandling schemes base on this approach.

25. Name any three of the standard I/O interface.


*SCSI (small computer system interface),bus standards
*Back plane bus standards
*IEEE 796 bus (multibus signals)
*NUBUS & IEEE 488 bus standard

26. What is an I/O channel?


An I/O channel is actually a special purpose processor; also called peripheral
processor. The main processor initiates a transfer by passing the required information in
the input output channel. The channel then takes over and controls the actual transfer of
data.

27. What is a bus?


A collection of wires that connects several devices is called a bus.

28. Define word length?


Each group of n bits is referred to as a word of information and n is called the word
length.

29. Why program controlled I/O is unsuitable for high-speed data transfer?
In program controlled i/o considerable overhead is incurred. Because several
program instruction have to be executed for each data word transferred between the
external devices and MM. Many high speed peripheral; devices have a synchronous modes
of operation. That is data transfers are controlled by a clock of fixed frequency,
independent of the CPU.
30. What is the function of I/O interface?
The function is to coordinate the transfer of data between the CPU and external
devices.

31. What is NUBUS?


A NUBUS is a processor independent, synchronous bus standard intended for use
in 32 bitmicro processor system. It defines a backplane into which upto 16 devices may be
plugged each in the form of circuit board of standard dimensions.

32. Name some of the IO devices.


*Video terminals
*Video displays
*Alphanumeric displays
*Graphics displays
* Flat panel displays
*Printers
*Plotters

33. What are the steps taken when an interrupt occurs?


*Source of the interrupt
*The memory address of the required ISP
* The program counter &CPU information saved in subroutine
*Transfer control back to the interrupted program

34. Define interface.


The word interface refers to the boundary between two circuits or devices

35. What is programmed I/O?


Data transfer to and from peripherals may be handled using this mode.
Programmed I/O operations are the result of I/O instructions written in the
computer program.

36. Types of buses.


-Synchronous bus
-Asynchronous bus

37. Define Synchronous bus.


- Synchronous bus on other hand contains synchronous clock that is used to validate
each and every signal.
- Synchronous buses are affected noise only when clock signal occurs.
- Synchronous bus designers must control with meta stability when attempting
different clock signal Frequencies
- Synchronous bus of meta stability arises in any flip flop. when time will be violated.

38. Define Asynchronous bus.


- Asynchronous buses can mistake noise pulses at any time for valid handshake signal.
- Asynchronous bus designer must deal with events that like synchronously.
- It must contend with meta stability when events that drive bus transaction.

PART-B
1. Explain with the block diagram the DMA transfer in a computer system.

2. Describe in detail about IOP organization.

3. Describe the data transfer method using DMA.

4. Write short notes on the following

(a) Magnetic disk drive (8)

(b) Optical drives (8)

5. Discuss the design of a typical input or output interface.

6. What are interrupts? How are they handled?

CS8942 - DATABASE MANAGEMENT SYSTEMS

UNIT-I-RELATIONAL DATABASES

PART-A

1. What is database?
A database is logically coherent collection of data with some inherent meaning,
representing some aspect of real world and which is designed, built and populated with
data for a specific purpose.

2. Which of the following plays an important role in representing information about the
real world in a database? Explain briefly.
1. The data definition language.
2. The data manipulation language.

3. The buffer manager.

4. The data model.


3. What are the responsibilities of a DBA? If we assume that the DBA is never interested
in running his or her own queries, does the DBA still need to understand query
optimization? Why?

 Designing the logical and physical schemas, as well as widely-used portions of the
external schema.
 Security and authorization.
 Data availability and recovery from failures.
 Database tuning: The DBA is responsible for evolving the database, in particular
the conceptual and physical schemas, to ensure adequate performance as user
requirements change.

A DBA needs to understand query optimization even if s/he is not interested in


running his or her own queries because some of these responsibilities (database design and
tuning) are related to query optimization. Unless the DBA understands the performance needs
of widely used queries, and how the DBMS will optimize and execute these queries, good
design and tuning decisions cannot be made.

4. Explain the following terms briefly: attribute, domain, entity, relationship, entity set,
relationship set, one-to-many relationship, many-to-many relationship, participation
constraint, overlap constraint, covering constraint, weak entity set, aggregation, and role
indicator.

Attribute - a property or description of an entity. A toy department employee entity could


have attributes describing the employee’s name, salary, and years of service.

Domain - a set of possible values for an attribute.

Entity - an object in the real world that is distinguishable from other objects such as the green
dragon toy.

Relationship - an association among two or more entities.

Entity set - a collection of similar entities such as all of the toys in the toy department.

Relationship set - a collection of similar relationships

One-to-many relationship - a key constraint that indicates that one entity can be associated
with many of another entity. An example of a one-to-many relationship is when an employee
can work for only one department, and a department can have many employees.

Many-to-many relationship - a key constraint that indicates that many of one entity can be
associated with many of another entity. An example of a many-to-many relationship is
employees and their hobbies: a person can have many different hobbies, and many people can
have the same hobby.

Participation constraint - a participation constraint determines whether relationships must


involve certain entities. An example is if every department entity has a manager entity.
Participation constraints can either be total or partial. A total participation constraint says that
every department has a manager. A partial participation constraint says that every employee
does not have to be a manager.
Overlap constraint - within an ISA hierarchy, an overlap constraint determines whether or
not two subclasses can contain the same entity.

Covering constraint - within an ISA hierarchy, a covering constraint determines where the
entities in the subclasses collectively include all entities in the superclass.

For example, with an Employees entity set with subclasses HourlyEmployee and
SalaryEmployee, does every Employee entity necessarily have to be within either
HourlyEmployee or SalaryEmployee?

Weak entity set - an entity that cannot be identified uniquely without considering some
primary key attributes of another identifying owner entity. An example is including
Dependent information for employees for insurance purposes.[Nov/Dec 2016]
Aggregation - a feature of the entity relationship model that allows a relationship set
to participate in another relationship set. This is indicated on an ER diagram by drawing a
dashed box around the aggregation.

Role indicator - If an entity set plays more than one role, role indicators describe the different
purpose in the relationship. An example is a single Employee entity set with a relation
Reports-To that relates supervisors and subordinates.

5. Define the following terms: relation schema, relational database schema, domain,
attribute, attribute domain, relation instance, relation cardinality, and relation degree.

A relation schema can be thought of as the basic information describing a table or


relation. This includes a set of column names, the data types associated with each column,
and the name associated with the entire table. For example, a relation schema for the relation
called Students could be expressed using the following representation:

Students(sid: string, name: string, login: string,

age: integer, gpa: real)

There are five fields or columns, with names and types as shown above.

A relational database schema is a collection of relation schemas, describing one or more


relations.

Domain is synonymous with data type. Attributes can be thought of as columns in a

table. Therefore, an attribute domain refers to the data type associated with a column.

A relation instance is a set of tuples (also known as rows or records) that each conform to
the schema of the relation.

The relation cardinality is the number of tuples in the relation.

The relation degree is the number of fields (or columns) in the relation.
6. Does the relational model, as seen by an SQL query writer, provide physical and
logical data independence? Explain.

The user of SQL has no idea how the data is physically represented in the machine.
He or she relies entirely on the relation abstraction for querying. Physical data independence
is therefore assured. Since a user can define views, logical data independence can also be
achieved by using view definitions to hide changes in the conceptual schema.

7. What is the difference between a candidate key and the primary key for a given
relation? What is a superkey?

8. Define Database Management System. [Nov/Dec 2008]


A Database management System consists of a collection interrelated data and set of
programs to access those data. The collection of data, usually referred to as the database,
contains information about one particular enterprises

9. What are the Advantages of DBMS? [Nov/Dec 2007]

 Redundancy is controlled
 Unauthorized access is restricted.
 Providing multiple user interface
 Enforcesing integrity constraints.
 Providing backup and recovery.

10. Disadvantages in File Processing System. [May/June 2016]


 Data redundancy & inconsistency
 Difficult in accessing data
 Data isolation
 Data integrity
 Concurrent access is not possible.
 Security Problems.
11. Define Data independence.
The ability to modify a schema definition in only level without affecting a Schema
definition in the next higher level is called data independence.
12. Define Data Models and list the types of Data Model.
Underlying the structure of database is the data mode: a collection of conceptual tools for
describing data, data relationships, data semantics and consistency constraints. The
various data model that have been proposed fall in to three different groups: Object-based
logical model, record-based logical model and physical model.

13. What is E-R model? [May/June 2016]


The entity-relationship data model is based on perception of a real world that consists of a
collection of basic objects, called entities and of relationships among these object

14. Define entity and entity set.


A entity is a “thing” or “object” in the real world that is distinguisgble from other objects.
For example ,each person in an entity. The set of all entities of the same type are termed
and entity set.

15. Differentiate primary key from candidate key ? [April/May-2008]

Candidate Key – A Candidate Key can be any column or a combination of columns that can
qualify as unique key in database. There can be multiple Candidate Keys in one table. Each
Candidate Key can qualify as Primary Key.
Primary Key – A Primary Key is a column or a combination of columns that uniquely
identify a record. Only one Candidate Key can be Primary Key.

16. Write five responsibilities of the DB manager.


The person who has such central control over the system is called a DataBase Administrator
(DBA).
The functions of a DBA include:
 Schema definition.
 Storage structure and access-method definition.
 Schema and physical-organization modification.

17. What are the different types of data model?

Data model is a collection of concepts that can be used to describe the structure of a data
base.
Types:
• High level or Conceptual Data model
• Low level or Physical Data model
• Entity Relationship Model
• Representational Model
• Relational data model
• Network and Hierarchical Data Model
• Object Data Model
• Record based data model
• Granting of authorization for data access.

18. Write the limitations of E-R model.


The limitations of E-R model are:
 There is no industry standard notation for developing an E-R diagram.
 The E-R data model is especially popular for high level.
19. What is query language? Write the classification of the query language.
A query language is a language in which a user requests information from a database.
These are typically higher-level than programming languages.
They may be classified as:

 Procedural, where the user instructs the system to perform a sequence of operations
on the database. This will compute the desired information.
 Nonprocedural, where the user specifies the information desired without giving a
procedure for obtaining the information.

20. What are the different types of integrity constraints used in designing a
relational database?
Constraint is a rule that is used for optimization purposes.
There are five types of constraints:
 A NOT NULL constraint is a rule that prevents null values from being entered into
one or more columns within a table.
 A unique constraint (also referred to as a unique key constraint) is a rule that forbids
duplicate values in one or more columns within a table. Unique and primary keys are
the supported unique constraints.
 A primary key constraint is a column or combination of columns that has the same
properties as a unique constraint.
 A foreign key constraint (also referred to as a referential constraint or a referential
integrity constraint) is a logical rule about values in one or more columns in one or
more tables.
 A check constraint (simply called a check constraint) sets restrictions on data added to
a specific table.

21. Write the usage of rename operation.


Rename operation can rename either the relation name or the attribute names, or both as a
unary operator. The general rename operation when applied to a relation r of degree n is
denoted by any of the following three forms:
Ρs(b1, b2, ..., bn)(r) or ρs(r) or ρ(b1, b2, ..., bn)(r)
Where the symbol ρ (rho) is used to denote the rename operator, s is the new relation
Name, and b1, b2, ..., bn are the new attribute names.

22. What is Weak entity set? [Nov/Dec 2016]


An entity set may not have sufficient attributes to form a primary key, and its primary key
compromises of its partial key and primary key of its parent entity, the its is said to be
Weak Entity set.
23. Define relationship and relationship set.
A relation ship is an association among several entities. For example, a depositor
relationship associated a customer with each account. The set of all relationships of the
same type are termed a relationship set.

24. What is object Oriented Model?


The model is based on collection of object. An objects contains values stored in instance
variables with in the object. An object also contains bodies of code that operate on the
object. These bodies of code are called methods. Objects that contain same type of values
and the same methods are grouped together into classless
25. Define Record-Based Logical Models.
Record-based logical models are used in describing data at the logical and levels. They are
used both to specify the overall structure of the database and provide a high-level
description of the implementation.

26. Define Relational model.


The relational model uses a collection of tables to represent both data and the relationships
among those data. Each table has multiple columns, and each columns has a unique name.

27. Define Network model.


Data in the networks model are represented by collection of records and relationships
among data are represented by links, which can be viewed as pointers. The records in the
database are organized as collections of arbitrary graphs.

28. Define Hierarchical Model


The hierarchical model is similar to the network models in the sense that data and
relationship among data are represented by records and links respectively. It differ from
the network model in that the records are organized as collection of trees rather that
arbitrary graphs.

29. List the role of DBA.


The person who has central control over the system is called database administrator. The
function of the DBA include the following:
 Schema definition
 Storage structure and access-method definition
 Schema and physical-organization modification
 Granting of authorization for data access
 Integrity-constraint specification

30. List the different type of database system user.


There are four different type of database-system users, differentiated
by the way they expect to interact with the system.
 Application programmers
 Sophisticated Users
 Specialized users
 Naive users.

31. Write about the role of Transaction manager.


Tm is responsible for ensuring that the database remains in a consistent state despite
system failures. The TM also ensures hat concurrent transaction executions proceed
without conflicting.

32. Write about role of storage manager.


A SM is a program module that provides the interface between the low-level data stored
in the database and the application programs and queries submitted to the system. The SM
is responsible for interaction with the data stored on disk.
33. Define attributes.
Entities are described in a database by a set of attributes. For example, the attributes
account-number and balance describe one particular account in a bank.

34. Define mapping constraints.


An E-R enterprise schema may define certain constraints to which the contents of a
database must conform. Two of the most important types of constrains are mapping
cardinalities: express the number of entities to which another entity can be associated via
relationship set.

35. List possible operation s in Relation algebra


Select, project, theta join, eqijoin, union, intersection, difference, Cartesian product,
division.

36. Is it possible for several attributes to have the same domain?


Illustrate your answer with suitable example.
Yes, several attributes to have same domain.attributes:name,address, belong to same
domain contains all text string of certain length.

37. What are the problem in data redundancy?


Multiple update, storage space is wasted
38. Define Aggregate Functions in SQL?

Aggregate function are functions that take a collection of values as input and return a single
value.
SQL offers five built-in aggregate functions:

Average: avg

Minimums: min

Maximum : max

Total: sum

Count: count

39. Define Nested Subqueries.

SQL provides a mechanism for the nesting of sub queries. A sub query is a select-from-where
expression that is nested within another query. A common use of sub queries is to perform
tests for set membership, set comparison, and set cardinality.

40. Define SQL and state the difference between SQL and other conventional
programming Language.

SQL is a nonprocedural language that is designed specifically for data access operations on
normalized relational database structures. The primary difference between SQL and other
conventional programming languages is that SQL statements Specify what data operations
should be performed rather than how to perform them.

41. What is database trigger is a PL/SQL block that can defined to automatically

execute for insert, update and deleted statements against a table .The trigger can be defied to
execute once for the entire statement or once for every row that is inserted,updated,or deleted.
For any one table, there are twelve events for which you can define database triggers.

42. Define Integrity constraints.

Integrity constraints provide a means of ensuring that changes made to the database by
authorized user do not result in a loss of data consistency. Thus Integrity constraints guard
against accidental damage to the database. The constraints were is the following forms: Key
declaration and form of a relationship.

43 .Define Referential Integrity.

Often, we wish to ensure that a value that appears in one relation for a given set of attributes
also

appears for a certain set of attributes in another relation. This condition is called referential
integrity.

44. Define Assertions.


An assertion is a predicate expressing a condition that we wish the database always satisfied.
E.g.

create assertion <assertion-name> check <predicate>

45. Define Triggers.

A trigger is a statement that is executed automatically by the system as a side effect of a


modification

to the database. To design a trigger mechanism, we must meet two requirements:

1. Specify the conditions under which the trigger is to be executed.

2. Specify the actions to be taken when the trigger executed.

46. Write short notes on tuple relational calculus.

The tuple relational calculation is anon procedural query language. It describes the desired
information with out giving a specific procedure for obtaining that Information.

A query or expression can be expressed in tuple relational calculus as

{t | P (t)}

which means the set of all tuples‘t’ such that predicate P is true for‘t’.

Notations used:

• t[A] the value of tuple ‘t’ on attribute, A

• t r tuple ‘t’ is in relation ‘r’

• there exists

Definition for ‘there exists’ ( ):

t r(Q(t))

which means there exists a tuple ‘t’ in relation ‘r’

such that predicate Q(t) is true.

• for all

Definition for ‘for all’ ( ):

t r(Q(t))

which means Q(t) is true for all tuples ‘t’ in relation

‘r’.
• Implication

Definition for Implication ( ):

P Q means if P is true then Q must be true.

47. What is query?

A query with respect to DBMS relates to user commands that are used to interact with a
database.

The query language can be classified into data definition language and data manipulation
language.

48. What do you mean by Correlated subquery?

Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent
query.

Depending on how the subquery is written, it can be executed once for the parent query of it
can beexecuted once for each row returned by the parent query. If the subquery is executed
for each row of the parent, this is called correlated subquery.

PART- B

With a neat diagram, explain the structure of a DBMS? [April/May- 2011]


1.
[April/May- 2017]
Draw an E-R diagram for a small marketing company database, assuming your own
2. data
requirements (7) – [April/May-2011]
3. Compare File systems with database systems .
4. Explain about the Purpose of Database system.
5. Briefly explain about Views of data. [May/June2016]
What is meant by Relational calculus? Query examples for tuple and domain
6. relational
calculus?
7. Explain about various data models.
8. Define relational algebra. With suitable example.
9. Roles of data base administrator and the details of aggregate function queries.
Explain select, project and Cartesian product operations in relational algebra with an
10.
example. [NOV/DEC2016]
With relevant examples discuss the following in SQL.
i. DDL. [May/June2016]
11. ii. DML
iii. DCL
iv. Views
Explain the 3 schema architecture of DBS.Why do we need mappings between
12.
different schema levels.
Consider the following tabls:
Employee (Emp_no, Name, Emp_city) e
Company (Emp_no, Company_name, Salary)
13. i. Write a SQL query to display Employee name and company name.
ii. Write a SQL query to display employee name, employee city ,company name and
salary of all the employees whose salary >10000
iii. Write a query to display all the employees working in ‘XYZ’ company.
14. Explain various DML commands with neat syntax.
Consider the following relational schema
Employee (empno,name,office,age)
Books(isbn,title,authors,publisher)
Loan(empno, isbn,date)
Write the following queries in relational algebra.
a. Find the names of employees who have borrowed a book Published by McGraw-
15. Hill.
b. Find the names of employees who have borrowed all books Published by
McGraw-Hill.
c. Find the names of employees who have borrowed more than five different books
published by McGraw-Hill.
d. For each publisher, find the names of employees who have borrowed more than
five books of that publisher.
16. Explain Embedded and Dynamic SQL. [NOV/DEC2016]
Write about the following.
i.Nested loop join
ii.Block Nested loop join
17.
iii. Merge join
iv Hash join

Let relations 1, (A, B,C) and r,(C, D, E)) have the following properties: r,; has
20,000 tuples, r, has 45,000 tuples, 25 tuples ofr, fit on one block
and 30 tuples of r, fit on one block. Estimate the number of block
transfers and seeks required, using each ofthe following join strategies for 7, or:
18.
(i) Nested-loop join
(ii) Block nested-loop join
(iii) Merge join.
(iv) Hash join. [NOV/DEC2016]
19. Explain briefly about the steps required in query processing.
20. What is data integrity? Explain the types of integrity constraints. [April/May-2011]
21. What are the relational algebra operations supported in SQL? [April/May-2011]
22. Explain the strength and weakness of the Triggers mechanism.
23. What is meant by Selection and projection used in Relational algebra?
24. How we made lossless and loss-join in relational model?
25. What is data integrity? Explain the types of integrity constraints.
26. Explain query optimization with an example. [NOV/DEC2016]

UNIT II - DATABASE DESIGN

PART-A

1.What is meant by Normalization?


Database normalization is the process of organizing the fields and tables of a
relational database to minimize redundancy. Normalization usually involves dividing large
tables into smaller (and less redundant) tables and defining relationships between them. The
objective is to isolate data so that additions, deletions, and modifications of a field can be
made in just one table and then propagated through the rest of the database using the defined
relationships.

2.Write an example of a relation schema R and a set of dependencies such that R is in


BCNF, but not in 4NF.
Given the relation R=(A,B,C,D) and the set of functional dependencies
F’=A->B, C->D, B->C allows three distinct BCNF decompositions.
R1= {(A,B),(C,D),(B,C)} is in BCNF as is
R2={(A,B),(C,D),(A,C)}
R3={(A,B),(C,D),(A,C)}
R4={(B,C),(A,D),(A,B)}

3.Write a note on functional dependencies.


Functional dependency, denoted by X → Y, between two sets of attributes X and Y
that are subsets of R specifies a constraint on the possible tuples that can form a relation state
r of R. The constraint is that, for any two tuples t1 and t2 in r that have t1[X] = t2[X], they
must also have t1[Y] = t2[Y].
This means that the values of the Y component of a tuple in r depend on, or are determined
by, the values of the X component; alternatively, the values of the X component of a tuple
uniquely (or functionally) determine the values of the Y component.

4. Define - Irreducible Set of Dependencies.


A functional depending set S is irreducible if the set has the following three properties:
 Each right set of a functional dependency of S contains only one attribute.
 Each left set of a functional dependency of S is irreducible. It means that reducing any
one attribute from left set will change the content of S (S will lose some information).
 Reducing any functional dependency will change the content of S.

5. What is meant by lossless-join decomposition?


[APRIL/MAY-2011]
We claim the above decomposition is lossless. How can we decide whether

decomposition is lossless?

1. Let R be a relation schema.

2. Let F be a set of functional dependencies on R. R1 & R2

3. Let and form a decomposition of R.

4. The decomposition is a lossless-join decomposition of R if at least one


of the following functional dependencies are in F+
R1∩ R2 ->R1
R1∩ R2 ->R2

6. Define - 3NF
Third normal form (3NF) is based on the concept of transitive dependency. A functional
dependency X→Y in a relation schema R is a transitive dependency if there exists a set of
attributes Z in R that is neither a candidate key nor a subset ofany key of R,10 and both X→Z
and Z→Y hold.

7. What is meant by multivalued dependency?


A multivalued dependency X→→Y specified on relation schema R,where X and Y
are both subsets of R, specifies the following constraint on any relation state r of R: If two
tuples t1 and t2 exist in r such that t1[X] = t2[X], then two tuples t3 and t4 should also exist
in r with the following properties,
Where we use Z to denote (R – (X ∪ Y))
■ t3[X] = t4[X] = t1[X] = t2[X].
■ t3[Y] = t1[Y] and t4[Y] = t2[Y].
■ t3[Z] = t2[Z] and t4[Z] = t1[Z].
Whenever X→→Y holds, we say that X multi determines Y. Because of the symmetry
in the definition, whenever X →→ Y holds in R, so does X →→ Z. Hence, X →→ Y
implies X→→Z, and therefore it is sometimes written as X→→Y|Z.

8. List out the desirable properties of decomposition. [April/May 2017]

 Lossless-join decomposition
 Dependency preservation
 Repetition of information

9. Why are certain functional dependencies called as trivial functional dependencies?


A trivial functional dependency occurs when we describe a functional dependencyof
an attribute on a collection of attributes that includes the original attribute. This type of
functional dependency is called trivial because it can be derived from common sense. It is
obvious that if you already know the value of B, then the value of B can be uniquely
determined by that knowledge.
For example, “{A, B} -> B” is a trivial functional dependency, as is “{name, SSN} -> SSN”.

10. List the pitfalls in Relational Database Design.

1. Repletion of information

2. Inability to represent certain information.

11. Justify the need for normalization.

To avoid insertion, deletion and updating anomalies. To ensure that there is no


redundant data. To ascertain that the database design is perfect.

12. Define 1NF? [Nov/Dec 2015]

A relation schema R is in 1NF if the domains of all attributes of R are atomic

13. Define 2 NF?

A relation schema R is in 2NF if every non prime attribute A in R is fully functionally


dependent on the primary key of R.

14. What are Armstrong rules?

Reflexive rule:

If Y is subset or equal to X the X->Y

Augmentation rule:

If X->Y then XZ->YZ.

Transitive Rule:

If {x->Y,Y->z} then X->Z

The above three are known as Armstrong Rule

15. Is it possible for several attributes to have the same domain? Illustrate you

answer with suitable examples.

Possibility for several attributes to have same domain. Yes, several attributes to have
same domain. For example Attributes:name, address, belong to same domains contains all
text string of certain

length.

PART-B

1. Explain 1NF, 2Nf and BCNF with suitable example. [NOV/DEC2016]


2. What is normalization? Explain all Normal forms. [April/May-2015]
Consider the universal relation R={ A,B,C,D,E,F,G,H,I} and the set of functional
3. Dependencies F={(A,B)->{C],{A}>{D,E},{B}->{F},{F}->{G,H},{D}->[I,J}.what is
the key for Decompose R into 2NF,the 3NF relations.
What are the pitfalls in relational database design? With a suitable example, explain the
4.
role of functional dependency in the process of normalization.
5. Write about decomposition preservation algorithm for all FD‟s.
6. Explain the three kinds of database tunning.
7. Define class Hierarchies and Aggregation?
8. What is meant by Integrity and security?
What are the pitfalls in relational database design? With a suitable example, explain the
9.
role of functional dependency in the process of normalization.
10. Explain E-R Model in detail with suitable example.
Draw an E – R Diagram for Banking, University, Company, Airlines, ATM, Hospital,
11.
Library, Super market, Insurance Company.
Construct an E-R diagram for a car-insurance company whose customers own one or
12. more cars each. Each car has associated with it zero to any number of recorded
accidents. State any assumptions you make. [NOV/DEC2016]
13. Explain E-R Model concept and extended E-R model.
What is aggregation in an ER model? Develop an ER diagram using
aggregation that captures the following information :
Employees work for projects. An employee working for a particular project uses
14.
various machinery. A unnecessary attributes. State any options you make. Also
discuss about the ER diagram you have designed.

With relevant examples discuss the various operations in Relational Algebras


15.

Define a functional dependency. List and discuss the six inference rules for functional
16.
dependencies. Give relevant examples.
17. Discuss Join Dependencies and Fifth Normal Form, and explain why 5NF?
18. Write about decomposition preservation algorithm for all FD’s.
19. Explain functional dependency concepts.
20. Explain the codd’s rules for relational database design.
UNIT III TRANSACTIONS

PART-A

1. What is a transaction?

A transaction is any one execution of a user program in a DBMS. This is the basic
unit of change in a DBMS.

2. What is a transaction? In what ways is it different from an ordinary program (in

a language such as C)?


A transaction is an execution of a user program, and is seen by the DBMS as a series
or list of actions. The actions that can be executed by a transaction include reads and writes of
database objects, whereas actions in an ordinary program could involve user input, access to
network devices, user interface drawing, etc.

3. Why does a DBMS interleave the actions of different transactions instead of executing

transactions one after the other?

A DBMS is typically shared among many users. Transactions from these users can be
interleaved to improve the execution time of users’ queries. By interleaving queries, users do
not have to wait for other user’s transactions to complete fully before their own transaction
begins. Without interleaving, if user A begins a transaction that will take 10 seconds to
complete, and user B wants to begin a transaction, user B would have to wait an additional 10
seconds for user A’s transaction to complete before the database would begin processing user
B’s request.

4. What must a user guarantee with respect to a transaction and database consistency?

What should a DBMS guarantee with respect to concurrent execution of

several transactions and database consistency?

A user must guarantee that his or her transaction does not corrupt data or insert
nonsense in the database. For example, in a banking database, a user must guarantee that a
cash withdraw transaction accurately models the amount a person removes from his or her
account. A database application would be worthless if a person removed 20 dollars from an
ATM but the transaction set their balance to zero! A DBMS must guarantee that transactions
are executed fully and independently of other transactions. An essential property of a DBMS
is that a transaction should execute atomically, or as if it is the only transaction running. Also,
transactions will either complete fully, or will be aborted and the database returned to it’s
initial state. This ensures that the database remains consistent.

5. Explain the strict two-phase locking protocol.

Strict two-phase locking uses shared and exclusive locks to protect data. A transaction
must hold all the required locks before executing, and does not release any lock until the
transaction has completely finished.

6. What is the WAL property, and why is it important?

The WAL property affects the logging strategy in a DBMS. The WAL, Write- Ahead
Log, property states that each write action must be recorded in the log (on disk) before the
corresponding change is reflected in the database itself. This protects the database from
system crashes that happen during a transaction’s execution. By recording the change in a log
before the change is truly made, the database knows to undo the changes to recover from a
system crash. Otherwise, if the system crashes just after making the change in the database
but before the database logs the change, then the database would not be able to detect his
change during crash recovery.

7. Define these terms: atomicity, consistency, isolation, durability, schedule, blind write,
dirty read, unrepeatable read, serializable schedule, recoverable schedule, avoids-
cascading-aborts schedule.

ACID Properties: [April/May 2015]

(a) Atomicity means a transaction executes when all actions of the transaction are completed
fully, or none are. This means there are no partial transactions (such as when half the actions
complete and the other half do not).

(b) Consistency involves beginning a transaction with a ’consistent’ database, and finishing
with a ’consistent’ database. For example, in a bank database, money should never be
”created” or ”deleted” without an appropriate deposit or withdrawal. Every transaction should
see a consistent database.

(c) Isolation ensures that a transaction can run independently, without considering any side
effects that other concurrently running transactions might have. When a database interleaves
transaction actions for performance reasons, the database protects each transaction from the
effects of other transactions.

(d) Durability defines the persistence of committed data: once a transaction commits, the data
should persist in the database even if the system crashes before the data is written to non-
volatile storage.

(e) A schedule is a series of (possibly overlapping) transactions.

(f) A blind write is when a transaction writes to an object without ever reading the object.

(g) A dirty read occurs when a transaction reads a database object that has been modified by
another not-yet-committed transaction.

(h) An unrepeatable read occurs when a transaction is unable to read the same object value
more than once, even though the transaction has not modified the value. Suppose a
transaction T2 changes the value of an object A that has been read by a transaction T1 while
T1 is still in progress. If T1 tries to read the value of A again, it will get a different result,
even though it has not modified A.

(i) A serializable schedule over a set S of transactions is a schedule whose effect on any
consistent database instance is identical to that of some complete serial schedule over the set
of committed transactions in S. [May/June 2016] [April/May 2017]

(j) A recoverable schedule is one in which a transaction can commit only after all other
transactions whose changes it has read have committed.
(k) A schedule that avoids-cascading-aborts is one in which transactions only read the
changes of committed transactions. Such a schedule is not only recoverable, aborting a
transaction can be accomplished without cascading the abort to other transactions.

8. Describe Strict 2PL.

Strict 2PL is the most widely used locking protocol where

1) A transaction requests a shared/exclusive lock on the object before it


reads/modifies the object.

2) All locks held by a transaction are released when the transaction is completed.

9. What is the phantom problem? Can it occur in a database where the set of database
objects is fixed and only the values of objects can be changed?

The phantom problem is a situation where a transaction retrieves a collection of


objects twice but sees different results, even though it does not modify any of these objects
itself and follows the strict 2PL protocol. This problem usually arises in dynamic databases
where a transaction cannot assume it has locked all objects of a given type (such as all sailors
with rank 1; new sailors of rank 1 can be added by a second transaction after one transaction
has locked all of the original ones). If the set of database objects is fixed and only the values
of objects can be changed, the phantom problem cannot occur since one cannot insert new
objects into the database.

10. Describe how a typical lock manager is implemented. Why must lock and unlock be
atomic operations? What is the difference between a lock and a latch?
What are convoys and how should a lock manager handle them?

A typical lock manager is implemented with a hash table, also called lock table, with
the data object identifier as the key. A lock table entry contains the following information: the
number of transactions currently holding a lock on the object, the nature of the lock, and a
pointer to a queue of lock requests. Lock and unlock must be atomic operations because
otherwise it may be possible for two transactions to obtain an exclusive lock on the same
object, thereby destroying the principles of 2PL.

A lock is held over a long duration, and a latch is released immediately after the physical read
or write operation is completed. Convoy is a queue of waiting transactions. It occurs when a
transaction holding a heavily used lock is suspended by the operating system, and every other
transactions that needs this lock is queued.

11. Compare lock downgrades with upgrades. Explain why downgrades violate 2PL but
are nonetheless acceptable. Discuss the use of update locks in conjunction with lock
downgrades.
A lock upgrade is to grant a transaction an exclusive lock of an object for which it
already holds a shared lock. A lock downgrade happens when an exclusive lock is obtained
by a transaction initially, but downgrades to a shared lock once it’s clear that this is sufficient.

Lock downgrade violates the 2PL requirement because it reduces the locking privileges held
by a transaction, and the transaction may go on to acquire other locks. But the transaction did
nothing but read the object that it downgraded. So it is nonetheless acceptable, provided that
the transaction has not modified the object.

The downgrade approach reduces concurrency, so we introduce a new kind of lock,


called an update lock, that is compatible with shared locks but not other updates and
exclusive lock. By setting an update lock initially, rather than a exclusive lock as in the case
of lock downgrade, we prevent conflicts with other read operations and increase concurrency.

12. Contrast the timestamps assigned to restarted transactions when timestamps are
used for deadlock prevention versus when timestamps are used for concurrency
control.
When timestamps are used for deadlock prevention, a transaction that is aborted and re-
started it is given the same timestamp that it had originally. When timestamps are used for
concurrency control, a transaction that is aborted and restarted is given a new, larger
timestamp.

State and justify the Thomas Write Rule.

The Thomas Write Rule says that if an transaction T with timestamp TS(T) acts on a database
object O with a write timestamp of WTS(O) such that TS(T) < WTS(O), we can safely
ignore writes by T and continue.

To understand and justify the Thomas Write Rule fully, we need to give the complete context
when it arises.

To implement timestamp-based concurrency control scheme, the following regulations are


made when transaction T wants to write object O:

(a) If TS(T )< RTS(O), the write action conflicts with the most recent read action of O, and T
is therefore aborted and restarted.

(b) If TS(T )<WTS(O), a naive approach would be to abort T as well because its write action
conflicts with the most recent write of O, and is out of timestamp order. But it turns out that
we can safely ignore such previous write and process with this new write; this is called
Thomas_WriteRule.

(c) Otherwise, T writes O and WTS(O) is set to TS(T).

The justification is as follows: had TS(T )< RTS(O), T would have been aborted and we
would not have bothered to check the WTS(O). So to decide whether to abort T based
onWTS(O), we can assume that TS(T ) >= RTS(O). If TS(T ) >= RTS(O) and TS(T ) <
WTS(O), then RTS(O) < WTS(O), which means the previous write occurred immediately
before this planned-new-write of O and was never read by anyone, therefore the previous
write can be safely ignored.

13. Show that, if two schedules are conflict equivalent, then they are view equivalent.

If two schedules over the same set of actions of the transactions are conflict
equivalent,they must order every pair of conflicting actions of two committed transactions in
the same way. Let’s assume that two schedules are conflict equivalent, but they are not view
equivalent, then one of the three conditions held under view equivalency must be violated.
But as we can see if every pair of conflicting actions is ordered in the same way, this cannot
happen. Thus we can conclude that if two schedules are conflict equivalent, they are also
view equivalent.

14. Give an example of a serializable schedule that is not strict.


The following example is a serializable schedule, but it’s not strict.

T1:R(X), T2:R(X), T2:W(X), T1:W(X), T2:Commit, T1:Commit

15. Give an example of a strict schedule that is not serializable.


The following example is a strict schedule, but it’s not serializable.

T1:R(X), T2:R(X), T1:W(X), T1:Commit, T2:W(X), T2:Commit

Motivate and describe the use of locks for improved conflict resolution in Optimistic
Concurrency Control.

In Optimistic Concurrency Control, we have no way to tell when Ti wrote the object at the
time we validate Tj, since all we have is the list of objects written by Ti and the list read by
Tj. To solve such conflict, we use mechanisms very similar to locking. The basic idea is that
each transaction in the Read phase tells the DBMS about items it is reading, and when a
transaction Ti is committed and its writes are accepted, the DBMS checks whether any of the
items written by Ti are being rad by any (yet to be validated) transaction Tj. If so, we know
that Tj’s validation must eventually fail. Then we can pick either the die or kill policy to
resolve the conflict.

16. How does the recovery manager ensure atomicity of transactions? How does it
ensure durability?

The Recovery Manager ensures atomicity of transactions by undoing the actionsof


transactions that do not commit. It ensures durability by making sure that all actions of
committed transactions survive system crashes and media failures.

17. What is the difference between stable storage and disk?

Stable storage is guaranteed (with very high probability) to survive crashes and media
failures. A disk might get corrupted or fail but the stable storage is still expected to retain
whatever is stored in it. One of the ways of achieving stable storage is to store the
information in a set of disks rather than in a single diskwith some information duplicated so
that the information is available even if one or two of the disks fail.

18. What is the difference between a system crash and a media failure?
A system crash happens when the system stops functioning in a normal way or stops
altogether. The Recovery Manager and other parts of the DBMS stop functioning (e.g. a core
dump caused by a bus error) as opposed to media failure.

In a media failure, the system is up and running but a particular entity of the system is not
functioning. In this case, the Recovery Manager is still functioning and can start recovering
from the failure while the system is still running (e.g., a disk is corrupted).

19. Explain the WAL protocol.


WAL Protocol: Whenever a change is made to a database object, the change is first
recorded in the log and the log is written to stable storage before the change is written to disk.

20. Describe the steal and no-force policies.


If a steal policy is in effect, the changes made to an object in the buffer pool by a
transaction can be written to disk before the transaction commits. This might be because
some other transaction might ”steal” the buffer page presently occupied by an uncommitted
transaction.

A no-force policy is in effect if, when a transaction commits, we need not ensure that all the
changes it has made to objects in the buffer pool are immediately forced to disk.

21. Give the reasons for allowing concurrency.


The reasons for allowing concurrency is if the transactions run serially, a short
transaction may have to wait for a preceding long transaction to complete, which can lead to
unpredictable delays in running a transaction. So concurrent execution reduces the
unpredictable delays in running transactions.

22. What are uncommitted modifications?


The immediate-modification technique allows database modifications to be output to
thedatabase while the transaction is still in the active state. Data modifications written by
active transactions are called uncommitted modifications.

23. Explain current page table and shadow page table.


The key idea behind the shadow paging technique is to maintain two page tables
during

the life of the transaction: the current page table and the shadow p age table. Both the page
tables are identical when the transaction starts. The current page table may be changed when
a transaction performs a write operation.

24. What are the drawbacks of shadow-paging technique?


• Commit Overhead
• Data fragmentation

• Garbage collection

25. Define garbage collection. [May/June 2016]

Garbage may be created also as a side effect of crashes. Periodically, it is necessary to


find all the garbage pages and to add them to the list of free pages. This process is called
garbage collection.

26.Differentiate strict two phase locking protocol and rigorous two phase locking

protocol.

In strict two phase locking protocol all exclusive mode locks taken by a transaction
is held until that transaction commits.

Rigorous two phase locking protocol requires that all locks be held until the transaction
commits.

27. How the time stamps are implemented?

• Use the value of the system clock as the time stamp. That is a transaction’s time stamp is
equal to the value of the clock when the transaction enters the system.

• Use a logical counter that is incremented after a new timestamp has been assigned; that is
the time stamp is equal to the value of the counter.

28. What are the time stamps associated with each data item?

• W-timestamp (Q) denotes the largest time stamp if any transaction that executed WRITE

(Q) successfully.

• R-timestamp (Q) denotes the largest time stamp if any transaction that executed READ

(Q) successfully.

PART-B

1. Explain in detail about Lock based protocols and Timestamp based protocols.
2. Write briefly about serializability with example.
3. Explain various recovery techniques during transaction in detail.
4. How can we achieve concurrency control achieved in DBMS through Serializability?
5. Explain the concept of Deadlock avoidance and prevention in detail.
6. Explain the ACID properties of a transaction.
Explain about immediate update and deferred update recovery techniques.
7.
[April/May-2011]
8. Explain the following protocols for concurrency control
i) Lock based protocols (8)
ii) Time stamp based protocols Database Management System.
9. Explain the concepts of serializability. April/May-2011
10. Explain two-phase locking protocol. [April/May-2011] , [NOV/DEC2016]
11. Describe about the deadlock prevention schemes. April/May-2011
How Transactions are possible in Distributed database? Explain briefly.
12.
What is Transaction state and its ACID properties?
13. Explain Recovery schemas in detail.
14. What is deadlock prevention and dead lock detection method. [NOV/DEC2016]
15. What is concurrency control? how is it implemented in DBMS?
16. Write short notes on shadow paging.

17. Explain the deffered and immediate-modification version of the log-based recovery
scheme
18. What is deadlock? Explain the various approaches used to recover from deadlock.

UNIT IV -IMPLEMENTATION TECHNIQUES

PART-A

1. What are the advantages and disadvantages of indexed sequential file? APRIL/MAY-
2011

The advantage of ordering records in a sequential file according to a key is that you
can then search the file more quickly. If you know the key value that you want, you can use
one of the relatively fast searches. The disadvantage is that when you insert, you need to
rewrite at least everything after the insertion point, which makes inserts very expensive
unless they are done at the end of the file. An indexed file approach keeps a (hopefully) small
part of each row, and some kind of "pointer" to the row's location within the data file. This
allows a search to use the index, which is ordered by the index and (again hopefully) much
smaller and therefore much faster than scanning the entire data file for the indexed data.

2.What is database tuning? APRIL/MAY-2011

Database tuning describes a group of activities used to optimize and homogenize the
performance of a database. It usually overlaps with query tuning, but refers to design of the
database files, selection of the database management system (DBMS), operating system and
CPU the DBMS runs on.

3. Give the measures of quality of a disk.

 Capacity
 Access time
 Seek time
 Data transfer rate
 Reliability
 Rotational latency time.

4. Compare sequential access devices versus random access devices with an example.

sequential access devices random access devices

Must be accessed from the beginning It is possible to read data from any location

Eg:- tape storage Eg:-disk storage

Access to data is much slower Access to data is faster

Cheaper than disk Expensive when compared with disk

5. What are the types of storage devices?

 Primary storage
 Secondary storage
 Tertiary storage
6.Draw the storage device hierarchy according to their speed and their cost.

 Cache
 Main memory
 Flash memory
 Magnetic disk
 Optical disk
 Magnetic tapes
7.What are called jukebox systems?

Jukebox systems contain a few d rives and numerous disks that can be loaded into one
of the drives automatically.

8.What is called remapping of bad sectors?

If the controller detects that a sector is damaged when the disk is initially formatted,
or when an attempt is made to write the sector, it can logically map the sector to a different
physical location.

9.Define access time.


Access time is the time from when a read or write request is issued to when data transfer

begins.

10.Define seek time.

The time for repositioning the arm is called the seek time and it increases with the
distance that the arm is called the seek time.

11. Define average seek time.

The average seek time is the average of the seek times, measured over a sequence of
random requests.

12. Define rotational latency time.

The time spent waiting for the sector to be accessed to appear under the head is called
the rotational latency time.

13. How the reliability can be improved through redundancy?

The simplest approach to introducing redundancy is to duplicate every disk. This


technique is called mirroring or shadowing. A logical disk then consists of two physical
disks, and write is carried out on both the disk. If one of the disks fails the data can be read
from the other. Data will be lost if the second disk fails before the first fail ed disk is repaired.

14.What are the two main goals of parallelism?

Load –balance multiple small accesses, so that the throughput of such accesses
increases.

Parallelize large accesses so that the response time of large accesses is reduced

15. What are the factors to be taken into account when choosing a RAID level?

 Monetary cost of extra disk storage requirements.


 Performance requirements in terms of number of I/O operations
 Performance when a disk has failed.
 Performances during rebuild.
16. What is meant by software and hardware RAID systems? [May/June 2016]

RAID can be implemented with no change at the hardware level, using only software

modification. Such RAID implementations are called software RAID systems and the
systems with

special hardware support are called hardware RAID systems.


17. Define hot swapping.

Hot swapping permits the removal of faulty disks and replaces it by new ones without
turning

power off. Hot swapping reduces the mean time to repair.

18.Which level of RAID is best? Why?

RAID level 1 is the RAID level of choice for many applications with moderate
storage

requirements and high I/O requirements. RAID 1 follows mirroring and provides best write

performance.

19. Distinguish between fixed length records and variable length records.

Fixed length records

Every record has the same fields and field lengths are fixed.

Variable length records

File records are of same type but one or more of the fields are of varying size.

20. What are the ways in which the variable-length records arise in database systems?

 Storage o f multiple record types in a file.


 Record types that allow variable lengths for one or more fields.
 Record types that allow repeating fields.
21. Explain the use of variable length records.

 They are used for Storing of multiple record types in a file.


 Used for storing records that has varying lengths for one or more fields.
 Used for storing records that allow repeating fields
22. What is the use of a slotted-page structure and what is the information present

in the header?

 The slotted-page structure is used for organizing records within a single block.
 The header contains the following information.
 The number of record entries in the header.
 The end of free space .
 An array whose entries contain the location and size of each record.
23. What are the two types of blocks in the fixed –length representation? Define them.

• Anchor block: Contains the first record of a chain.

• Overflow block: Contains the records other than those that are the first Record o f a chain.
24. What is known as heap file organization?

In the heap file organization, any record can be placed anywhere in the file where
there is

space for the record. There is no ordering of records. There is a single file for relation.

25. What is known as sequential file organization?

In the sequential file organization, the records are stored in sequential order,
according to the value of a “search key” of each record.

26. What is hashing file organization?

In the hashing file organization, a hash function is computed on some attribute of each

record. The result of the hash function specifies in which block of the file the record should
be placed.

27.What are the disadvantages of index sequential files?

The main disadvantage of the index sequential file organization is that performance
degrades as the file grows. This degradation is remedied by reorganization of the file.

28. What is a B+-Tree index?

A B+-Tree index takes the form of a balanced tree in which every path from the root
of the root of the root of the tree to a leaf of the tree is of the same length.

29. What is B-Tree?

A B-tree eliminates the redundant storage of search-key values .It allows search key
values to appear only once.

30.Distinguish between static hashing and dynamic hashing?

Static hashing

Static hashing uses a h ash function in which the set of bucket adders is fixed. Such
hash functions cannot easily accommodate databases that grow larger over time.

Dynamic hashing

Dynamic hashing allows us to modify the hash function dynamically. Dynamic


hashing copes with changes in database size by splitting and coalescing buckets as the
database grows and shrinks.
31.What can be done to reduce the occurrences of bucket overflows in a hash file

organization?

To reduce bucket overflow the number of bucket is chosen to be (nr/fr)*(1+d).

We handle bucket overflow by using

• Overflow chaining (closed hashing)

• Open hashing

32. Differentiate open hashing and closed hashing (overflow chaining)

Closed hashing (overflow chaining)

If a record must be inserted in to a bucket b, and b is already full, the system provides
an overflow bucket for b, and inserts the record in to the overflow bucket. If the overflow
bucket is also full, the system provides another overflow bucket, and so on. All the overflow
buckets of a given buckets are chained together in a linked list, overflow handling using
linked list is known as closed hashing.

33. List out the operations involved in query processing.

 Selection operation
 Join operations.
 Sorting.
 Projection
 Set operations
 Aggregation
34. What is meant by block nested loop join?

Block nested loop join is the variant of the nested loop join where every block of the inner
relation is paired with ever y block of the outer relation. With in each pair of blocks ever y
tuple in one block is paired with every tuple in the other blocks to generate all pairs of tuples.

PART-B

1. How the records are represented and organized in files . Explain with suitable example.
2. Write about the various levels of RAID with neat diagrams. [NOV/DEC2016]
Construct a B+ tree with the following (order of 3)
3.
5,3,4,9,7,15,14,21,22,23
4. List the different levels in RAID technology and explain its features. [April/May-2011]
5. Explain static and dynamic Hashing Techniques?
6. Briefly describe about B+ tree index file structure. [May/June 2016]
7. Discuss about primary file storage system
Describe the different types of file organization. Explain using a sketch of each of them,
8.
with their advantages and disadvantages. [Nov/Dec 2008]
Since indices speed query processing. Why might they not be kept on several search
9.
keys? List as many reason as possible. [Nov/Dec 2011]
10. Illustrate indexing and hashing techniques with suitable examples. [Nov/Dec 2015]
11. What is the difference between primary index and secondary index? [April/May 2006]
Construct a B+ tree with the following data. 30,31,23,32,22,28,24,29 where number of
12.
pointers that fit in node are 5.
13. Write down detailed notes on ordered indices and B-tree index files. [Nov/Dec 2012]
Why is hash structure not the best choice for a search key on which range of queries are
14.
likely? [April/May 2016]
Explain the distinction between static and dynamic hashing. Discuss the relative merits
15.
of each technique in database applications. [Nov/Dec 2017]
Give a detailed description about query processing and optimization. Explain the cost
16.
estimation of query optimization. [Nov/Dec 2013]

UNIT V -ADVANCED TOPICS

PART-A

1. Define Distributed Database.

A logically interrelated collection of shared data (and a description of this data)


physically distributed over a computer network.

2. Define Distributed DBMS. [Nov/Dec 2016]

The software system that permits the management of the distributed database and
makes the distribution transparent to users.

3. Define Distributed processing

A centralized database that can be accessed over a computer network.

4. Define Parallel DBMS

A DBMS running across multiple processors and disks that is designed to execute

operations in parallel, whenever possible, in order to improve performance.

5.What is ODMG model?


The ODMG model is intended to allow portability of application among object database
products.It provides a common model for these products by defining extensions to the MNG
object model that support object database requirements.

6.What are the goals of OODB?

The goals of OODB are:

i)To maintain direct correspondence between real world and database object, so that the
object will not loose its integrity and identity.

ii) The objects, which are complex, need not be scattered in the database, and hence to

create complex object structures.

7. What are persistent objects and transient objects?

Objects in OOPL exist only during program execution and are hence called transient
objects.

Objects in OODB can be extended, so that they can exist in permanent storage even after the
program termination. They are called persistent objects.

8. What is OID?

OO databases provide a unique system generated object -identifier (OID) for each
object. Its value is not visible to the external user and they are used to create and manage
inter - object references

.9.What are the characteristics an OID possess? (What are the properties of OID?)

The characteristics of OID are:

i)Immutable –They do not change.

ii) An OID can be used only once.

10.What are the two components of object?

The two components of object are:

1) State(Value) and
2) Behavior(Operation).
11. Write the formal structure of an object.

An object is normally represented as a triple O = (i, c, v)

i-The unique object identifier. 8

c-The type constructor.

v-The object state or current value.

12. What are the six type constructors?

The six type constructors are : Atom, Tuple, Array, List, Bag and Set.

Array, List, Bag and Set are called Collection types or Bulk types.
13. Explain each type constructor.

Atom –If c is atom, the value v is atomic and it is supported by the system.

Set –The IODs for the set of objects are of same type. This does not allow duplicates.

Array-The IODs for the set of objects are single dimensional array of object identifier.

List –The list is similar to set, except that the OIDs are ordered.

Bag –Bag is also called multiset. This can also contain duplicate elements.

14. What are identical objects and equal objects?

Two objects are said to have equal states, if their states at the atomic levels are the
same, but the values are reached through distinct objects.

Two objects are said to be in identical states, if the objects are identical even though the
objects themselves are not as they have distinct OIDs.

15. What is encapsulation?

Encapsulation is also called information hiding, which is related to the concepts of


abstract data types. This defines the behaviour of a types of object based on the operation it
has to perform.

The internal structure of object is hidden and the object is accessible only through the
predefined operations.

16. How can an operation be defined in encapsulation?

The operation defined in encapsulation concept has two parts:

i)Signature or interface of the operation –It specifies the operation name and arguments.

ii)Method or Body of the operation –It specifies the implementation of operation.

17. What are hidden and visible attributes?

Visible attributes are the attributes that may be directly accessed for reading by
external operators or by high - level query language. Hidden attributes are the attributes that
are completely encapsulated and can be only applied through predefined operations.

18. What is object constructor, destructor and object modifier?

Object constructors are the operations, which are used to create new object. Object
destructors are used to destroy objects. The object modifiers are the operations declared to
modify various attributes of an object.
19. What are the methods for creating persistent objects?

Persistent objects are the objects stored in databases that persist even after the
program termination. The techniques to create persistence objects are: Naming and reach
ability.

Naming mechanism involves giving an object a unique persistent name through which it can
be retrieved with this and other programs. The named persistent objects are the entry points to
the database.

The reach ability mechanism works by making the object reachable from some other
persistent object. Making the object to be referenced by another persistent object B can make
an object as persistent.

20. What is inheritance?

Inheritance is the concept of OO systems, that permits specification of new types or


classes that inherit their structure and operations from previously defines types or classes.

21. What is sub types and super type?

The subtype is the type, which must be formed from already existing type by
inheriting some of its features. The super type is the type from which the functions are
inherited.

22. What is operator polymorphism ? (Operator overloading).

It refers to the operation’s ability to be applied to different types of objects. The


operation’s

name may refer to each distinct implementation, depending on the type of objects it is

applied to.

23. What is late binding?

If the type of object to which the function is applied is not known until runtime and in
this

case the function must check the type of object and then invoke the appropriate method.

This is called late binding.

PART-B

Draw a neat sketch to indicate the architecture of a distributed database system. With
1.
an example explain the various form of data fragmentation used in DDB.
2. Explain detail in distributed databases and client/server databases.
3. Explain in detail about Dataware housing and data mining. [Nov/Dec 2015]
4. Explain in detail about mobile and web databases.
5. What is XML? Explain Breifly
6. Explain the types of database security and database security issues. [May/June 2016]
7. Explain clearly the Classification& clustering techniques.
8. Explain briefly the retrieval of information.
9. Explain in detail about Association & regression.
10. Explain Geographic information system.
11. Explain about cloud based databases.
12. Explain about XML query languages.
13. Give details about approaches used to store XML documents in database.
14. Describe Cloud storage architecture with neat diagram
Give the DTD or XML Schema for an XML representation of the following nested-
relational schema :
Emp = (ename, ChildrenSet setof (Children), SkillsSet setof (Skills)) Children = (name,
15. Birthday)
Birthday = (day, month, year) . ‘
Skills = (type, ExamsSet setof(Exams)) Wwwereceitigc swan Paper.com Exams=
(year, city) . . [NOV/DEC2016]
Explain about Distributed Databases and their characteristics, functions and advantages
16.
and disadvantages. [May/June 2016]
17. Explain the process of querying XML data with an example. [April/May 2017]
Explain the necessary characteristics a system must satisfy to be considered as an object
18.
oriented database management system. [April/May 2018]

CS8451 DESIGN AND ANALYSIS OF ALGORITHMS

UNIT-I

PART-A

1. Define algorithm.

An algorithm is a sequence of unambiguous instructions for solving a problem in a


finite amount of time.
2. What is the process of Algorithm Design and Analysis?
o Understand the problem
o Decide on Computational Device Exact Vs Approximate Algorithms
o Algorithm Design Techniques
o Design an algorithms
o Prove Correctness
o Analyze the Algorithm
o Code the Algorithm

3. How to measure the algorithm’s efficiency?


a)Time Efficiency-How fast your algorithm runs?
b)Space Efficiency-How much extra memory your algorithm needs?

4. How can you specify Algorithms?


Algorithms can be specified natural language or pseudo code.

5. What is Pseudo Code?


Pseudo Code is a mixture of Natural Language and Programming Language
Constructs such as functions, loops, decision making statements.etc

6. What are the Important Problem Types?


 Sorting
 Searching
 String Processing
 Graph Problem
 Combinatorial Problem
 Geometric Problem
 Numerical Problem

7. How can you classify Algorithms?


Among several ways to classify algorithms, the two principal alternatives are
 To group algorithms according to types of problem they solve com
 To group algorithms according to underlying design techniques they are based
upon

8. What is Sorting Problem?


Sorting algorithm is rearranging the items of given list descending/ascending order. Sorting
algorithms classified into
 Stable Sorting Algorithm
 Non-Stable Algorithm

9. What is Searching Problem?


Finding a given value, called search key given set. Searching Algorithms needs
more memory space and sorted array.

10. What is Graph Problem?


Graph is a collection of dg s and vertices. G=(V,E). For e.g. Traversal Algorithms,
Shortest Path Algorithm, Graph Colouring Problem

11. What is Combinatorial Problem?


This problem that ask to find combinatorial object such as permutations, combinations
or a subset. Combinatorial problems are most difficult to solve. For eg travelling sales man
problem.

12. Differentiate Time Efficiency and Space Efficiency?


Time Efficiency measured by counting the number of times the algorithms basic
operation is executed. Space Efficiency is measured by counting the number of extra
memory units consumed by the algorithm.
13. What are the features of efficient algorithm?
 Free of ambiguity
 Efficient in execution time
 Concise and compact Completeness
 Definiteness Finiteness

14. Define Order of Algorithm


The order of algorithm is a standard notation of an algorithm that has been
developed to represent function that bound the computing time for algorithms. The order of
an algorithm is a way of defining its efficiency. It is usually referred as O-notation.

15. Define Big Omega Notation.


Omega notation provides lower bound for the function t
A function t(n) is said to Omega (g(n)), if there exist some. Positive constant C and some
non negative integer N0, such that
t(n)>=Cg(n) for all n>=n0

16. What is Big ‘Oh’ Notation?


The Big ‘Oh’ notation provides an upper bound for the function t. A function t(n) is
said to be O(g(n)), if there exist some positive constant C and some non negative number,
suchthat, t(n)<=Cg(n), for all n>=no

17. What are the different types of time complexity?


The time complexity can be classified into 3 types, they are
 Worst case analysis
 Average case analysis
 Best case analysis

18. How the algorithm’s time efficiency is measured.


Time efficiency indicates how fast an algorithm runs. Time taken by a program to
complete its task depends on the number of steps in an algorithm. The time taken by an
algorithm is the sum of compile time and execution time. The compile time does not
depend on the instance characteristics.

19. Write the For LOOP general format.

The general form of a for Loop is

For variable : = value 1 to value 2 step


Step do

statement 1

statement n

20. Write algorithm using iterative function to fine sum of n numbers.

Algorithm sum(a,n)

{ S : = 0.0

For i=1 to n do

S : - S + a[i];

Return S;

21. Write an algorithm using Recursive function to fine sum of n numbers,


Algorithm Rsum (a,n)

if(n≤ 0) then

return 0.0;

else return Rsum(a, n- 1) + a(n);

22. What is recurrence equation?


The recurrence equations are solved often in analyzing the complexity of algorithms,
circuits, and other such cases.

A recurrence equation is written as:

a0tn + a1tn-1 + . . . . + aktn-k = 0.

23. Establish the relationship between big Oh and big Omega.


The difference between Big O notation and Big Omega notation is that Big O is used to
describe the worst case running time for an algorithm. But, Big Omega notation, on the
other hand, is used to describe the best case running time for a given algorithm.

"T(n)T(n) is O (f(n))O(f(n))" iff for some constants c and n0


, T(n)<=cf(n)T(n)<=cf(n) for all n>=n0
"T(n)T(n) is Ω (f(n))Ω(f(n))" if for some constants c and n0, T(n)>=cf(n)
T(n)>=cf(n) for all n>=n0
"T(n)T(n) is Θ (f(n))Θ(f(n))" if T(n) is O(f(n)) AND T(n) is Ω(f(n))
"T(n) is o(f(n))" if T(n) is O(f(n)) AND T(n) is NOT Θ (f(n))Θ(f(n))

24. Give the two major phases of performance evaluation


Performance evaluation can be loosely divided into two major phases:

a. a prior estimates (performance analysis)


b. a Posterior testing(performance measurement)
25. Define input size.
The input size of any instance of a problem is defined to be the number of words(or the
number of elements) needed to describe that instance.

PART-B

1. Describe the steps in analyzing & coding an algorithm.


2. Explain some of the problem types used in the design of algorithm.
3. Discuss the fundamentals of analysis framework .
4. Explain the various asymptotic notations used in algorithm design.
5. Explain the basic efficiency classes.
6. Explain in detail about mathematical analysis of non-recursive algorithms with
suitable problem.
7. Explain in detail about mathematical analysis of non-recursive algorithms with
suitable problem.

UNIT-II
PART-A
1. What is Empirical Analysis?
It is performed by running a program implementing the algorithm on a sample of
inputs and analyzing the data observed. This involves generating pseudo code and
random numbers.

2. Define Convex-Hull Problem.


A set of points (finite or infinite) on the plane is called convex if for any two Points P
and Q in the set, the entire line segment with the end points at P and Q belongs to the set.

3. What is Divide and Conquer Algorithm?


It is a general algorithm design techniques that solved problem’s instance by
dividing it into several smaller instance, solving of them recursively, and then
combining their solutions to the original instance of the Problem.

4.What are the Features of Algorithm Visualization?


 Consistent
 Interactive
 Very Clear and Concense
 Emphasize the visual component

5. Define O-Notation.
A function t(n) is said to be O (g(n)), denoted t(n) C O (g(n)), if t(n) is bounded
above by some constant multiple of g(n) for all large n, ie ., if there exist some positive
constant c and some nonnegative integer 0 such that
t(n) <= cg(n) for all>=0

6. What is Algorithm Visualization?


It is defined as the use of images to convey some useful information about
algorithms.

7. Define Static Algorithm Visualization?


Static Algorithm Visualization shows an algorithms progress through a series of still
images. On other hand, Algorithm animation shows a continuous movie like presentation
of an algorithm’s operation.

8. What is Fibonacci Numbers?


The Fibonacci numbers are an important sequence of integers in which every element
is equal to the sum of its two immediate predecessors. There are several algorithms for
computing the Fibonacci numbers with drastically different efficiency.

9.What is the Classification of Algorithm Visualization?


Static Algorithm Visualization and Dynamic Algorithm Visualization

10.What is Brute Force?


Brute Force is a straightforward approach to solving problem, usually directly based
on the problem’s statement and definitions of the concepts involved.

11. What are the different criteria used to improve the effectiveness of algorithm?
 Input- Zero or more quantities are externally supplied .
 Output-At least one quantity is produced
 Definiteness-Each instruction is clear and unambiguous
 Finiteness-If we trace out the instructions of algorithm, then for all case the
algorithm terminates after finite number of steps
 Effectiveness-Every instruction must be very clear

12. What is recursive call?


An algorithm is said to be recursive if the same algorithm invoked in the body. There
are 2 types of algorithm. They are
1) Direct Recursive
2) Indirect Recursive

13. What is meant by direct recursive call?


An algorithm that calls itself is direct
recursive call. Eg.int fun(int x)
{
if(x<=0)
return x;
return (fun(x-1));}

14. Define indirect recursive call?


Algorithm A is said to be indirect recursive if it calls another algorithm which in
turn call A Eg: int fun(int x)
{
if(x<=0)
return x;
return (f1(x-1));
}
Int fun1(int y){
return fun(y-1)
}

15. List the application areas of algorithm visualization?


The 2 application are of algorithm visualization are Research and Education.

16. Define Extrapolation?


Extrapolation is approach, which deals with values of n that are outside of
the range of the samples values.

17.Define profiling?
Profiling is an important resource the empirical analysis of an algorithm running time.
Measuring n different segments of program can pinpoint a bottleneck in the program’s
performance that can be missed by an abstract deliberation about the algorithm’s basic
operations. The process of getting such data is called profiling.
18. Write the Control abstraction for Divide-and conquer.
Algorithm D And(ρ)
{ if small(p)
then return
S(ρ); else
{
divide P into smaller instance ρ 1, ρ 2, ρ k, k ≥ 1;
Apply D and C to each of these subproblems
Return combine (DAnd C(ρ1) DAnd C(ρ2),----, DAnd ((ρk));
}}

19. What is the substitution method?


One of the methods for solving any such recurrence relation is called the substitution
method.

20. Give computing time for Binary search?


In conclusion we are now able completely describe the computing time of binary
search by giving formulas that describe the best, average and worst cases.

Successful searches

Θ (1) θ (log n) θ (Log n)

best average worst

unsuccessful searches θ(log n) best, average, worst.

21. What is the maximum and minimum problem?


The problem is to find the maximum and minimum items in a set of ‘n’ elements.
Though this problem may look as simple as to be contrived, it allows us to demonstrate
divide-and-conquer in simple setting.

22. Define external path length.


The external path length E, is defines analogously as sum of the distance of all
external nodes from the root.

23. Define internal path length.


The internal path length ‘I’, is the sum of the distances of all internal nodes from the
root.
24. Is insertion sort better than the merge sort?
Insertion sort works exceedingly fast on arrays of less than 16 elements, though for
large ‘n’ its computing time is O(n2 ).

25. Write a algorithm for straightforward maximum and minimum.


algorithm straight MaxMin(a,n,max,min)

//set max to the maximum and min to the minimum of a[1:n]

max := min: = a[i];

for i = 2 to n

do

if(a[i] >max)

then max: = a[i];

if(a[i] >min) then min: = a[i];

}}

26. Give the recurrence relation of divide-and-conquer?


The recurrence relation is T(n) = g(n) T(n1) + T(n2) + ----+ T(nk) + f(n).

PART-B

1. Devise an algorithm to sort the following elements using merge sort technique
2. 286, 45,278,368,475,389,656,788,503,126
3. Write an efficient and exhaustive search algorithm for the traveling salesman
problem.
4. Explain Binary search in detail.

5. Give examples of assignment problems where


a. i) The largest element of cost matrix is not included in the optimal
solution .
b. ii) The largest element of cost matrix is not feasible for optimal solution.

6. Solve the recurrence for the number of additions required by strassen’s algorithm.
(Assume that n is a power of 2)
7. Implement in C, the divide and conquer closest pair algorithm.
8. Explain the upper and lower hulls in the convex-hull problem, with an example.
9. Give a specific example of inputs that make the quickhull algorithm run in quadratic
time.
UNIT III

PART-A

1. What is articulation point?


A vertex of a connected graph G is said to be in articulation point, if its removal
with all edges incident to it breaks the graph into disjoint pieces.

2.List the advantages of binary search?


 Less time is consumed
 The processing speed is fast
 The number of iterations is less. It take n/2 iterations.
 Binary search, which is used in Fibonacci Series, involves addition
and subtraction rather than division
 It is priori analysis, since it can be analyzed before execution.

3. Explain the principle used quick sort?


It is a partition method using the particular key the given table is partitioned into 2
sub tables so that first, the original key will be its position the sorted sequence and
secondly, all keys to the left of this key will be less value and all keys to the right of it
will be greater values.

4. What is binary search?


The binary search algorithm some of the most efficient searching techniques
which requires the list to be sort descending order.
To search for an amount of the list, the binary search algorithms split the list and
locate the middle element of the list.
First compare middle key K1, with given key K . If K1=K then the element is found.

5. What are the objectives of sorting algorithm?


 To rearrange the items of a given list
 To search an element in the list.

6. Why is bubble sort called by the name?


The sorting problem is to compare adjacent elements of the list and exchange them
if they are out of order. By doing it repeatedly, we end up bubbling up the largest element
to the last position on the list. The next pass bubbles up the second largest element and so
on until, after n-1 pass the list is sorted.

7. What are the 3 variations in transform and conquer?


The principle variations of transformed and conquer techniques are
 Instance simplification
 Representation change
 Problem reduction

8. Explain principle of Optimality?


The principle of optimality says that an optimal solution to any instance of an
optimization problem is composed of optimal solution to its sub instances.

9. What is need for finding minimum spanning tree?


Spanning tree has many applications. Any connected graph with n vertices much
have atleast-1 edges and connected graphs with n-1 edges are trees. If the nodes of G
represent cities and edges represent possible communication links connecting 2 cities,
then the minimum number of links needed to connect the cities is -1. Therefore, it is
necessary for finding minimum spanning tree.

10.What is spanning tree?


Let G={V,E} be an undirected connected graph. A sub graph t={V,E} of G is a
spanning tree of G, if it is tree.

12. What is Dynamic programming?


Dynamic programming is an algorithm design technique for solving problem with
overlapping subprograms. The smaller subprograms are solved only once and recording
the results in a table from which the solution to the original problem is obtained.

13. What is greedy method?


The greedy method is the most straight forward design, which is applied for change
making problem. The greedy technique suggests constructing a solution to an
optimization problem through a sequence of steps, each expanding a partially constructed
solution obtained so far, until a complete solution to the problem is reached. On each
step, the choice made must be feasible, locally optimal and irrevocable.

14.List the advantage of greedy algorithm


1) Greedy algorithm produces a feasible solution
2) Greedy method is very simple to solve a problem
3) Greedy method provides an optimal solution directly

15. Define the term control abstraction?


Control abstraction is procedure whose flow of control is learn but whose
primary operations are specified by other proceed res whose precise meanings are
left undefined.

16. List the applications of minimum spanning tree?


Spanning tree are used to obtain independent set of circuit equations for an electric
network. Another application of spanning tree arises from the property that a spanning tree
is minimal sub graph G’ of G such that
V (G’)=V(G) and G’

17. Define AVL Tree.


An AVL Tree is binary search tree which the balance factor of every node, which the
balance factor of every node, which is defined as the difference between the heights of
the node’s left and right sub trees is either 0 or +1 or -1

18. What do you mean by row major and column major?


In given matrix, the maximum elements particular row is called row major. In a given
matrix, the maximum elements in a particular column is called column major.

19. What is Minimum Cost Spanning Tree?


A minimum cost spanning tree of a weighted connected graph is its spanning tree of
the smallest weight, where the weight of the tree is defined as the sum of the weights on
all its edges.

20. Write any two characteristics of Greedy Algorithm?


 To solve a problem in an optimal way construct the solution from given set of
candidates.
 As the algorithm proceeds, two other sets get accumulated among this one set
contains the candidates that have been already considered and chosen while the
other set contains the candidates that have been considered but rejected.

21. What is Knapsack problem?


A bag or sack is given capacity n and n objects are given. Each object has weight wi
and profit pi .Fraction of object is considered as xi (i.e) 0<=xi<=1 .If fraction is 1 then
entire object is put into sack. When we place this fraction into the sack we get wixi and
pixi.

22. Define weighted tree.


A directed binary tree for which each edge is labeled with a real number (weight) is
called as weighted tree.

23. What is the use of TVSP?


In places where the loss exceeds the tolerance level boosters have to the placed. Given
a network and loss tolerance level the tree vertex splitting problems is to determine an
optimal placement of boosters.

24. What is the Greedy choice property?


 The first component is greedy choice property (i.e.) a globally optimal solution
can arrive at by making a locally optimal choice.
 The choice made by greedy algorithm depends on choices made so far but it
cannot depend on any future choices or on solution to the sub problem.
 It progresses in top down fashion.

25. Write the difference between the Greedy method and Dynamic programming.

Greedy method Dynamic programming


1. Only one sequence of decision is 1.Many number of decisions are generated.
generated
2. It does not guarantee to give an 2. It definitely gives an optimal
optimal solution always

26. What are the features of dynamic programming?


Optimal solutions to sub problems are retained so as to avoid recomputing their values.
Decision sequences containing subsequences that are sub optimal are not considered.
It definitely gives the optimal solution always.

PART-B

1. Apply Floyd’s algorithm or obtain all pair shortest path for the following graph.
Explain with the algorithm.

2. Solve the following instance of the 0/1 Knapsack problem for the given knapsack
capacity M=5.

Items Weight Value


1 2 12
2 1 10
3 3 20
4 2 15
3. Solve the following knapsack problem using the greedy technique.
N=6,
(P1,P2,P3,P4,P5,P6) = (W1,W2,W3,W4,W5,W6)=(100,50,20,70,7,3) and m=165

4. Explain Warshall’s & Floyd’s Algorithm.


5. Define optimal binary search trees with example.
6. Describe in detail about prim’s algorithm with suitable example.
7. Explain in detail about kruskal’s algorithm.
8. Define Dijkstra’s algorithm. Explain in detail with example.

UNIT-IV

PART-A

1. Define rotation?
A rotation in an AVL tree is a local transformation of its sub tree rooted at a node,
which is performed, when the balance factor of a node either +2 or -2.If an insertion or
deletion of a new node in AVL Tree creates a tree with a violated balance requirement,
then the tree is restructured by performing special transformation called rotation, that
restore the balance required.
2. What are the different type’s rotations?
The four types of rotations are.
 Right rotation
 Left rotation
 Double right-left rotation
 Double left right rotation.

3. What are the drawbacks of AVL Tree?


1) Frequent rotations are needed to maintain balances from the tree’s nodes.
2) Deletion is d ff cult due to the frequency rotations.
3)AVL tree is not considered as stranded structure for implementing dictionaries.

4. What is 2-3 trees?


A 2-3 tree is tree have 2 kinds of nodes. They are 2 nodes and 3 nodes. 2 nodes
contain single key k and has 2 children. A 3 nodes contains two ordered key K1 and
K2(K1<k2) and has three children.

5. Define Heap.
Heap is partially ordered data structure that is especially suitable for implementing
priority queues. A heap is said to be a max heap, then the children of every node have a
value less than that node. A heap is said to be a min heap, then the children of every node
have a value greater than node

7. What is a priority queue?


Priority queue is a data structure in which the intrinsic ordering of the elements does determine
the results of its basic operations Ascending and descending priority queue are the 2 types of priority
queue.

8. Define warshall’s algorithm?


Warshall’s algorithm is an application of dynamic programming technique, which is
used to find the transitive closure of a directed graph.

9. Define Floyd’s algorithm?


 Floyd’s algorithm is an application, which is used to find the entire pairs shortest
paths problem.
 Floyd’s algorithm is applicable to both directed and undirected weighted graph,
but they do not contain a cycle of a negative length
 Define prim’s algorithm.
 Prim’s algorithm is greedy and efficient algorithm, which is used to find the
minimum spanning tree of weighted connected graph

10. How efficient is prim’s algorithm?


The efficiency of the prim’s algorithm depends on data structure chosen for the
graph.

11. What is path compression?


The better efficiency can be obtained by combining either variation of quick union
with path compression. Path compression makes every node encountered during the
execution of a find operation point to the tree’s node.

12. Define Dijkstra’s Algorithm?


Dijkstra’s algorithm solves the single source shortest path problem of finding
shortest paths from a given vertex( the source), to all the other vertices of a weighted
graph or digraph. Dijkstra’s algorithm provides a correct solution for a graph with non
negative weights.

13. Define Huffman trees?


A Huffman tree is binary tree that minimizes the weighted path length from the root
to the leaves containing a set of predefined weights. The most important application of
Huffman trees are Huffman code.

14. What do you mean by Huffman code?


A Huffman code is a optimal prefix tree variable length encoding scheme that
assigns bit strings to characters based on their frequencies in a given text.

15. What is meant by compression ratio?


Huffman’s code achieves the compression ratio, which is a standard measure of
compression algorithms effectiveness of
(3-2.25)/3*100 = 0.75/3*100 .
= 0.25 *100
= 25%.

16. List the advantage of Huffman’s encoding?


Huffman’s encoding is one of the most important file compression methods.
1. It is simple
2. It is versatility
3. It provides optimal and minimum length encoding

17. What is dynamic Huffman coding?


In dynamic Huffman coding, the coding tree is updated each time a new character
is read from the source text. Dynamic Huffman n codlings used to overcome the
drawback of simplest version.

18. What do you mean by optimal solution?


Given problem with inputs, we obtain subset that satisfies come constraints. Any
subset that satisfies these constraints is called a feasible solution. A feasible solution,
which either maximizes or minimizes a given objective function, is called optimal
solution.

19. Define the Iterative Improvement Technique.


A technique that approaches a solution by progressive approximation, using the kth
approximate solution to find the (k+1)th approximate solution (see also iteration).
Examples of methods that rely on iterative improvement are the Jacobi method and
Gauss–Seidel method

20. Define flow shop scheduling.


The processing of jobs requires the performance of several distinct job. In flow shop
we have n jobs each requiring n tasks i.e. T1i, T2i,…...Tmi, 1<i<n.

21. Define non preemptive schedule.


A non preemptive schedule is a schedule in which the processing of a task on any
processor is not terminated until the task is complete.

22. Define preemptive schedule.


A preemptive schedule is a schedule in which the processing of a task on any
processor can be terminated before the task is completed.

23. Define optimal finish time.


Optimal finish time scheduling for a given set of tasks is a non preemptive schedule
S for which F (S) is minimum over all non preemptive schedules S.

24. Define preemptive optimal finish time.


Preemptive optimal finish time scheduling for a given set of tasks is a preemptive
schedule S for which F (S) is minimum over all preemptive schedules S.

25. What are the conditions of flow shop scheduling?


 Let Tji denote jth task of the ith job. Task Tij is to be performed on Pj number of
processors where 1<j<m i.e. number of processors will be equal to number of
task Any task Tji must be assigned to the processor Pj.
No processor can have more than one task assigned to it at any time. For any job I
processing the task for j>1 cannot be started until T(j-i), job i has been completed.

PART-B

1. Consider the following linear programming problem in two variables:


maximize 3x + 5y
subject to x+y<4
x + 3y < 6
x > 0, y> 0.
2. Explain in detail about an outline of an simplex method with example.

3. Prove the Max-flow Min-cut theorem with example.

4. Write short notes on the following:


i. Flow conservation requirement
ii. Augmenting path method
iii. Shortest augmenting path algorithm
iv. Forward and Backward edges

5. Explain how the maximum flow problem for a network with several sources and
sinks can be transformed into the same problem for a network with a single source
and a single link.
6. Define the following: source, sink, capacity, flow network and preflow.
7. Proof a matching M is maximal if and only if there exists no augmenting path
with respect to M.
8. Write an algorithm for Maximum Bipartite matching with example.

9. Write an algorithm for stable marriage algorithm with example.


10. Explain the following:
1. Blocking pair
2. Man-optimal
3. Woman-optimal

UNIT V

PART-A

1. Define backtracking.
Depth first node generation with bounding function is called backtracking. The backtracking
algorithm has its virtue the ability to yield the answer with far fewer than m trials.

2. What is Hamiltonian cycle in an undirected graph?


A Hamiltonian cycle is round trip along n edges of G that visits every vertex once
and returns to its starting position.
3. What is feasible solution?
It is obtained from given n inputs Subsets that satisfies some constraints are called
feasible solution. It is obtained based on some constraints

4. What is optimal solution?


 It is obtained from feasible solution.
 Feasible solution that maximizes or minimizes a given objective function. It is
obtained based on objective function.

5. List the application of backtracking technique?


8-Qeens problem
6. Given an application for knapsack problem?
The knapsack problem is problem combinatorial optimization. It derives its
name from the maximum problem of choosing possible essential that can fit too bag to
be carried on trip. A similar problem very often appears business, combinatory,
complexity theory, cryptography and applied mathematics.

7. Define subset sum problem?


Subset sum problem is problem, which is used to find a subset of a given
set S={S1,S2,S3,…….Sn} of positive integers whose sum is equal to given positive integer .

8. What is heuristic?
A heuristic is common sense rule drawn from experience rather than from
mathematically proved assertion.
For example, going to the nearest unvisited city in the travelling salesman
problem is good example for heuristic.

9. State the concept of branch and bound method?


The branch and bound method refers to all state space search methods in which all
children of the E-Node are generated before any other live node can become the E-node.

10. Give the upper bound and lower bound of matrix multiplication algorithm?
Upper bound: The given algorithm does n*n*n multiplication hence at most
n*n*n multiplication are necessary.
Lower bound: It has been proved in the literature that at least n*n multiplications
are necessary.

11. What is state space tree?


Backtracking and branch bound are based on the construction of a state space tree,
whose nodes reflect specific choices made for a solution’s component .Its root represents
an initial state before the search for a solution begins.
The nodes of the first level the tree represent the made for the first component of
solution; the nodes of the second even represent the Choices for the second components
& so on.

12. What is promising and non promising node?


A node state space tree is said to be promising, if it corresponds to a partially
constructed solution that may still lead to complete solution. Otherwise, node is called
non- promising.

13. What are the additional items are required for branch and bound compare to
backtracking technique?
Compared to backtracking, branch and bound requires 2 additional items.
1) A way to proved , for every node of node of state space tree, a bound on the best
value of the objective function on any solution that can be obtain d by adding further
components to the partial solution represented by the node.
2) The value of the best solution seen so far.

14. Differentiate backtracking and branch bound techniques.


1. Backtracking is applicable only to non optimization problems.
2. Backcktracking generates state space tree depth first manner.
3. Branch and bound is applicable only to optimization problem.
4. Branch and bound generated a node of state space tree using best first rule.

15. What is called all pair shortest path problem?


Given a weighted connected graph, the all pairs shortest paths problem is to find the
distances from each vertex to all other vertices.

16. When do you say a tree as minimum spanning tree?


A spanning tree is said to be minimum spanning tree when the weight of the
spanning tree is smallest, where the weight of a tree is defined as the sum of the weight of
all its edges.

17. How will you construct an optimal binary search tree?


A binary search tree is one of the most important data structures in computer
sciences. Its principal applications are to implement a dictionary, a set of elements with
the operations of searching, insertion and deletion. If probabilities of searching for
elements of a set are known as optimal binary search tree, for which the average
number of comparisons in a sear h is the smallest possible.

18. What is the runtime of shortest path algorithm?


The runtime of shortest path algorithm is θ((n+|E|) log n)

19. What is mathematical modeling?


Mathematical modeling is method of ex pressing problem in terms of purely
mathematical objects such as variables, functions and equations.

20. What is pre structure?


Pre structuring is type of technique that exploits space for time tradeoffs simply
uses extra space of facilities faster and or more flexible access to data.

21. Define Heap sort?


Heap sort is sorting algorithm. Heap sort is 2 stage algorithms. The two stages are
Stage 1- Heap Construction- Construct heap for a given array of
elements
Stage 2- Maximum Deletion- Apply the root deletion operation n-1 times to the
remaining heap.

22. What are the requirements that are needed for performing Backtracking?
To solve any problem using backtracking, it requires that all the solutions satisfy a
complex set of constraints. They are:
i. Explicit constraints.
ii. Implicit constraints.

23. What are NP- hard and NP-complete problems?


The problems whose solutions have computing times are bounded by polynomials
of small degree.

24. What is Biconnected Graph?

 An undirected graph is called Biconnected if there are two vertex-disjoint paths


between any two vertices.
 In a Biconnected Graph, there is a simple cycle through any two vertices.
By convention, two nodes connected by an edge form a biconnected graph, but this
does not verify the above properties.
 For a graph with more than two vertices, the above properties must be there for it to
be Biconnected

25. What is approximate solution?


A feasible solution with value close to the value of an optimal solution is called
approximate solution.
PART-B

1. Explain the 8-Queen’s problem & discuss the possible solutions.

2. Solve the following instance of the knapsack problem by the branch & bound
algorithm.
3. Apply backtracking technique to solve the following instance of subset sum
problem:
S={1,3,4,5} and d=11
4. Solve the following 6 city traveling salesperson problem using the branch and
bound algorithm.

α 21 42 31 6 24
11 α 17 7 35 18
25 5 α 27 14 9
12 9 24 α 30 12
14 7 21 15 α 48
40 15 16 5 20 α

5. Explain how branch and bound technique is used to solve 0/1 knapsack problem.
for n=4 , W=10, (p1,p2,p3,p4) = (40,42,25,12) and (w1,w2,w3,w4) = (4,7,5,3).

6. Briefly explain NP-Hard and NP-Completeness with examples.

7. Explain about assignment problem using branch and bound with example.

8. Discuss the solution for travelling salesman problem using branch & bound
technique.
9. Discuss the decision trees for sorting algorithms.

CS8493- OPERATING SYSTEM

UNIT – I

PART-A

1. What is an Operating system?

An operating system is a program that manages the computer hardware. It also


provides a basis for application programs and act as an intermediary between a
user of a computer and the computer hardware. It controls and coordinates the
use of the hardware among the various application programs for the various
users.

2. List the services provided by an Operating System?

Program execution

I/O Operation

File-System manipulation

Communications
Error detection

3. What is the Kernel?

A more common definition is that the OS is the one program running at all
times on the computer, usually called the kernel, with all else being application
programs.

4. What is meant by Mainframe Systems?

Mainframe systems are the first computers developed to tackle many


commercial and scientific applications. These systems are developed from the
batch systems and then multiprogramming system and finally time sharing
systems.

5. What is meant by Batch Systems?

Operators batched together jobs with similar needs and ran through the computer
as a group .The operators would sort programs into batches with similar
requirements and as system become available, it would run each batch.

6. What is meant by Multiprogramming?

Several users simultaneously compete for system resources (i.e) the job currently
waiting for I/O will yield the CPU to another job which is ready to do calculations,
if another job is waiting. Thus it increases CPU utilization and system throughput.

7. What is meant by Time-sharing Systems?

Time Sharing is a logical extension of multiprogramming .Here, CPU executes


multiple jobs by switching among them, but the switches occur so frequently that
the users can interact with each program while it is running.

8. What are the Components of a Computer System?

Application Programs

System Program

Operating
System
Computer
Hardware

9. What are the advantages of Multiprogramming?

Increased System Throughput


Increased CPU
utilization 10. What is
Multiprocessor System?

Multiprocessor systems have systems more than one processor for


communication, sharing the computer bus, the memory, clock & peripheral devices.

11. What are the advantages of multiprocessors?

Increased throughput

Economy of scale
Increased
reliability

12. What are Multiprocessor Systems & give their advantages?

Multiprocessor systems also known as parallel systems or tightly coupled


systems are systems that have more than one processor in close communication,
sharing the computer bus, the clock and sometimes memory & peripheral devices.
Their main advantages are,

Increased throughput

Economy of scale

Increased reliability

13. What are the different types of Multiprocessing?

Symmetric multiprocessing (SMP): In SMP each processor runs an identical copy


of the OS & these copies communicate with one another as needed. All
processors are peers. Examples are Windows NT, Solaris, Digital UNIX, and OS/2
& Linux.

Asymmetric multiprocessing: Each processor is assigned a specific task. A


master processor controls the system; the other processors look to the master
for instructions or predefined tasks. It defines a master-slave relationship.
Example: SunOS Version 4.

14. What is meant by clustered system?

Clustered systems are collection of multiple CPUs to accomplish computational


work. Those systems share storage and are closely linked via LAN networking.
15. What are the types of clustering?

Asymmetric Clustering

Symmetric Clustering & Clustering over a WAN

16. What is meant by Asymmetric Clustering?

In this clustering, one machine is in hot standby mode, while the other is running the

application. The hot standby machine just monitors the active server. If that
server fails, hot standby host become the active server.

17. What is meant by Symmetric clustering?

Two or more hosts are running applications and they are monitoring each
other. This clustering requires more than one application be available to run and it
uses all of the available hardware.

18. What is meant by parallel clusters?

Parallel clusters allow multiple hosts to access the same data on the shared storage.
Each machine has full access to all data in the database.

19. What is meant by Real time system?

Real time systems are systems that have their in-built characteristics as supplying

immediate response. In real time system, each process is assigned a certain


level of priority according to the relative importance of the events to be
processed.

20. What are the advantages of distributed systems?

Resource sharing

Load balancing

Reliability

Communication link easy

21. What are the applications of real-time systems?

Controlling the machines

Instruments Industrial process

Landing & tasking off aero


planes Real time simulations

Military applications.
22. What are the types of Real time
systems?

Hard Real Time System

Soft Real Time System

23. What is meant by Hard Real time systems?

They are generally required to and they guarantee that the critical tasks are
completed in given amount of time.

24. What is meant by soft real time system?

It provides priority to the tasks based on their criticality. It does not


guarantee completion of critical tasks in time.

25. What is meant by distributed systems?

A distributed system is basically a collection of autonomous computer systems


which co-operate with one another through their h/w and s/w interconnections.

26. What are the disadvantages of distributed


systems?

Security weakness

Over dependence on performance and reliability Maintenance and control become


complex

27. What are the modes of operation in Hardware Protection?

User Mode

Monitor Mode

28. What are Operating Services?

Normally, an operating system provides certain services to programs and to the


users of those programs. Some of them are:

Program Execution. I/O operations

File-system manipulation Communications

Error Detection
29. What is System Programs?

System programs provide a convenient environment for program


development and execution. Some of these programs are user interfaces to system
calls and others are more complex. Some of them are:

File Management Status


Information File modification

Programming Language support Program


loading, Execution and communication.

PART B

1. Briefly explain in detail the types of systems calls provided by a typical operating.
Nov/Dec2012

2. Explain the operating system structure .Nov/Dec 2013


3. Explain the various types of computer systems.

4. Explain how protection is provided for the hardware resources by the operating
system.

5. What are the system components of an operating system & explain them?
6. Write about the various system calls.
7. Explain the various memory hierarchies with neat block diagram.
8. Explain the different operations of processes.

9. Differentiate symmetric and asymmetric multiprocessing system.


10. In what ways is the modular kernel approach similar to the layered approaches
11. Explain the facilities provided by the following operating system
12. List out the services provided by operating systems to programs and to the
Define operating system and list out the function and component of operating system.

UNIT-II

PART-A

1. Define process?

A process is more than a program code, which is sometime known as the text section. IT
also includes the current activity, as represented by the value of the program counter and
the processor’s registers.

2. What is meant by the state of the process?


The state of the process is defined in part by the current activity of that process. Each
process may be in one of the following states.

New: The process is being created.

Running: Instruction are being executed

Waiting: The process is waiting for some event to occur.

Ready: The process is waiting to be assigned to a processor

Terminated: The process has finished execution

3. Define process control block contain?

Each process is represented in the operating system by a process control block (PCB) –
also

called as task control block. The PCB simply serves as the repository for any information
that may vary from process to process.

4. What does PCB contain?

Process state

Program counter

CPU registers

CPU scheduling information

Memory management information

Accounting information

5. What are the 3 different types of scheduling queues?

Job Queue: As process enters the system they are put into job queue.

Ready Queue: The processes that are residing in the main memory and are ready
and waiting to execute are kept in the queue

Device Queue: The list of processes waiting for particular I/O device is called a device
queue.

6. Define schedulers?

A process migrates between the various scheduling throughout its lifetime. The operating
system must select, for scheduling purposes, processes from these queues in some fashion.
The selection process is carried out by the appropriate scheduler.

7. What are the types of scheduler?


Long term scheduler or job scheduler selects processes from the pool and load them into
the memory for execution. Short term scheduler or CPU scheduler, select among the
processes that are ready to execute and allocates the CPU to one of them.

8. Define critical section?

If a system consist on n processes {P0, P1,……., Pn-1}.Each process has a segment of


code called a critical section, in which the process may be changing common variables,
updating a table , writing a file. The important feature of this system is that, when one
process is in its critical section, no other process is to be allowed to execute in its critical
section.

9. What requirement is to be satisfied for a solution of a critical section problem?

A solution to the critical section problem must satisfy the following 3 requirements.

Mutual exclusion: If process P1 is executing in its critical section, then no other


processes can be executing in their critical sections.

Progress: If no process is executing in its critical section and some processes wish
to enter their critical sections, then only those processes that are not executing in their
remainder section can participate in the decision on which will enter its critical section
next, and this selection cannot be postponed indefinitely.

Bounded waiting: There exists a bound on the number of times that other
processes are allowed to enter their critical section after a process has made a request to
enter its critical section and before that request is granted.

10. Define semaphores.

Semaphore is a synchronization toll. A semaphore S is an integer variable that apart


from initialization is accessed only through 2 standard atomic operations.

Wait

Signal

11. Define Starvation in deadlock?

A problem related to deadlock is indefinite blocking or starvation, a situation where


processes

wait indefinitely within a semaphore. Indefinite blocking may occur if we add and remove
processes from the list associated with a semaphore in LIFO order.

12. Name dome classic problem of synchronization?

The Bounded – Buffer Problem

The Reader – Writer Problem


The Dining –Philosophers Problem 13. Define deadlock?

A process request resources; if the resource are not available at that time, the process enters a
wait

state. Waiting processes may never change state, because the resources they are requested
are held by other waiting processes. This situation is called deadlock.

14. What is the sequence of operation by which a process utilizes a resource?

Under the normal mode of operation, a process may utilize a resource in only the
following sequence:

Request: If the request cannot be granted immediately, then the requesting process
must wait until

it can acquire the response.

Use: The process can operate on the resource.

Release: The process releases the resource

15. Give the condition necessary for a deadlock situation to arise?

A deadlock situation can arise if the following 4 condition hold simultaneously in a system.

Mutual Exclusion

Hold and Wait

No preemption

Circular Wait

16. Define ‘Safe State”?

A state is safe if the system allocates resources to each process in some order and still
avoid deadlock.

17. What is the use of cooperating processes?

Information sharing: Since several users may be interested in the same piece of
information, we must provide an environment to allow concurrent access to these type of
resources.

Computation speedup: If we want a particular task to run faster, we must break it


into subtask, each of which executing in parallel with others.

Modularity: We may want to construct the system in a modular fashion, dividing


the system functions into separate processes or thread.
Convenience: Even an individual user may have many tasks on which to work at
one time. For instance a user is editing, printing and computing in parallel.

18. Define deadlock-avoidance algorithm?

A deadlock-avoidance algorithm dynamically examines the resource allocation state to


ensure that a circular wait condition can never exist. The resource allocation state is
defined by the number of available and allocated resources, and the maximum demand of the
processes.

19. What are the benefits of multithreaded programming?

Responsiveness

Resource sharing

Economy

Utilization of multiprocessor architecture

20. Define deadlock detection diction?

If a system does not employ either a deadlock-prevention or a deadlock avoidance algorithm,


then a deadlock situation may occur. In this environment, the system must provide:

An algorithm that examines the state of the system to determine whether a deadlock
has occurred

An algorithm to recover from the deadlock.

21. Define race condition.

When several process access and manipulate same data concurrently, then the outcome of
the execution depends on particular order in which the access takes place is called race
condition. To avoid race condition, only one process at a time can manipulate the shared
variable

22. What is critical section problem?

Consider a system consists of ‘n‘processes. Each process has segment of Code called a
critical section, in which the process may be changing common variables, updating a table,
writing a file. When one process is executing in its critical section, no other process can
allowed to execute in its critical section.

23. Define busy waiting and spinlock.

When a process is in its critical section, any other process that tries to enter its critical
section must loop continuously in the entry code. This is called as busy waiting and this type
of semaphore is also called a spinlock, because the process while waiting for the lock.
24. What are the requirements that a solution to the critical section problem must
satisfy?

The three requirements are

Mutual Exclusion

Progress

Bounded waiting

25. Define entry section and exit section.

The critical section problem is to design a protocol that the processes can use to cooperate.
Each process must request permission to enter its critical section. The section of the code
implementing this

request is the entry section. The critical section is followed by an exit section. The
remaining code is the remainder section.

26. What are conditions under which a deadlock situation may arise?

A deadlock situation can arise if the following four conditions hold Simultaneously in a
system: a. Mutual exclusion

b. Hold and wait c. No pre-emption d. Circular wait

27. What is a resource-allocation graph?

Deadlocks can be described more precisely in terms of a directed graph called a system
resource allocation graph. This graph consists of a set of vertices V and a set of edges
E. The set of vertices V is partitioned into two different types of nodes; P the set
consisting of all active processes in the system and R the set consisting of all resource
types in the system.

PART-B

1. Explain any three policies for process scheduling tha uses resource consumption
information. what is response ratio.(16) Nov/Dec 2014

2. What are semaphores? how do they implement mutual exclusion?(8). Nov/Dec 2014

3. Give a solution for readers-writers problem using condition critical regions (8).
Nov/Dec 2014

4. How does a deadlock can be avoided using banker’s algorithm (8). Nov/Dec 2013

5. Discuss in detail the critical section problrms and also write the algorithm for readers-
writers problem with semaphores. (8) Nov/Dec 2013
6. Explain the difference in the degree to which FCFS,RR,Non-preemptive SJF
scheduling algorithm, discriminate in favour of short process. (16) Nov/Dec 2013

7. Explain the various scheduling criteria in evaluating scheduling algorithm. (8)


Nov/Dec 2012

8. What is critical section? specify the requirements, for a solution to the critical section
problem. (8) Nov/Dec 2012

9. Explain the banker’s algorithm for deadlock avoidance with illustration.(8)


Nov/Dec2012
10. Write about the various CPU scheduling algorithms.
11. Write notes about multiple-processor scheduling and real-time scheduling.

12. What is critical section problem and explain two process solutions and multiple
Process solutions?

13. Explain what semaphores are, their usage, implementation given to avoid busy
waiting and binary semaphores.

14. Explain the classic problems of synchronization.


15. Write about critical regions and monitors.
16. Give a detailed description about deadlocks and its characterization
17. Write in detail about deadlock avoidance.
18. Give an account about deadlock detection.

19. What is the important feature of critical section? State the dining philosophers
problem and How to allocate the several resources among several processes in a
deadlock and starvation free manner.

20. Consider the following five processes, with the length of the CPU burst time given in
milliseconds.

Process Burst time P1


10

P2 29
P3 3
P4 7
P5 12
21. Consider the First come First serve(FCFS),Non Preemptive Shortest Job First(SJF),

22. Round Robin(RR) (quantum=10ms) scheduling algorithms. Illustrate the scheduling


using Gantt chart. Which algorithm will give the minimum average waiting time?
Discuss. Consider the following page reference string
7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1

23. How many page faults would occur for the following replacement algorithms,
assuming three frames that all frames are initially empty?

Construct a Resource Allocation Graph for the following scenario. At time’t’ ProcessP1
request for a resource X, process P2 requests for a resource Y. Both the resources are
Available and they are allocated to the requesting process. At time t1 where t1>t2 both
the processes are still holding the resources, however process P1 request for Y which is
held by P2, process P2 request for X held by P1. Will there be a deadlock? f there is a
deadlock discuss the four necessary conditions for deadlock, else justify there is no
deadlock

24. Consider the following snapshot of a system. Execute Banker's algorithm answer the
following. Allocation Max Available

A B C D A B C D A B C D P0
0 0 1 1 0 0 1 1 1 5 2 2 P1 1 0 0
11751
P3 1 3 5 1 2 3 5 2
P4 0 0 1 1 5 6 5 1
25. What are the methods involved in recovery from deadlocks?
26. Explain implementation of producers/Consumers problem using monitor.

27. Discuss the critical section problem. State the basic requirements of critical sectio
problem solution.

UNIT-III

PART-A

1. Define Dynamic Loading.

To obtain better memory-space utilization dynamic loading is used. With


dynamic loading, a routine is not loaded until it is called. All routines are kept on disk in a
relocatable load format. The main program is loaded into memory and executed. If the
routine needs another routine, the calling routine checks whether the routine has been
loaded. If not, the relocatable linking loader is called to load the desired program into
memory.

2. Define Dynamic Linking.


Dynamic linking is similar to dynamic loading, rather that loading being postponed
until execution time, linking is postponed. This feature is usually used with system
libraries, such as language subroutine libraries. A stub is included in the image for each
library-routine reference. The stub is a small piece of code that indicates how to locate the
appropriate memory-resident library routine, or how to load the library if the routine is not
already present.

3. What are Overlays?

To enable a process to be larger than the amount of memory allocated to it, overlays are
used. The idea of overlays is to keep in memory only those instructions and data that are
needed at a given time. When other instructions are needed, they are loaded into space
occupied previously by instructions that are no longer needed.

4. Define Swapping.

A process needs to be in memory to be executed. However a process can be swapped


temporarily out of memory to a backing store and then brought back into memory for
continued execution. This process is called swapping.

5. What do you mean by Best Fit?

Best fit allocates the smallest hole that is big enough. The entire list has to be searched,
unless it is sorted by size. This strategy produces the smallest leftover hole.

6. What do you mean by First Fit?

First fit allocates the first hole that is big enough. Searching can either start at the beginning
of the set of holes or where the previous first-fit search ended. Searching can be stopped as
soon as a free hole that is big enough is found.

7. How is memory protected in a paged environment?

Protection bits that are associated with each frame accomplish memory protection in a
paged environment. The protection bits can be checked to verify that no writes are being
made to a read-only page.

8. What is External Fragmentation?

External fragmentation exists when enough total memory space exists to satisfy a request,
but it is not contiguous; storage is fragmented into a large number of small holes.

9. What is Internal Fragmentation?

When the allocated memory may be slightly larger than the requested memory, the
difference between these two numbers is internal fragmentation.

10. What do you mean by Compaction?


Compaction is a solution to external fragmentation. The memory contents are shuffled to
place all free memory together in one large block. It is possible only i f relocation is
dynamic, and is done at execution time.

11. What are Pages and Frames?

Paging is a memory management scheme that permits the physical -address space of a
process to be non-contiguous. In the case of paging, physical memory is broken into fixed-
sized blocks called frames and logical memory is broken into blocks of the same size called
pages.

12. What is the use of Valid-Invalid Bits in Paging?

When the bit is set to valid, this value indicates that the associated page is in the process’s
logical address space, and is thus a legal page. If the bit is said to invalid, this value indicates
that the page is not in the process’s logical address space. Using the valid-invalid bit traps
illegal addresses.

13. What is the basic method of Segmentation?

Segmentation is a memory management scheme that supports the user view of memory. A
logical address space is a collection of segments. The logical address consists of segment
number and offset. If the offset is legal, it is added to the segment base to produce the
address in physical memory of the desired byte.

14. A Program containing relocatable code was created, assuming it would be loaded at
address 0. In its code, the program refers to the following addresses:
50,78,150,152,154. If the program is loaded into memory starting at location 250, how
do those addresses have to be adjusted?

All addresses need to be adjusted upward by 250.So the adjusted addresses would be 300,
328, 400, 402, and 404.

15. What is Virtual Memory?

Virtual memory is a technique that allows the execution of processes that may not be
completely in memory. It is the separation of user logical memory from physical memory.
This separation provides an extremely large virtual memory, when only a smaller physical
memory is available.

16. What is Demand Paging?

Virtual memory is commonly implemented by demand paging. In demand paging, the pager
brings only those necessary pages into memory instead of swapping in a whole process. Thus
it avoids reading into memory pages that will not be used anyway, decreasing the swap time
and the amount of physical memory needed.
17. Define Lazy Swapper.

Rather than swapping the entire process into main memory, a lazy swapper is used. A lazy
swapper never swaps a page into memory unless that page will be needed.

18. What is a Pure Demand Paging?

When starting execution of a process with no pages in memory, the operating system
sets the instruction pointer to the first instruction of the process, which is on a non-
memory resident page, the process immediately faults for the page. After this page is
brought into memory, the process continues to execute, faulting as necessary until every
page that it needs is in memory. At that point, it can execute with no more faults. This
schema is pure demand paging.

19. Define Effective Access Time.

Let p be the probability of a page fault close to 0; that is, there will be only a few page
faults. The effective access time is,

Effective access time = (1-p)*ma+p*page fault time ma: memory access time

20. Define Secondary Memory.

This memory holds those pages that are not present in main memory. The secondary
memory is usually a high speed disk. It is known as the swap device, and the section of the
disk used for this purpose is known as swap space.

21. What is the basic approach of Page Replacement?

If no frame is free is available, find one that is not currently being used and free it. A frame
can be freed by writing its contents to swap space, and changing the page table to
indicate that the page is no longer in memory. Now the freed frame can be used to hold the
page for which the process faulted.

22. What is the various Page Replacement Algorithms used for Page Replacement?

FIFO page replacement

Optimal page replacement

LRU page replacement

LRU approximation page replacement

Counting based page replacement

Page buffering algorithm.

23. What are the major problems to implement Demand Paging?


The two major problems to implement demand paging is developing,

Frame allocation algorithm

Page replacement algorithm

24. What is a Reference String?

An algorithm is evaluated by running it on a particular string of memory references and


computing the number of page faults. The string of memory reference is called a reference
string.

25. What is virtual memory?

Virtual memory is a technique that allows the execution of processes that may not be
completely in memory. It is the separation of user logical memory from physical memory.
This separation provides an extremely large virtual memory, when only a smaller physical
memory is available.

26. Define secondary memory.

This memory holds those pages that are not present in main memory. The secondary memory
is usually a high speed disk. It is known as the swap device, and the section of the disk used
for this purpose is known as swap space.

PART-B

1. Differentiate local and global page replacement algorithm. Nov/Dec 2012


2. What is virtual memory? Mention its advantages. Nov/Dec 2012

3. What is the maximum file size supported by a file system with 16 direct blocks, single,
double, and triple indirection? The block size is 512 bytes. Disk block number can be
stored in 4 bytes. Nov/Dec 2014
4. List the steps needed to perform page replacement. Nov/Dec 2014

5. Explain with the help of examples FIFO and LRU page replacement algorithms.(8)
Nov/Dec 2014

6. Differentiate external fragmentation with internal fragmentation. Nov/Dec 2013

7. Briefly explain and compare, fixed and dynamic memory partitioning schemes.
Nov/Dec 2012

8. Explain with the help of examples FIFO and LRU, optical page replacement algorithms
with example reference string. Mention the merits and demerits of each of the above
algorithm. Nov/Dec 2012
9. Explain how paging supports virtual memory. With neat diagram explain hoe logical
address is translated into physical address. Nov/Dec 2012

10. Explain memory management in Linux operating system. Nov/Dec 2012


11. Explain about contiguous memory allocation
12. Give the basic concepts about paging
13. Write about the techniques for structuring the page table.
14. Explain the basic concepts of segmentation.
15. What is demand paging and what is its use?
16. Explain the various page replacement strategies
17. What is thrashing and explain the methods to avoid thrashing?
18. Write short notes on swapping

19. Discuss the advantages of paging memory management and the conversion of logical
address into physical address with necessary

20. Consider the following page reference string: 2, 3, 4, 2, 1, 5, 6, 4, 1, 2, 3, 7, 6, 3, 2, 1


Calculate the number of page faults would occur for the following page replacement
algorithm with frame size of 4 and 5. (16)
21. Explain the page fault handling routine with diagram.
22. Explain Contiguous and Non contiguous memory allocation with example.

UNIT-IV

PART-A

What is a File?

A file is a named collection of related information that is recorded on secondary storage. A


file contains either programs or data. A file has certain “structure” based on its type.

File attributes: Name, identifier, type, size, location, protection, time, date

File operations: creation, reading, writing, repositioning, deleting, truncating,appending,


renaming

File types: executable, object, library, source code etc.

2. List the various File Attributes.

A file has certain other attributes, which vary from one operating system to another, but
typically consist of these: Name, identifier, type, location, size, protection, time, date and user
identification.

3. What are the various File Operations? The basic file operations are,

Creating a file
Writing a file

Reading a file

Repositioning within a file

Deleting a file

Truncating a file

4. What is the information associated with an Open File?

Several pieces of information are associated with an open file which may be:

File pointer

File open count

Disk location of the file

Access rights

5. What are the different Accessing Methods of a File? The different types of accessing a
file are:

Sequential access: Information in the file is accessed sequentially

Direct access: Information in the file can be accessed without any particular order.

Other access methods: Creating index for the file, indexed sequential access method

6. What is Directory?

The device directory or simply known as directory records information- such as name,
location, size, and type for all files on that particular partition. The directory can be viewed
as a symbol table that translates file names into their directory entries.

7. What are the operations that can be performed on a Directory? The operations that
can be performed on a directory are,

Search for a file

Create a file

Delete a file

Rename a file

Listdirectory
Traverse the file system

8. What are the most common schemes for defining the Logical Structure of a
Directory? The most common schemes for defining the logical structure of a directory

Single-Level Directory

Two-level Directory

Tree-Structured Directories

Acyclic-Graph Directories

General Graph Directory 9. Define UFD and MFD.

In the two-level directory structure, each user has own user file directory Each UFD has a
similar structure, but lists only the files of a single user. When a job starts the system‟s master
file directory

10. What is a Path Name?

A pathname is the path from the root through all subdirectories to a specified file. In a two-
level directory structure a user name and a file name define a path name.

11. What is Access Control List?

The most general scheme to implement identity-dependent access is to associate with each
file and directory an access control unit.

12. Define Equal Allocation.

The way to split „m’ frames among „n’ processes is to give everyone an equal share, m/n
frames. For instance, if there are 93 frames and 5 processes, each process will get 18 frames.
The leftover 3 frames could be used as a free-frame buffer pool. This scheme is called equal
allocation.

13. What is the cause of Thrashing? How does the system detect thrashing? Once it
detects thrashing,

what can the system do to eliminate this problem?

Thrashing is caused by under allocation of the minimum number of pages required by a


process, forcing it to continuously page fault. The system can detect thrashing by
evaluating the level of CPU utilization as compared to the level of multiprogramming. It
can be eliminated by reducing the level of multiprogramming.

14. If the average page faults service time of 25 ms and a memory access time of
100ns.Calculate the effective access time.

Effective access time = (1-p) *ma + p*page fault time = (1-p) *100+p*25000000
= 100-100p+25000000*p = 100 + 24999900p

15. What is Belady’s Anomaly?

For some page replacement algorithms, the page fault rate may increase as the number of
allocated frames increases.

16. What are the types of Path Names? Path names can be of two types.

Absolute path name: Begins at the root and follows a path down to the specified file,
giving the directory names on the path.

Relative path name: Defines a path from the current directory.

17. What is meant by Locality of Reference?

The locality model states that, as a process executes, it moves from locality to locality.
Locality is of two types.

Spatial locality

Temporal locality.

18. Define Seek Time and Latency Time.

The time taken by the head to move to the appropriate cylinder or track is called seek time.
Once the head is at right track, it must wait until the desired block rotates under the read-
write head. This delay is latency time.

19. What are the Allocation Methods of a Disk Space?

Three major methods of allocating disk space which are widely in use are

Contiguous allocation

Linked allocation

Indexed allocation

20. What are the advantages of Contiguous Allocation? The advantages are,

Supports direct access

Supports sequential access

Number of disk seeks is minimal.

21. What are the drawbacks of Contiguous Allocation of Disk Space? The disadvantages
are,

Suffers from external fragmentation


Suffers from internal fragmentation

Difficulty in finding space for a new file

File cannot be extended

Size of the file is to be declared in advance

22. What are the advantages of Linked Allocation?

The advantages are,

No external fragmentation

Size of the file does not need to be declared

23. What are the disadvantages of Linked Allocation?

The disadvantages are,

Used only for sequential access of files.

Direct access is not supported

Memory space required for the pointers.

Reliability is compromised if the pointers are lost or damaged

24. What are the various Disk-Scheduling Algorithms?

The various disk-scheduling algorithms are,

First Come First Served Scheduling

Shortest Seek Time First Scheduling

SCAN Scheduling

C-SCAN Scheduling

LOOK scheduling

25. What are the techniques used for performing I/O.

Programmed I/O

Interrupt driven I/O

Direct Memory Access (

26. Give an example of an application in which data in a file should be accessed in the
following order:
Sequentially - Print the content of the file.

Randomly - Print the content of record i. This record can be found using hashing or index
techniques.

PART-B

1. Discuss the different techniques with which a file can be shared among different
users. Nov/Dec 2014

2. Explain any two page replacement algorithm. Nov/Dec 2014

3. Explain the concept of demand paging and the performance issue of demand paging.
Nov/Dec 2014

4. Explain linked file allocation method. Nov/Dec 2012


5. Explain various file directory structure. Nov/Dec 2012
6. What are files and explain the access methods for files? File definition
7. Explain the schemes for defining the logical structure of a directory.
8. Write notes about the protection strategies provided for files.
9. Explain the allocation methods for disk space.
10. State the various attributes of file and their purpose.
11. Discuss various file operations.

12. Give an example for an application that could benefit from operating system support for
random access to indexed files.

13. List and briefly discuss the most common schemes for defining the logical structure of a
directory.

14. With necessary diagram explain the different allocation methods of disk space.

15. List and discuss various methods for implementing a directory. Single-Level
directory

16. Explain and compare different file access methods.

17. Explain the indexed and linked file allocation methods. Discuss the advantages and
Disadvantages in those methods.

18. How are the processes and threads executed in Linux?

UNIT V

PART-A
1. List three main bodies of Linux System.
 Kernel.
 System libraries
 System utilities

2. Kernel Mode vs User Mode


Kernel component code executes in a special privileged mode called kernel mode with full
access to all resources of the computer.
Support code which is not required to run in kernel mode is in System Library. User
programs and other system programs works in User Mode which has no access to system
hardware and kernel code. User programs/ utilities use System libraries to access Kernel
functions to get system's low level tasks.

3. What are the four componenets that kernel module support.


 The module-management system allows modules to be loaded into
memory and to communicate with the rest of the kernel.

 The module loader and unloader, which are user-mode utilities, work
 with the module-management system to load a module into memory.
 The driver-registration system allows modules to tell the rest of the
 kernel that a new driver has become available.
 Aconflict-resolution mechanism allows different device drivers to
 reserve hardware resources and to protect those resources fromaccidental
use by another driver.

4. List the items contains in registration table.


 Device drivers
 File systems.
 Network protocols
 Binary format.

5. Give the aims of central conflict resolution mechanism.


To prevent modules from clashing over access to hardware resources

• To prevent autoprobes—device-driver probes that auto-detect device

configuration—from interfering with existing device drivers

• To resolve conflicts among multiple drivers trying to access the same

hardware—as, for example, when both the parallel printer driver


6. List the items that process identity consists
Process ID (PID)..
Credentials.
Personality.
Namespace.

7. What is argument vector and environment vector.


The argument vector simply lists the command-line arguments used to invoke the
running program; it conventionally starts with the name of the program itself.
The environment vector is a list of “NAME=VALUE” pairs that associates named
environment variables with arbitrary textual values.

8. Give the parts of process context.


Scheduling context.
Accounting.
File table.
File-system context.
Signal-handler table.
Virtual memory context.

9. What is time slice,target latency,Minimum granularity.

target latency, which is the interval of time during


which every runnable task should run at least once.
The time slice is the length of time—the slice of the processor—

that a process is afforded.


the minimum

granularity, which is a minimum length of time any process is allotted the

processor. All processes, regardless of the target latency,will run for at least the

minimum granularity.
10. What is big kernel lock.
single kernel spinlock (sometimes termed
BKL for “big kernel lock”) was created to allow multiple processes (running on
different processors) to be active in the kernel concurrently. However, the BKL
provided a very coarse level of locking granularity, resulting in poor scalability
to machines with many processors and processes.
11. four different zones, or regions that linux separates physical memory:
• ZONE DMA

• ZONE DMA32

• ZONE NORMAL

• ZONE HIGHMEM
12. a slab may be in one of three possible states:

1. Full. All objects in the slab are marked as used.

2. Empty. All objects in the slab are marked as free.

3. Partial. The slab consists of both used and free objects.


13. Policy algorithm and paging mechanism
Policy algorithm decides which pages to write out to disk and when to write them.

Second, the paging mechanism carries out the transfer and pages data back

into physical memory when they are needed again.

PART-B

1. Explain about Linux system with suitable example.

2. Explain about the Structure of Linux Kernel with necessary diagram.


3. Discuss in detail about Scheduling in Linux.
4. Illustrate Linux run queue and priority arrays.
5. Explain in detail about Memory Management in Linux.
6. Explain the layers in mobile OS.
7. Discuss in detail about iOS and Android Architecture and SDK Framework.

CS8494- SOFTWARE ENGINEERING

UNIT I

PART-A

1. Write the IEEE definition of software engineering. (DEC-17)


Software engineering is a discipline in which theories, methods and tools are
applied to develop professional software.

2. What is Software? List its Characteristics. (May-18)


Software is nothing but a collection of computer programs that are related
documents that are indented to provide desired features, functionalities and better
performance.
Characteristics:
 Software is engineered, not manufactured.
 Software does not wear out.
 Most software is custom built rather than being assembled from
components.
3. If you have to develop a word processing software product, what process
model will you choose? Justify your answer. (May-18)
The incremental model can be used for developing a word processing software
product. This is because the basic functionality of word editing can be
developed and verified from the customer in the initial increment. Then in
subsequent increments the advanced editing features can be added.
4. Compare prototyping approaches in a software process. (May-18)
There are two types of prototyping approaches in a software process
Evolutionary prototyping: In this approach of system development, the initial
prototype is prepared and it is then refined through number of stages to final
stage.
Throw-away Prototyping: Using this approach a rough practical
implementation of the system is produced. The requirement problem can be
identified from this implementation. It is then discarded. System is then
developed using some different engineering paradigm.
5. List two deficiencies in waterfall model. Which process model do you
suggest to overcome each deficiency? (May-17)
It is difficult to define all the requirement at the beginning of project, this model
is not suitable for accommodating any changes.
To overcome this deficiency: Prototyping model.
It does not scale up to large project
To overcome this deficiency: Spiral model.
6. What are the advantages of evolutionary prototyping?
 Fast delivery of the working system.
 User is involved while developing the system.
 More useful system can be delivered.
 Specification, design and implementation work in co-ordinate manner.
7. What are the various categories of software?
 System software
 Application software
 Engineering/Scientific software
 Embedded software
 Web Applications
 Artificial Intelligence software
8. What are the challenges in software?
 Copying with legacy systems.
 Heterogeneity challenge
 Delivery times challenge
9. Define software process.
Software process is defined as the structured set of activities that are required to
develop the software system.
10. What are the fundamental activities of a software process?
 Specification
 Design and implementation
 Validation
 Evolution
11. What are the umbrella activities of a software process?
 Software project tracking and control.
 Risk management.
 Software Quality Assurance.
 Formal Technical Reviews.
 Software Configuration Management.
 Work product preparation and production.
 Reusability management.
 Measurement.
12. What are the merits of incremental model?
 The incremental model can be adopted when there are less number of people
involved in the project.
 Technical risks can be managed with each increment.
 For a very small time span at least core product can be delivered to the
customer.

13. List the task regions in the Spiral model.


 Customer communication – In this region it is suggested to establish
customer communication.
 Planning – All planning activities are carried out in order to define
resources timeline and other project related activities.
 Risk analysis – The tasks required to calculate technical and management
risks.
 Engineering – In this the task region,tasks required to build one or more
representations of applications are carried out.
 Construct and release – All the necessary tasks required to construct, test,
install the applications are conducted.
 Customer evaluation – Customer’s feedback is obtained and based on the
customer evaluation required tasks are performed and implemented at
installation stage.
14. What are the drawbacks of spiral model?
 It is based on customer communication. If the communication is not proper
then the software product that gets developed will not be the up to the
mark.
 It demands considerable risk assessment. If the risk assessment is done
properly then only the successful product can be obtained.
15. What is System Engineering?
System Engineering means designing, implementing, deploying and operating
systems which include hardware, software and people.
16. List the process maturity levels in SEIs CMM.
Level 1:Initial – Few processes are defined and individual efforts are taken.

Level 2:Repeatable – To track cost schedule and functionality basic project


management

processes are established.

Level 3:Defined – The process is standardized, documented and followed.

Level 4:Managed – Both the software process and product are quantitatively
understood
and controlled using detailed measures.
Level 5:Optimizing – Establish mechanisms to plan and implement change.

17. What is the use of CMM?


Capability Maturity Model is used in assessing how well an organization’s
processes allow to complete and manage new software projects.
18. Name the Evolutionary process Models.
 Incremental model
 Spiral model
 WIN-WIN spiral model
 Concurrent Development
19. Define software prototyping.
Software prototyping is defined as a rapid software development for validating the
requirements.
20. What are the benefits of prototyping?
 Prototype serves as a basis for deriving system specification.
 Design quality can be improved.
 System can be maintained easily.
 Development efforts may get reduced.
 System usability can be improved.

21. What are the advantages of evolutionary prototyping?


 Fast delivery of the working system.
 User is involved while developing the system.
 More useful system can be delivered.
 Specification, design and implementation work in co-ordinated manner.

22. What are the various Rapid prototyping techniques?


 Dynamic high level language development.
 Database programming.
 Component and application assembly.

23. What are the new practices that are appended to XP to create IXP
 Readiness Assessment
 Project Community
 Project Chartering
 Test Driven Management
 Retrospectives
 Continuous Learning

24. What is spike solution in XP?


The spike solution is very simple program to explore potential solution. The
spike solution is build to only address the problem under examination and all
other things can be overlooked.

25. What are the five values defined by beck that serve as a basis for the
work performed in XP?
 Communication
 Simplicity
 Feedback
 Courage
 Respect

PART-B

1. Explain iterative waterfall and spiral model for software life cycle and various
activities in each phase. (AU: May-15)
2. Explain how waterfall model is applicable for the development of the following
systems:
a) University Accounting Systems
b) Interactive systems that allow railway passengers to find time and other
information from the terminals installed in the station.
3. Explain about the software process model that is refined and expanded in later
releases
4. Explain in detail about the software process.
5. Explain in detail about the life cycle process.
6. Discuss the prototyping model. What is the effect of designing a prototype on the
overall cost of the software project? (AU: May-16)
7. Explain about rapid prototyping techniques.
8. A software project which is considered to be very simple and the customer in position
of giving all the requirements at the initial stage, which process model would you
prefer for developing the project?
9. Assume that you are the technical manager of a software development organization. A
client approached you for a software solution. The problems stated by the client have
uncertainties which lead to loss if it not planned and solved. Which software
development model will suggest for this project – justify. Explain the model with its
pros and cons and neat sketch.
10. What is the role of user participation in the selection of life cycle model?
11. What is process model? Describe the process model that you would chose to
manufacture car. Explain by giving suitable reasons.

UNIT II

PART-A

1.What are the characteristics of SRS?


i. Correct – The SRS should be made up to date when appropriate
requirements are identified.
ii. Unambiguous – When the requirements are correctly understood then only
it is possible to
write an unambiguous software.
iii. Complete – To make SRS complete, it should be specified what a software
designer wants to
create software.
iv. Consistent – It should be consistent with reference to the functionalities
identified.
v. Specific – The requirements should be mentioned specifically.
vi. Traceable – What is the need for mentioned requirement? This should be
correctly identified.

2.Define Quality Function Development. Dec-17


Quality Function deployment is a quality management technique which
translates the customer needs and wants into technical requirements.

3.What are the various types of traceability in software Engineering? May-17


Various types of traceability in software Engineering are
 Source Traceability
 Requirement Traceability
 Design Traceability

4.Differentiate between normal and exciting requirements.


Normal Requirements: The requirements as per goals and objectives of the
system are called normal requirements. For eg. Handling mouse and keyboard
events for any GUI based system.
Exciting Requirements: When certain requirements are satisfied by the
software beyond customer’s expectation then such requirements are called
exciting requirement. For eg. In word processing software system, if there are
some exceptional page layout facilities then it falls in exciting requirements
category.

5.What is the purpose of petrinets?


Petrinets are rigorously used to define the system. There are 3 types of
components in petrinets. There are
Places
Transition
Arc.

6.What are the linkage between data flow and ER diagram?


Both the data flow diagram and ER diagram are system modeling techniques
used during structured system analysis.
The ER diagram is used to represent the data model while data flow diagrams
are used to represent the functional model.

7.What are the objectives of Analysis modeling?


i. To describe what the customer requires.
ii. To establish a basis for the creation of software design.
iii. To devise a set of valid requirements after which the software can be built.

8.What is data modeling?


Data modeling is the basic step in the analysis modeling. In data modeling the
data
objects are examined independently of processing. The data model represents
how data are
related with one another.

9.What is a data object?


Data object is a collection of attributes that act as an aspect, characteristic,
quality, or descriptor of the object.

10. What are attributes?


Attributes are the one, which defines the properties of data object.

11. What is ERD?


Entity Relationship Diagram is the graphical representation of the object
relationship pair. It
is mainly used in database applications.

12. What is DFD?


Data Flow Diagram depicts the information flow and the transforms that are
applied on the
data as it moves from input to output.

13. What does Level0 DFD represent?


Level0 DFD is called as „fundamental system model‟ or „context model‟. In
the context model the entire software system is represented by a single bubble
with input and output indicated by incoming and outgoing arrows.

14. What is a state transition diagram?


State transition diagram is basically a collection of states and events. The
events cause the system to change its state. It also represents what actions are to
be taken on the occurrence of particular event.

15. Define Data Dictionary.


The data dictionary can be defined as an organized collection of all the data
elements of
the system with precise and rigorous definitions so that user and system
analyst will have a
common understanding of inputs, outputs, components of stores and
intermediate calculations.

16. What is the major distinction between user requirements and system
requirement?
The user requirements describe both the functional and non functional
requirements in such a way that they are understandable by the user who do not
have detailed technical knowledge. On the other hand the system requirements
are more detailed specification of system functions, services and constraints than
user requirements.
The user requirements are specified using natural language whereas system
model expressed in system models.

17. Give Two Examples of non functional requirements.


Consider the library management system or which the two non functional
requirements can be-
 The user who wishes to read the article on-line must be authenticated
first
 The article must be displayed within in 5 seconds.

18. What do requirement process involve?


The requirement process involves
 Elicitation
 Analysis
 Validation
19. List the good characteristics of good SRS.
 SRS must be correct
 SRS must be unambiguous
 SRS must be complete
 SRS must be consistent
 SRS must be traceable
20. What are the elements of Analysis model?
i. Data Dictionary
ii. Entity Relationship Diagram
iii. Data Flow Diagram
iv. State Transition Diagram
v. Control Specification
vi. Process specification

PART-B
1. Explain in detail about data modeling.
2. Explain in detail about Functional Modeling.
3. Explain in detail about Structural Modeling.
4. Explain the merits used for specifying non functional requirements.
(AU: May-13, May-16)

5. What are the components of the standard structure for the software requirements
document?
6. Explain the organization of SRS and highlight the importance of each subsection.
7. What is requirement engineering? Explain in detail the various processes in
requirement engineering. (AU: May-17)
8. An independent truck company wants to track and record its driver driving habits. For
this purpose the company has rented 800 phone numbers and has printed the numbers
in the front, back and sides of all trucks owned by the company. Next to the 800
numbers a massage is written “PLEASE REPORT ANY DRIVER OR TRUCK
PROBLEM BY CALLING THIS NUMBER”. The hacking company waits for you to
develop a system that:
a. Collect information from caller about driver performance and behavior as well
as truck condition,
b. Generates daily and monthly reports for each driver and truck management
c. Reports problems that require immediate action to an on-duty manager.
Analyze the problems that statement and list major functions to be incorporated with
the SRS document.
9. Explain the feasibility studies. What are the outcomes? Does it have implicit or
explicit effects on software requirement collection? (AU: May-17)
10. What is requirement elicitation? Briefly describe the various activities performed in
the requirements elicitation phase with an example of a watch system that facilitates
to set time and alarm. (AU: Dec-16, May-18)
11. Design DFD for library management system for level 0 DFD and level 1 DFD
12. Consider an online book stores. It accepts individual/bulk orders, process payments,
triggers delivery of the books. Some of the major features of the system include:
a. Order books
b. User friendly online shopping cart function
c. Create, view, modify and delete books to be sold
d. To store inventory and sales information in database
e. To provide an efficient inventory system
f. Register for book payment options
g. Request book delivery
h. Add a wish list
i. Place request for books not available
j. To be able to print invoices to members and print a set of summary reports
k. Internet access
Analyze the system using the context diagram and level 1 DFD for the system.
Explain the components of DFD
13. Consider the process of ordering a pizza over the phone. Draw the use case diagram
and also sketch the activity diagram representing each step of the process, from the
moment you pick up the phone to the point where you start eating the pizza. Include
activities that others need to perform. Add exception handling to the activity diagram
you developed. Consider at-least two exceptions (Example Delivery person wrote
down wrong address, deliver person brings wrong pizza)
14. What is the purpose of DFD? What are the components of DFD? Construct DFD for
the following system: An online shopping system for XYZ provides many services
and benefits to its members and staffs manually handle the purchasing information
with the use of basic office software, such as Microsoft office word and excel. It may
results in having mistakes easily and the process is very inconvenient. XYZ needs an
online shopping system has five key features:
a. To provide the user friendly online shopping cart function to members to
replace hardcopy ordering form;
b. To store inventory and sales information in database to reduce the human
mistakes, increase accuracy and enhance the flexibility of information
processing;
c. To provide an efficient inventory system which can help the XYZ staffs to
gain enough information to update the inventory;
d. To be able to print invoices to members and print a set of summary reports for
XYZ’s internal usage;
To design the system that is easy to maintain and upgrade.

UNIT III
PART-A
1. What are the elements of design model?
i. Data design
ii. Architectural design
iii. Interface design
iv. Component-level design

2. List out Design methods.


The Design methods are
 Object Oriented Design
 Function Oriented Design

3. Define design process.


Design process is a sequence of steps carried through which the requirements
are translated
into a system or software model.

4. List the principles of a software design.


i. The design process should not suffer from “tunnel vision”.
ii. The design should be traceable to the analysis model.
iii. The design should exhibit uniformity and integration.
iv. Design is not coding.
v. The design should not reinvent the wheel.

5. Define Modularity.
The modularity is an approach used during the designing of the software
system. I this approach, the software is divided into separately named and
addressable components called modules. Due to modularity, the program
becomes manageable.

6. What is the benefit of modular design?


Changes made during testing and maintenance becomes manageable and
they do not
affect other modules.
7. What is a cohesive module?
A cohesive module performs only “one task” in software procedure with little
interaction
with other modules. In other words cohesive module performs only one thing.
8. What are the different types of Cohesion?
i. Coincidentally cohesive –The modules in which the set I\of tasks are
related with
each other loosely then such modules are called coincidentally cohesive.
ii. Logically cohesive – A module that performs the tasks that are logically
related with
each other is called logically cohesive.
iii. Temporal cohesion – The module in which the tasks need to be executed in
some
specific time span is called temporal cohesive.
iv. Procedural cohesion – When processing elements of a module are related
with one
another and must be executed in some specific order then such module is called
procedural
cohesive.
v. Communicational cohesion – When the processing elements of a module
share the
data then such module is called communicational cohesive.
9. What is Coupling?
Coupling is the measure of interconnection among modules in a program
structure. It depends
on the interface complexity between modules.
10. Write a note on FURPS model of design quality. (Dec-17)
FURPS stands for Functionality, Usability, Reliability, performance and
supportability. These are the quality attributes used to measure design quality.
11. What is the need for architectural mapping using data flow? (May-16)
Transform mapping and transaction mapping is used for architectural mapping
using data flow diagrams.
12. How can refactoring be made more effective? (May-16)
After careful analysis of design separate out the components that can be
refactored. The refactor them and finally integrate and test them.
13. What UI design patterns are used for the following? (May-17, 18)
a) Page layout b) Tables c) Navigation through menus and web
pages d) Shopping cart
Page layout- card stack
Tables- Sorted Tables
Navigation through menus and web pages- Edit in place
Shopping cart- Shopping card which provide list of items selected for
purchase.
14. What are the various types of coupling?
i. Data coupling – The data coupling is possible by parameter passing or data
interaction.
ii. Control coupling – The modules share related control data in control
coupling.
iii. Common coupling – The common data or a global data is shared among
modules.
iv. Content coupling – Content coupling occurs when one module makes use
of data or
control information maintained in another module.
15. What are the common activities in design process?
i. System structuring – The system is subdivided into principle subsystems
components
and communications between these subsystems are identified.
ii. Control modeling – A model of control relationships between different
parts of the
system is established.
iii. Modular decomposition – The identified subsystems are decomposed into
modules.

16. What are the benefits of horizontal partitioning?


i. Software that is easy to test.
ii. Software that is easier to maintain.
iii. Propagation of fewer side effects.
iv. Software that is easier to extend.
17. What is vertical partitioning?
Vertical partitioning often called factoring suggests that the control and work
should be
distributed top-down in program structure.
18. What are the advantages of vertical partitioning?
i. These are easy to maintain changes.
ii. They reduce the change impact and error propagation.
19. What are the various elements of data design?
i. Data object – The data objects are identified and relationship among various
data objects
can be represented using ERD or data dictionaries.
ii. Databases – Using software design model, the data models are translated
into data structures and data bases at the application level.
iii. Data warehouses – At the business level useful information is identified
from various databases and the data warehouses are created.
20. List the guidelines for data design.
i. Apply systematic analysis on data.
ii. Identify data structures and related operations.
iii. Establish data dictionary.
iv. Use information hiding in the design of data structure.
v. Apply a library of useful data structures and operations.
21. Name the commonly used architectural styles.
i. Data centered architecture.
ii. Data flow architecture.
iii. Call and return architecture.
iv. Object-oriented architecture.
v. Layered architecture.
22. What is Transform mapping?
The transform mapping is a set of design steps applied on the DFD in order to
map the
transformed flow characteristics into specific architectural style.
23. What is a Real time system?
Real time system is a software system in which the correct functionalities of
the system are dependent upon results produced by the system and the time at
which these results are produced.
PART-B

1. Explain about the various design concepts considered during the design.
(AU: Dec-17)
2. Discuss in detail about the design process in software development process.
3. What is software architecture? Describe in detail different types of software
architectures with illustrations. (AU: May-17)
4. Discuss the design heuristics for effective modularity design. (AU: May-16)
5. What is software architecture? Describe in detail different software architectural
styles with examples. (AU: May-18)
6. Explain the design steps of the transform mapping.
7. Explain the design steps in transaction mapping.
8. Discuss about user interface design of software with an example and neat sketch.
(AU: Dec-17)
9. For an inventory system show the architectural and component design.

UNIT IV
PART-A

1. Define software testing?


Software testing is a critical element of software quality assurance and
represents the ultimate review of specification, design, and coding.

2. What are the objectives of testing?


i. Testing is a process of executing a program with the intend of finding an
error.
ii. A good test case is one that has high probability of finding an undiscovered
error.
iii. A successful test is one that uncovers as an-yet undiscovered error.
3. What are the testing principles the software engineer must apply while
performing the
software testing? (May-18)
i. All tests should be traceable to customer requirements.
ii. Tests should be planned long before testing begins.
iii. The pareto principle can be applied to software testing-80% of all errors
uncovered during
testing will likely be traceable to 20% of all program modules.
iv. Testing should begin “in the small” and progress toward testing “in the large”.
v. Exhaustive testing is not possible.
vi. To be most effective, an independent third party should conduct testing.
4. What are the two levels of testing?
i. Component testing Individual components are tested. Tests are derived
from developer‟s experience.
ii. System Testing The group of components are integrated to create a system
or sub- system is done. These tests are based on the system specification.
5. What are the various testing activities?
i. Test planning
ii. Test case design
iii. Test execution
iv. Data collection
v. Effective evaluation
6. Write short note on black box testing.
The black box testing is also called as behavioral testing. This method fully
focuses on the functional requirements of the software. Tests are derived that
fully exercise all functional requirements.
7. What is equivalence partitioning?
Equivalence partitioning is a black box technique that divides the input
domain into classes of data. From this data test cases can be derived. Equivalence
class represents a set of valid or invalid states for input conditions.
8. What is a boundary value analysis?
A boundary value analysis is a testing technique in which the elements at the
edge of the domain are selected and tested. It is a test case design technique that
complements equivalence partitioning technique. Here instead of focusing on
input conditions only, the test cases are derived from the output domain.
9. What are the reasons behind to perform white box testing?
There are three main reasons behind performing the white box testing.
1. Programmers may have some incorrect assumptions while designing or
implementing me functions.Due to this there are chances of having logical
errors in the program.To detect and correct such logical errors procedural details
need to be examined.
2. Certain assumptions on flow of control and data may lead programmer to make
design
errors.To uncover the errors on logical path,white box testing is must.
3. There may be certain typographical errors that remain undetected even after
syntax and type
checking mechanisms.Such errors can be uncovered during white box testing.
10. What is cyclomatic complexity? (May-14)
Cyclomatic complexity is a software metric that gives the quantitative
measure of
logical complexity of the program. The Cyclomatic complexity defines the
number
of independent paths in the basis set of the program that provides the
upper bound for
the number of tests that must be conducted to ensure that all the statements
have been executed
at least once.
11. How to compute the cyclomatic complexity?
The cyclomatic complexity can be computed by any one of the following
ways.
1. The numbers of regions of the flow graph correspond to the cyclomatic
complexity.
2. Cyclomatic complexity,V(G),for the flow graph,G,is defined as: V(G)=E-N+2,
E -- number of flow graph edges, N -- number of flow graph nodes
3. V(G)=P+1 Where P is the number of predicate nodes contained in the flow
graph.
12. Distinguish between verification and validation.
Verification refers to the set of activities that ensure that software correctly
implements a specific function.

Validation refers to a different set of activities that ensure that the software
that has been built is traceable to the customer requirements.
According to Boehm,
 Verification:” Are we building the product right?”
 Validation:” Are we building the right product?”
13. What are the various testing strategies for conventional software? (May-
06)
i. Unit testing ii. Integration testing.
iii. Validation testing. iv. System testing.
14. Write about drivers and stubs. (Dec -17)
Drivers and stub software need to be developed to test incompatible software.
 The “ driver” is a program that accepts the test data and prints the relevant
results.
 The “ stub” is a subprogram that uses the module interfaces and performs
the minimal data manipulation if required.
15. What are the approaches of integration testing?
The integration testing can be carried out using two approaches.
1. The non-incremental testing.
2. Incremental testing.
16. What are the advantages and disadvantages of big-bang? Advantages:
 This approach is simple.
Disadvantages:
 It is hard to debug.
 It is not easy to isolate errors while testing.
 In this approach it is not easy to validate test results.
 After performing testing, it is impossible to form an integrated system.
17. What are the benefits of smoke testing?
 Integration risk is minimized.
 The quality of the end-product is improved.
 Error diagnosis and correction are simplified.
 Assessment of program is easy.
18. What are the conditions exists after performing validation testing?
After performing the validation testing there exists two conditions.
 The function or performance characteristics are according to the
specifications and are accepted.
 The requirement specifications are derived and the deficiency list is created.
The deficiencies then can be resolved by establishing the proper
communication with the customer.
19. Distinguish between alpha and beta testing.
 Alpha and beta testing are the types of acceptance testing.
 Alpha test: The alpha testing is attesting in which the version of complete
software is tested by the customer under the supervision of developer. This
testing is performed at developer‟s site.
 Beta test: The beta testing is a testing in which the version of the software
is tested by the customer without the developer being present. This testing
is performed at customer‟s site.
20. What are the various types of system testing?
1. Recovery testing – is intended to check the system‟ s ability to recover
from failures.
2. Security testing – verifies that system protection mechanism prevent
improper penetration or data alteration.
3. Stress testing – Determines breakpoint of a system to establish maximum
service level.
4. Performance testing – evaluates the run time performance of the
software, especially real-time software.
21. What is smoke Testing? (May- 17)
The smoke testing is a kind of integration testing technique used for time critical
project where in the project need to be assessed on frequent basis.
22. Define debugging.
Debugging is defined as the process of removal of defect. It occurs as a
consequence of successful testing.
23. Identify the type of maintenance for each of the following:
a) Correcting the software faults
b) Adapting the change in environment.
 Corrective maintenance
 Adaptive maintenance
24. What is the need of Regression testing? (May-15)
Regression testing is required to test the defects that get propogated from one
module to another when changes are made to existing program. Thus regression
testing is used to reduce the side effects of changes
25. What are the common approaches in debugging?
 Brute force method: The memory dumps and run-time tracks are
examined and program with write statements is loaded to obtain clues to
error causes.
 Back tracking method: The source code is examined by looking
backwards from symptom to potential causes of errors.
Cause elimination method: This method uses binary partitioning to reduce the number
of locations where errors can exists.
PART-B

1. Explain the types of software testing.


2. What is Black box testing? Explain the different types of black box testing strategies.
Explain by considering suitable examples. (AU: Dec-16)
3. What is white box testing? Explain how various types of loops are tested. (AU: Dec-
17)
4. Given a set of ‘n’ numbers, write an algorithm that finds whether the given number is
positive, negative, zero, even or odd. Finally, the total number in each category is also
printed. Draw the flow graph and enumerate paths for testing. Determine the number
of independent paths using cyclomatic complexity.
5. Consider the pseudo code for simple subtraction given below
a. Program simple subtraction
b. Input (x, y)
c. Output (x)
d. Output (y)
e. If x>y then do
f. x-y=z
g. else y-x=z
h. endif
i. Output (z)
j. Output “End Program”
Perform basis path testing and generate test cases.
6. Explain about the software testing strategies.
7. Explain in detail about Integration testing.
8. Explain in detail about SCM.
9. Compare and Contrast alpha and beta testing. (AU: May-16)

UNIT V

PART-A

1. Define measure.
Measure is defined as a quantitative indication of the extent, amount,
dimension, or size of some attribute of a product or process.
2. Define metrics.
Metrics is defined as the degree to which a system component, or process
possesses a given attribute.
3. What are the types of metrics?
 Direct metrics – It refers to immediately measurable attributes. Example –
Lines of code, execution speed.
 Indirect metrics – It refers to the aspects that are not immediately quantifiable
or measurable. Example – functionality of a program.
4. What are the advantages and disadvantages of size measure? Advantages:
 Artifact of software development which is easily counted.
 Many existing methods use LOC as a key input.
 A large body of literature and data based on LOC already exists.
Disadvantages:
 This method is dependent upon the programming language.
 This method is well designed but shorter program may get suffered.
 It does not accommodate non procedural languages.
 In early stage of development it is difficult to estimate LOC.
5. Write short note on the various estimation techniques.
 Algorithmic cost modeling – the cost estimation is based on the size of the
software.
 Expert judgement – The experts from software development and the
application domain use their exoerience to predict software costs.
 Estimation by analogy – The cost of a project is computed by comparing the
project to a similar project in the same application domain and then cost can be
computed.
 Parkinson’s law – The cost is determined by available resources rather
than by objective assessment.
 Pricing to win – The project costs whatever the customer ready to spend it.
6. What is COCOMO model?
COnstructive COst MOdel is a cost model, which gives the estimate of
number of man- months it will take to develop the software product.
7. Give the procedure of the Delphi method.
1. The co-ordinator presents a specification and estimation form to each expert.
2. Co-ordinator calls a group meeting in which the experts discuss estimation
issues with the coordinator and each other.
3. Experts fill out forms anonymously.
4. Co-ordinator prepares and distributes a summary of the estimates.
5. The Co-ordinator then calls a group meeting.In this meeting the experts mainly
discuss the points where their estimates vary widely.
6. The experts again fill out forms anonymously.
7. Again co-ordinator edits and summarizes the forms,repeating steps
5 and 6 until the co-ordinator is satisfied with the overallprediction synthesized
from experts.
8. What is the purpose of timeline chart?
The purpose of the timeline chart is to emphasize the scope of the individual
task. Hence set of tasks are given as input to the timeline chart.
9. What is EVA? (May-18)
Earned Value Analysis is a technique of performing quantitative analysis of
the software Project.It provides a common value scale for every task of software
project.It acts as a measure for software project progress.
10. What are the metrics computed during error tracking activity?
 Errors per requirement specification page.
 Errors per component-design level
 Errors per component-code level
 DRE-requirement analysis
 DRE-architectural analysis
 DRE-component level design
 DRE-coding.
11. Why software change occurs?
Software change occurs because of the following reasons. ¾_New
requirements emerge when the software is used. ¾_The business environment
changes. ¾_Errors need to be repaired. ¾_New equipment must be
accommodated. ¾_The performance or reliability may have to be improved.
12. Write about software change strategies.
The software change strategies that could be applied separately or together are:
a. Software maintenance – The changes are made in the software
due to requirements.
b. Architectural transformation – It is the process of changing one
architecture into another form.
c. Software re-engineering – New features can be added to existing
system and then the system is reconstructed for better use of it in
future.
13. What is software maintenance?
Software maintenance is an activity in which program is modified after it has
been put into use.
14. Define maintenance.
Maintenance is defined as the process in which changes are implemented by
either modifying
the existing system‟ s architecture or by adding new components to the
system.
15. What is Risk Management? (Dec-16)
Risk management refers to the process of making decision based on an
evaluation of factors that treats to be business.
Various activities that are carried out for risk managements are
 Risk identification
 Risk Projection
 Risk Refinement
 Risk mitigation, monitoring and management.
16. List out the principles of Project Scheduling. (Dec-17)
 Compartmentalize
 Interdependency
 Time allocation
 Effort Validation
 Defined Responsibilities.

17. What are the different types of productivity estimation measures? (May-
17)
 LOC based Estimation
 Function based estimation
18. What is architectural evolution?
Architectural evolution is the process of changing a system from a centralized
architecture to a distributed architecture like client server.
PART-B

1. Explain about software cost estimation.


2. If team A found 342 errors prior to release of software and team B found 182 errors.
What additional measures and metrics needed to find out if teams have removed the
errors effectively? Explain.
3. Describe in detail about COCOMO model for software cost estimation. Illustrate
considering a suitable example. (AU: May-17)
4. Describe in detail COCOMO model for software cost estimation. Use it to estimate
effort required to build software for a simple ATM that produces 12 screens, 10
reports and has 80 software components. Assume average complexity and average
developer maturity. Use application composition model with object points.
5. Explain in detail about Delphi Method. Procedure
6. Explain in detail about software Maintenance.
7. Explain about CASE tools.
8. Study of requirement for ABC project has produced following results: Need for 7
inputs, 10 outputs, 6 inquiries, 17 files and 4 external interfaces. Input and external
interface function point attributes are of average complexity and all other function
points attributes are of low complexity.
Determine adjusted function points assuming complexity adjustment value is 32.
9. An application has the following:
10 low external inputs, 8 high external inputs, 13 low internal logic files, 17 high external
interface files, 11 average external inquiries and complexity adjustment factor of 1.10.
what are unadjusted and adjusted function point counts?
10. How functional point analysis methodology is is applied in estimation of software
size? Explain why FPA methodology is better than LOC methodology? (AU: May-17,
May-18)
11. Suppose you have a budgeted cost of a project as Rs.9, 00, 000. The project is to be
completed in 9 months. After a month, you have completed 10 percent of the project
at a total expense of Rs.1, 00, 000. The planned cost completion should have 15
percent. You need to determine whether the project is on-time and on-budget? Use
earned value analysis approach and interpret.
(Reference: Page No-5-42, Example: 5.6.3)

You might also like