Jrf Cs Sample2011

43
Test Code : RC (Short Answer Type) 2011 Junior Research Fellowship (JRF) in Computer Science The candidates for Junior Research Fellowship in Computer and Commu- nication Sciences will have to take two tests - Test MIII (objective type) in the forenoon session and Test RC (short answer type) in the afternoon session. The RC test booklet will have two groups as follows: GROUP A A test for all candidates in the basics of computer programming and discrete mathematics. GROUP B A test, divided into five sections in the following areas at M.Sc./M.E./M.Tech. level: Mathematics, Statistics, Physics, Electrical and Electronics Engineering, and Computer Science. A candidate has to answer questions from only one of these sections in GROUP B, according to his/her choice. Group A carries 40 marks and Group B carries 60 marks. The syllabi and sample questions of the RC test are given overleaf. 1

description

isi jrf sample paper

Transcript of Jrf Cs Sample2011

Page 1: Jrf Cs Sample2011

Test Code : RC (Short Answer Type) 2011

Junior Research Fellowship (JRF) in Computer Science

The candidates for Junior Research Fellowship in Computer and Commu-nication Sciences will have to take two tests - Test MIII (objective type)in the forenoon session and Test RC (short answer type) in the afternoonsession. The RC test booklet will have two groups as follows:

GROUP AA test for all candidates in the basics of computer programming and discretemathematics.

GROUP BA test, divided into five sections in the following areas at M.Sc./M.E./M.Tech.level:

• Mathematics,

• Statistics,

• Physics,

• Electrical and Electronics Engineering, and

• Computer Science.

A candidate has to answer questions from only one of these sections inGROUP B, according to his/her choice.

Group A carries 40 marks and Group B carries 60 marks.

The syllabi and sample questions of the RC test are given overleaf.

1

Page 2: Jrf Cs Sample2011

Syllabi

GROUP A:

Logical reasoning; elementary combinatorics including inclusion-exclusionprinciple and pigeonhole principle; basics of programming (using pseudo-code); elementary data structures including array, stack and queue; Booleanalgebra.

GROUP B:

Mathematics:

Graph theory and combinatorics: Graphs and digraphs, paths and cycles,trees, Eulerian graphs, Hamiltonian graphs, chromatic numbers, planargraphs, tournaments.

Linear algebra: Vector spaces, basis and dimension, linear transformations,matrices, rank, inverse, determinant, systems of linear equations, eigenvaluesand eigenvectors, orthogonality and quadratic forms.

Abstract algebra: Groups, subgroups, cosets, Lagrange’s theorem, normalsubgroups and quotient groups, permutation groups, rings, subrings, ideals,integral domains, fields, characteristic of a field, polynomial rings, uniquefactorization domains, field extensions, finite fields.

Elementary number theory: Elementary number theory, divisibility, congru-ences, primality.

Calculus and real analysis: Real numbers, convergence of sequences and se-ries, limits, continuity, uniform continuity of functions, differentiability offunctions of one or more variables, indefinite integral, fundamental theo-rem of integral calculus, Riemann integration, improper integrals, doubleand multiple integrals and applications, sequences and series of functions,uniform convergence.

2

Page 3: Jrf Cs Sample2011

Statistics:

Probability theory and distributions: Basic probability theory, discrete andcontinuous distributions, moments, characteristic functions, Markov chains.

Estimation and inference: Sufficient statistics, unbiased estimation, max-imum likelihood estimation, consistency of estimates, most powerful anduniformly most powerful tests, unbiased tests and uniformly most powerfulunbiased tests, confidence sets, Bayesian methods.

Linear models: Gauss-Markov set up and least squares theory, multiplelinear regression, one and two way analysis of variance.

Multivariate analysis: Multivariate normal distribution, Wishart distribu-tion, Hotelling’s T 2 test, principal component analysis, multiple and canon-ical correlations, discriminant analysis, cluster analysis, factor analysis.

Physics:

Classical mechanics: Lagrangian and Hamiltonian formulation of Newtonianmechanics, symmetries and conservation laws, motion in central field offorce, collisions and scattering, small oscillations and normal modes, wavemotion, special theory of relativity.

Electrodynamics: Electric and magnetic phenomena in dielectrics, Maxwell’sequations, conservation laws, gauge invariance, electromagnetic waves.

Thermodynamics and statistical physics: Laws of thermodynamics, statisti-cal basis of thermodynamics, thermodynamic potentials and Maxwell’s re-lations, density matrix formulation, ensembles, partition function, classicaland quantum statistics, blackbody radiation and Planck’s distribution law,Bose-Einstein condensation, Einstein and Debye models.

Quantum physics: Basics of quantum mechanics, two-body problem, centralpotential, angular momentum algebra, perturbation theory, Fermi’s goldenrule, quantum particles in electromagnetic fields, matrix mechanics, spin-statistics connection.

Atomic and nuclear physics: Energy spectrum of an electron in hydrogenatom, electron spin, L-S and J-J coupling, relativistic correction, selectionrules, Zeeman effect, Paschen-back effect and Stark effect, basic nuclearproperties, nuclear force, nuclear models, radioactive decays.

3

Page 4: Jrf Cs Sample2011

Electronics: Basics of semiconductor physics, transistors, amplifiers includ-ing feedback, oscillators, operational amplifiers, RLC circuits, digital inte-grated circuits, A/D and D/A converters.

Electrical and Electronics Engineering:

Digital circuits and systems: Gates and logic circuits, combinational andsequential circuits, A/D and D/A converters.

Circuit theory: Kirchoff’s laws, theorem of superposition, Thevenin’s theo-rem, Norton’s theorem, A.C. circuits.

Linear electronic devices and circuits: Transistors, amplifiers including feed-back amplifiers, oscillators, operational amplifiers.

Digital communication: Modulation theory, information theory, coding andchannel capacity, digital transmission.

Digital signal processing: Sampling, linear time invariant systems,Z-transform, discrete-time Fourier and discrete Fourier transforms, discrete-time random signals, filter structures, basics of multirate processing.

Linear control theory: Continuous and discrete linear systems, state-variablerepresentation, differential and difference equations, stability, controllability,observability.

Electrical machines: DC motors and generators, transformers, inductionmotors, measuring instruments (voltmeter, ammeter and galvanometer).

Computer Science:

Discrete mathematics: Functions and relations, recurrence relations, gener-ating functions, propositional logic, graphs and digraphs, paths and cycles,trees, planar graphs, Eulerian graphs, Hamiltonian paths.

Programming languages: Fundamental concepts - abstract data types, pro-cedure call and parameter passing, C language.

Data structures: Linked list, dequeue, binary tree, heap, AVL tree, B-tree.

Design and analysis of algorithms: Order notation, sorting, selection, search-ing, hashing, string handling algorithms, graph algorithms, NP-completeness.

4

Page 5: Jrf Cs Sample2011

Computer organization and architecture: Number representation, computerarithmetic, memory organization, I/O organization, microprogramming,pipelining, instruction level parallelism.

Operating systems: Process concept and management, scheduling, processsynchronization, concurrency control, critical section problems, deadlocks,memory management, file systems.

Formal languages and automata theory: Finite automata and regular expres-sions, context-free grammars, Turing machines, elements of undecidability.

Principles of compiler construction: Lexical analysis, parsing, syntax-directedtranslation, code optimization.

Database systems: Relational model, relational algebra, relational calcu-lus, functional dependency, normalization (including multi-valued depen-dencies), query processing, serializability and concurrency control, queryoptimization.

Computer networks: Layered network structures, network security, LANtechnology - bus/tree, ring, star; data communications - data encoding, flowcontrol, error detection/correction, TCP/IP networking including IPv4.

5

Page 6: Jrf Cs Sample2011

Sample Questions

Note that all questions in the sample set are not of same marks and same level of difficulty.

GROUP A

A1. Show how two complex numbers (a+ib) and (c+id) may be multipliedusing only three multiplications of real numbers, where i =

√−1. You

may use any number of additions and subtractions.

A2. Consider the pseudo-code given below.Input: Integers b and c.

1. a0 ← max(b, c), a1 ← min(b, c).

2. i← 1.

3. Divide ai−1 by ai . Let qi be the quotient and ri be the remainder.

4. If ri = 0 then go to Step 8.

5. ai+1 ← ai−1 − qi ∗ ai.6. i← i+ 1.

7. Go to Step 3.

8. Print ai .

What is the output of the above algorithm when b = 28 and c = 20?What is the mathematical relation between the output ai and the twoinputs b and c?

A3. Consider the sequence an = an−1 an−2 +n for n ≥ 2, with a0 = 1 anda1 = 1. Is a2011 odd? Justify your answer.

A4. Given an array of n integers, write pseudo-code for reversing the con-tents of the array without using another array. For example, for thearray10 15 3 30 3the output should be3 30 3 15 10.You may use one temporary variable.

6

Page 7: Jrf Cs Sample2011

A5. The integers 1, 2, 3, 4 and 5 are to be inserted into an empty stackusing the following sequence of push() operations:

push(1) push(2) push(3) push(4) push(5)

Assume that pop() removes an element from the stack and outputs thesame. Which of the following output sequences can be generated byinserting suitable pop() operations into the above sequence of push()operations? Justify your answer.

(a) 5 4 3 2 1

(b) 1 2 3 4 5

(c) 3 2 1 4 5

(d) 5 4 1 2 3.

A6. Derive an expression for the maximum number of regions that can beformed within a circle by drawing n chords.

A7. Given A = 1, 2, 3, . . . , 70, show that for any six elements a1, a2, a3,a4, a5 and a6 belonging to A, there exists one pair ai and aj for which|ai − aj | ≤ 14 (i = j).

A8. Consider the multiplication of two 2-bit integers a1a0 and b1b0 to geta 4-bit output c3c2c1c0. Assuming that the rightmost bit is the leastsignificant bit, derive Boolean functions for the output bits c0 and c3.

A9. Calculate how many integers in the set 1, 2, 3, . . . , 1000 are not di-visible by 2, 5, or 11.

A10. Let M be a 4-digit positive integer. Let N be the 4-digit integerobtained by writing the digits ofM in reverse order. If N = 4M , thenfind M . Justify your answer.

A11. Consider all the permutations of the digits 1, 2, . . . , 9. Find the numberof permutations each of which satisfies all of the following:

• the sum of the digits lying between 1 and 2 (including 1 and 2)is 12,

• the sum of the digits lying between 2 and 3 (including 2 and 3)is 23,

7

Page 8: Jrf Cs Sample2011

• the sum of the digits lying between 3 and 4 (including 3 and 4)is 34, and

• the sum of the digits lying between 4 and 5 (including 4 and 5)is 45.

A12. A Boolean operation denoted by ‘ =⇒ ’, is defined as follows:

A B A =⇒ B

T T T

F T T

T F F

F F T

Show that A ∨ B can be expressed in terms of ‘ =⇒ ’ alone, withoutusing any 0 or 1 input.

A13. A Boolean function fD1 is said to be the dual of another Booleanfunction f1 if fD1 is obtained from f1 by interchanging the operations‘+’ and ‘.’, and the constants ‘0’ and ‘1’. For example, if f1(a, b, c) =(a+ b).(b+ c) then fD1 (a, b, c) = a.b+ b.c.

A Boolean function f is self-dual if f1 = fD1 . Given f1(a, b, c) =ab+ bc+ x, find the Boolean expression x such that f1 is self-dual.

8

Page 9: Jrf Cs Sample2011

GROUP B

(i) MATHEMATICS

M1. (a) Let f be a real-valued continuous function on [0, 1] such that∫ 1

0f4(x)dx = 0. Show that f(x) = 0 for all x ∈ [0, 1].

(b) Let f be a real-valued continuously differentiable function with

f(0) = 1. Find limx→0

1

x2

∫ x2

−x2

f(t)dt.

(c) Let D ⊂ [0, 1] × [0, 1] be defined as D = (x, y) : xy ≥ 3/4.Compute

∫ ∫Dθ2(xy)θ−1dxdy, where θ is a constant.

M2. (a) Let f : [0, 1]→ [0, 1] be such that

f(x) = nx− [nx];1

n< x ≤ 1

n− 1; n = 2, 3, 4, . . . ; x = 0

and f(0) = 0. Show that∫ 10 f(x)dx exists and find its value.

Note: [y] = Largest integer ≤ y; y ∈ R.(b) Let f : [0, 1]→ (0,∞) be continuous. Let

an =

(∫ 1

0(f(x))ndx

) 1n

; n = 1, 2, 3, . . . .

Find limn→∞ an.

M3. (a) Suppose f is a continuous real valued function on [0, 1]. Showthat ∫ 1

0xf(x) dx =

1

2f(ξ)

for some ξ ∈ [0, 1].

(b) For every x ≥ 0, prove that

√x+ 1−

√x =

1

2√x+ θ(x)

,

for a unique θ(x), 0 < θ(x) < 1. Also prove that,(i) 1

4 ≤ θ(x) ≤12 , and

(ii) limx→0 θ(x) =14 and limx→∞ θ(x) = 1

2 .

9

Page 10: Jrf Cs Sample2011

M4. (a) Show that f(x) = e|x| − x5 − x − 2 has at least two real roots,where e is the base of natural logarithms.

(b) Let∑an be a convergent series such that an ≥ 0 for all n. Show

that∑√

an/np converges for every p > 1

2 .

M5. Let G be a finite group and f be an automorphism of G such thatf(f(x)) = x for all x ∈ G. Also, the only fixed point of f is e, i.e., ifg ∈ G and f(g) = g, then g = e.

(a) Show that the map g 7→ g−1f(g) is a bijection.

(b) Hence or otherwise, show that f(g) = g−1 for all g ∈ G.(c) Hence or otherwise, show that G is abelian.

M6. Let R = (S,+, ·, 0, 1) be a commutative ring and n be a positive integersuch that n = 2k for some positive integer k.

(a) Show that for every a ∈ S

n−1∑i=0

ai =k−1∏i=0

(1 + a2

i).

(b) Let m = wn2 + 1 where w ∈ S, w = 0. Show that for 1 ≤ p < n,

n−1∑i=0

wip ≡ 0 mod m.

M7. (a) Show that there is a basis consisting of only symmetric and skew-symmetric matrices for the vector space of all n×n real matricesover R.

(b) Does there exist a linear transformation from R3 to R3 such that(0,1,1), (1,1,0), (1,2,1) are mapped to (1,0,0), (0,1,0), (0,1,1) re-spectively? Justify your answer.

M8. (a) Let A be a square matrix such that A2 = A. Show that all eigenvalues of A are 0 or 1.

(b) Let A be a symmetric matrix whose eigenvalues are 0 or 1. Showthat A2 = A.

(c) Suppose A is an n× n matrix such that A2 = A. If rank(A) = rand rank(I −A) = s, show that r + s = n.

10

Page 11: Jrf Cs Sample2011

M9. (a) Show that in a connected graph, any two longest paths have atleast one vertex in common.

(b) Construct a cubic graph with 2n vertices having no triangles. (Agraph is cubic if every vertex has degree three.)

(c) Let G be a graph on 9 vertices. Show that either G has a triangleor G contains K4. (Here G is the complement of the graph G,and K4 is the complete graph with 4 vertices). [Hint: any vertexhas degree at least 4 in either G or G.]

(d) Let S = 0, 1, 2, 3 and let ak be the number of strings of length kover S having an even number of zeros. Find a recurrence relationfor ak and then solve for ak.

M10. Let T be a tree with n vertices. For vertices u, v of T , define d(u, v) tobe the number of edges in a path from u to v. Let W (T ) be the sumof d(u, v) over all

(n2

)pairs of vertices u, v.

(a) Suppose the tree T is a path on n vertices. Show that

W (T ) =1

2

n−1∑k=1

(k2 + k).

(b) Now, suppose T is a star graph on n vertices. Show thatW (T ) =(n−1)2. (N.B. The edge set of the star graph is equal to (u1, ui) :2 ≤ i ≤ n.)

(c) Hence or otherwise show that for any tree T ,

(n− 1)2 ≤W (T ) ≤ 1

2

n−1∑k=1

(k2 + k).

M11. (a) Show that, given 2n + 1 points with integer coordinates in Rn,there exists a pair of points among them such that all the co-ordinates of the midpoint of the line segment joining them areintegers.

(b) Find the number of functions from the set 1, 2, 3, 4, 5 onto theset 1, 2, 3.

M12. (a) A set S contains integers 1 and 2, and all integers of the form3x + y where x and y are distinct elements of S. What is S ?Justify your answer.

11

Page 12: Jrf Cs Sample2011

(b) Let ϕ(n) denote the number of positive integers m relativelyprime to n;m < n. Let n = pq where p and q are prime numbers.Then show that ϕ(n) = (p− 1)(q − 1) = pq(1− 1

q )(1−1p).

M13. Consider the n × n matrix A = ((aij)) with aij = 1 for i < j andaij = 0 for i ≥ j. Let

V = f(A) : f is a polynomial with real coefficients.

Note that V is a vector space with usual operations. Find the dimen-sion of V , when (a) n = 3, and (b) n = 4. Justify your answer.

M14. Consider the following system of equations over a field F.

a1x+ b1y = c1a2x+ b2y = c2,

where a1, a2, b1, b2, c1, c2 ∈ F. State the conditions for which the abovesystem of equations has (a) no solution, (b) a unique solution and (c)more than one solution.

Next consider the following equations over the field Zp, the field ofintegers modulo p, where p is a prime.

7x− y = 111x+ 7y = 3

For what value of p does this system of equations have (a) no solution,(b) a unique solution and (c) more than one solution? Find the solutionin the case of (b).

M15. In each of the following four problems, two sets S and T are given.You need to define a continuous and onto function f : S → T in eachof the cases. You need to provide mathematical reasons if you cannotdefine such an f .

(a) S = (0, 1), T = (0, 1].

(b) S = (0, 1], T = (0, 1).

(c) S = (0, 1) ∪ (2, 3), T = (0, 1).

(d) S = (0, 1), T = (0, 1) ∪ (2, 3).

12

Page 13: Jrf Cs Sample2011

M16. You are given 49 balls of colour red, black and white. It is knownthat, for any 5 balls of the same colour, there exist at least two amongthem possessing the same weight. The 49 balls are distributed in twoboxes. Prove that there are at least 3 balls which lie in the same boxpossessing the same colour and having the same weight.

M17. Consider a sequence an such that 0 < a1 < a2 and ai =√ai−1ai−2

for i ≥ 3.

(a) Show that a2n−1 : n = 1, 2, . . . is an increasing sequence anda2n : n = 1, 2, . . . is a decreasing sequence.

(b) Show that limn→∞

an exists.

(c) Find limn→∞

an.

M18. If every vertex of a graph G = (V,E) has degree at least |V |2 , then

prove that there is a simple cycle containing all the vertices. Notethat, a simple cycle with a vertex set U ⊆ V is a cycle where eachvertex of U appears only once if one traverses along the cycle.

13

Page 14: Jrf Cs Sample2011

(ii) STATISTICS

S1. (a) Let Xnn≥1 be a sequence of random variables satisfyingXn+1 =Xn + Zn (addition is modulo 5), where Znn≥1 is a sequence ofindependent and identically distributed random variables withcommon distributionP (Zn = 0) = 1/2, P (Zn = −1) = P (Zn = +1) = 1/4.Assume that X1 is a constant belonging to 0, 1, 2, 3, 4. Whathappens to the distribution of Xn as n→∞?

(b) Let Ynn≥1 be a sequence of independent and identically dis-tributed random variables with a common uniform distributionon 1, 2, . . . ,m. Define a sequence of random variables Xnn≥1

as Xn+1 = MAXXn, Yn where X1 is a constant belonging to1, 2, . . . ,m. Show that Xnn≥1 is a Markov chain and classifyits states.

S2. Let x1, x2, . . . , xn be a random sample of size n from the gamma dis-tribution with density function

f(x, θ) =θk

Γ(k)e−θxxk−1, 0 < x <∞,

where θ > 0 is unknown and k > 0 is known. Find a minimum varianceunbiased estimator for 1

θ .

S3. Let 0 < p < 1 and b > 0. Toss a coin once where the probabilityof occurrence of head is p. If head appears, then n independent andidentically distributed observations are generated from Uniform (0, b)distribution. If the outcome is tail, then n independent and identicallydistributed observations are generated from Uniform (2b, 3b) distribu-tion. Suppose you are given these n observations X1, . . . , Xn, but notthe outcome of the toss. Find the maximum likelihood estimator of bbased on X1, . . . , Xn. What happens to the estimator as n goes to∞?

S4. Let X1, X2, . . . be independent and identically distributed randomvariables with common density function f . Define the random variableN as

N = n, if X1 ≥ X2 ≥ · · · ≥ Xn−1 < Xn; for n = 2, 3, 4, . . . .

Find Prob(N = n). Find the mean and variance of N .

14

Page 15: Jrf Cs Sample2011

S5. (a) Let X and Y be two random variables such that(logX

log Y

)∼ N(µ,Σ).

Find a formula for ϕ(t, r) = E(XtY r), where t and r are realnumbers, and E denotes the expectation.

(b) Consider the linear model yn×1 = An×pβp×1+ ϵn×1 and the usualGauss-Markov set up where E(ϵ) = 0 and D(ϵ) = σ2In×n, Edenotes the expectation and D denotes the covariance matrix.Assume that A has full rank. Show that V ar

(βLS1

)= (α −

ΓTB−1Γ)−1σ2 where

ATA =

[α1×1 ΓT

Γ Bp−1×p−1

]Γ is a p− 1 × 1 matrix and βLS1 = the least square estimate ofβ1, the first component of the vector β, V ar denotes the variance,and AT denotes the transpose of the matrix A.

S6. Let X = (X1, . . . , Xn) and Y = (Y1, . . . , Yn) be two independent andidentically distributed multivariate random vectors with mean 0 andcovariance matrix σ2In, where σ

2 > 0 and In is the n × n identitymatrix.

(a) Show that XTY/(∥X∥ · ∥Y∥) and V =∑

(X2i +Y

2i ) are indepen-

dent.(Here, ∥(a1, . . . , an)∥ =

√a21 + · · ·+ a2n ).

(b) Obtain the probability density function of(∑n

i=1X2i /

∑ni=1 Y

2i

).

S7. Let X1, X2, . . . , Xn be independent random variables. Let E(Xj) = jθand V (Xj) = j3σ2, j = 1, 2, . . . , n, −∞ < θ < ∞ and σ2 > 0. HereE(X) denotes the expectation and V (X) denotes the variance of therandom variable X. It is assumed that θ and σ2 are unknown.

(a) Find the best linear unbiased estimate for θ.

(b) Find the uniformly minimum variance unbiased estimate for θunder the assumption that Xi’s are normally distributed; 1 ≤i ≤ n.

S8. Let (X,Y ) follow a bivariate normal distribution. Let mean of X =mean of Y = 0, variance of X = variance of Y = 1, and the correlationcoefficient between X and Y be ρ. Find the correlation coefficientbetween X3 and Y 3.

15

Page 16: Jrf Cs Sample2011

S9. Let the probability density function of a random variable X be f(x),−∞ < x <∞, and we have two hypotheses

H0 : f(x) = (2π)−1/2 exp(−x2/2) andH1 : f(x) = (1/2) exp(−|x|).In connection with testing H0 against H1, derive the most powerfultest at level α = 0.05.

S10. Let X1, X2, . . . , Xn be independent and identically distributed obser-vations with a common exponential distribution with mean µ. Showthat there is no uniformly most powerful test for testing H0 : µ = 1against HA : µ = 1 at a given level 0 < α < 1, but there exists auniformly most powerful unbiased test. Derive that test.

S11. (a) An unbiased die is rolled once. Let the score be N ∈ 1, 2, . . . , 6.The die is then rolled n times. Let X be the maximum of thesen scores. Find the probability of the event (X = 6).

(b) The unit interval (0,1) is divided into two sub-intervals by pickinga point at random from the interval. Let Y and Z be the lengthsof the longer and shorter sub-intervals, respectively. Find thedistribution of Z and show that Y

Z does not have a finite expec-tation.

S12. LetX1, X2, X3 be independent and identically distributed observationswith a common double exponential distribution with density

f(x, θ) =1

2exp(−|x− θ|), −∞ < x <∞, −∞ < θ <∞.

Suppose that the observations are all distinct.

(a) Find the maximum likelihood estimator of θ. Give a completeargument for your answer.

(b) Suppose it is known that −10 ≤ θ ≤ 10. Find the maximumlikelihood estimator of θ. Justify your answer.

16

Page 17: Jrf Cs Sample2011

S13. Consider the following linear model

yij = αi + βj + eij , i = 1, 2; j = 1, 2, 3;

(a) What is the rank of the error-space? Justify your answer.

(b) Write down any linear function of observations that belongs to(i) estimation space, (ii) error space.

(c) Write down a parametric function that is not estimable. Justifyyour answer.

S14. Let A = HHH,HHT,HTH,HTT, THH, THT, TTH, TTT be thespace obtained by tossing a coin three times. Let f : A→ (0,∞) andx1 ∈ A. For any xi ∈ A, xi+1 is found in the following way.Toss a fair coin three times and let the outcome be z.If f(z) ≥ f(xi) then xi+1 = z, otherwise xi+1 = xi.

What can you say about limi→∞ f(xi)? Justify your answer.

S15. Let there be two classes C1 and C2. Let the density function forclass Ci be pi(x) for i = 1, 2 where pi(x) = ie−ix; x > 0, i = 1, 2.Let the prior probability for C1 be 0.4 and the prior probability forC2 be 0.6. Find the decision rule for classification of an observation,which provides the minimum probability of misclassification and findits value for that decision rule.

S16. (a) Let x1∼ , x2∼ , x3∼ , . . . , x10∼ be a random sample of 10 observations froma 100 dimensional multivariate normal distribution with disper-sion matrix

∑= ((σij))100×100. Let σij be maximum likelihood

estimate of σij based on x1∼ , x2∼ , x3∼ , . . . , x10∼ . Let∑

= ((σij))100×100.

Show that rank (∑

) ≤ 10.

(b) Show that X1 + 2X2 is not sufficient for µ where X1 and X2 aretwo independent and identically distributed observations fromN(µ, 1) distribution.

S17. (a) Suppose X ∼ N(θ, 1), where θ ≥ 0. For any fixed x > 0, define

g(θ) = Pθ(X2 > x), θ ≥ 0.

Show that g(θ) is a strictly increasing function of θ on [0,∞).

17

Page 18: Jrf Cs Sample2011

(b) Suppose X ∼ Np(θ, Ip), where θ ∈ IRp, and Ip is the identitymatrix of order p. For any fixed x > 0, define

h(θ) = Pθ(XTX > x), θ ∈ IRp.

Assuming h(θ) depends on θ only through θTθ, show that h(θ)is a strictly increasing function of θTθ.

S18. (a) Suppose independent observations are generated from the lin-ear regression model yi = β0 + β1xi + ϵi, i = 1, 2, . . . , n, wherex1, . . . , xn are known positive numbers, and E(ϵi) = 0 ∀i,Var(ϵi) =σ2 ∀i. However, we fit the model yi = β1xi + ϵi. Show that thebias in the least squares estimate of β1 is at most β0/x.

(b) Consider the linear model (Y ,Xβ, σ2In), where X is an n × pmatrix with entries 0, 1 and −1. Assume that X is of full columnrank. Show that if βj denotes the best linear unbiased estimate(BLUE) of βj , then

Var(βj) ≥ σ2/n.

S19. Suppose that X has uniform distribution over the square defined bythe four vertices (0, θ), (θ, 0), (0,−θ) and (−θ, 0) in the plane, whereθ > 0. Let X1,X2, . . . ,Xn be independent and identically distributed(i.i.d.) observations from this distribution. Find the maximum likeli-hood estimate of θ based on these observations.

S20. Let X1, . . . , Xn be a random sample from a Bernoulli(p) distribution.We want to test H0 : p = 0.4 against H1 : p = 0.6.

(a) Find the most powerful test for testing H0 against H1.

(b) Use the Central Limit Theorem to determine the sample sizeneeded so that the two probabilities of error of the test obtainedin (a) are both approximately equal to α. Find the result in termsof zα, the (1− α)-th quantile of N(0, 1).

18

Page 19: Jrf Cs Sample2011

(iii) PHYSICS

P1. Consider a particle of mass m moving in a plane under a centralforce

F (r) = −k1r3r +

k2r4r, where k1, k2 > 0.

i. Show that ∇ × F = 0. Discuss its significance.

ii. What is the Lagrangian for this system in terms of polarcoordinates r and θ and corresponding velocities?

iii. Derive the equation of motion from the Lagrangian and showthat the orbital angular momentum is a constant of motion.

P2. i. A spring pendulum consists of a mass m attached to one endof a massless spring with spring constant k. The other endof the spring is tied to a fixed support (see figure). When no

m

weight is attached to the spring, its length is l. Assume thatthe motion of the spring is confined to a vertical plane.

(i) Derive the equations of motion of the mass m.

(ii) Solve the equations of motion assuming that angular andradial displacements are small.

ii. In a laboratory experiment, a muon is observed to travel800 m before it disintegrates. Based upon the lifetime of amuon being 2 × 10−6 s, a student concludes that its speedwas

v =800 m

2× 10−6 s= 4× 108 m/s.

Faster than light! Identify the student’s error and find theactual speed of the muon.

P3. A particle of massm is constrained to move on a smooth sphere ofradius a and is acted on by gravity. Choosing θ and ϕ (polar andazimuthal angles, with polar axis vertically up) as the generalized

19

Page 20: Jrf Cs Sample2011

coordinates, write down the Hamiltonian for the particle. ObtainHamilton’s equations of motion and show that

aθ =k2 cos θ

m2a3 sin3 θ+ g sin θ,

where k is the constant value of pϕ, the generalized momentumcorresponding to ϕ.

P4. i. Two similar charges are placed at a distance 2b apart. Find,approximately, the minimum radius a of a groundedconducting sphere placed midway between them that wouldneutralize their mutual repulsion.

ii. Consider a long cylindrical co-axial capacitor with aninner conductor of radius a, an outer conductor of radius b,and a dielectric with a dielectric constant k(r), varying withcylinder radius r. The capacitor is charged to a voltage V .

A. Calculate the radial dependence of k(r) such that theenergy density in the capacitor is constant (under thiscondition the dielectric has no internal stress).

B. Calculate the electric field E(r) for these conditions.

P5. A wire bent as a parabola y = ax2 is located in a uniform mag-netic field of induction B, the vector B being perpendicular to theplane (x, y). At time t = 0, a connector starts sliding translationwise from the vertex of the parabola with a constant accelerationf . Find the e.m.f. of electromagnetic induction in the loop thusformed as a function of y.

P6. (a) A particle of mass m and charge e enters a homogeneous re-tarding electric field with a velocity v parallel to the directionof the field. How much time will the particle take to returnto its initial position?

(b) Find the electrostatic energy of a uniformly charged sphericalshell of total charge q, and radii R1 and R2 (R2 > R1).

(c) From the set of Maxwell’s equations for electrodynamics, de-rive the charge conservation equation.

P7. (a) Sketch the Fermi-Dirac distributions at zero temperature andat a small non-zero temperature.

(b) Derive the relation between pressure and volume of a freenon-relativistic electron gas at zero temperature.

20

Page 21: Jrf Cs Sample2011

(c) Show that the heat capacity of a monatomic lattice at tem-perature T is proportional to (Tθ )

3 for low temperature inthe Debye approximation. Here θ denotes the effective De-bye temperature and T << θ.

P8. i. The molar internal energy of a monatomic gas obeying vander Waals equation is given by 3

2RT −aV , where a is a con-

stant, and R, T and V carry their usual meanings.

(i) If the gas is allowed to expand adiabatically into vacuum(i.e., free expansion) from volume V1 to V2, and T1 is itsinitial temperature, what is the final temperature of thegas?

(ii) What would be the final temperature for an ideal gas?

ii. A single classical particle of mass m with energy ϵ ≤ E,where E = P 2/2m, is enclosed in a volume V ; P being themomentum corresponding to the energy E.

(i) Determine the (asymptotic) number of accessible microstatesin the energy range ϵ to ϵ+ dϵ.

(ii) Using this result, obtain the partition function of theaforesaid system if the energy varies between 0 and ∞.

(iii) What would be the free energy of the particle?

P9. (a) From the first law of thermodynamics deduce,

dQ = CV dT +

[(∂U

∂V

)T

+ P

]dV,

where the symbols have their usual meanings.

(b) Calculate the energy, in terms of kT and EF , for which thedifference between the Maxwell-Boltzmann (MB) approxima-tion and the Fermi-Dirac distribution (FD) function is fivepercent of the FD function. The symbols mentioned carrytheir usual meanings.

P10. (a) A very small spherical meteor is at a distance form the sunequal to 50 times the diameter of the sun. If the surfacetemperature of the sun is 6000K, estimate the temperatureof the meteor.

21

Page 22: Jrf Cs Sample2011

(b) A nuclear fission explosion produces a fire ball that can beapproximated at some instant to be a black body of 10 cmradius having a temperature 108K. Calculate(i) the total electromagnetic power radiated,(ii) the radiation flux at a distance of 1 km, and(iii) the wavelength corresponding to maximum energy radi-

ated.[Stefan’s constant (σ)= 0.57× 10−7 Wattm−2K−4 andWien’s (displacement law) constant = 2.9× 10−3 meter Kelvin.]

P11. (a) In the electron spin-orbit interaction the two possible valuesof j are l+ 1

2 and l− 12 . Show that the expectation values of

SZ in the states j = l+ 12 and j = l− 1

2 are +mj~2l+1 and −mj~

2l+1respectively. [All the symbols have their usual meanings.]

(b) A particle in the infinite square well has the initial wavefunction

Ψ(x, 0) = A sin3πx

a, (0 ≤ x ≤ a)

(i) Determine A.(ii) Find Ψ(x, t).(iii) Calculate < x > as a function of time.

(c) Assume that three spins S1,S2,S3 are arranged in the formof an equilateral triangle with each spin interacting with itstwo neighbors (see figure below). Each spin can take values+1 or −1. The energy of this system in a magnetic fieldperpendicular to the plane of the triangle, is

H = −J(S1S2 + S2S3 + S3S1)− F(S1 + S2 + S3).

Here J and F are constant parameters.

SS

S

31

2

(i) Find the partition function of the system.(ii) Find the average spin.

22

Page 23: Jrf Cs Sample2011

P12. Consider a simple harmonic oscillator in one dimension with the

Hamiltonian H = ~ω(a†a+

1

2

), where a and a† are annihilation

and creation operators respectively. The other symbols have theirusual meanings.

i. Show that a |n> =√n |n−1>, |n> being the eigen function

of H corresponding to the eigen value En = ~ω(n+1

2).

ii. Consider the wave function of a harmonic oscillator at t = 0

ψ(0) = N (|0> +2|1> +3|2>) ,

where N is the normalization constant.

(i) Find the value of N .

(ii) Calculate the probability of observing the energy of theoscillator to be 3

2~ω upon measurement.

(iii) Find the wave function ψ(t) at time t and calculate theexpectation value of the energy for this wave function.

P13. Consider a system of three non interacting particles that are con-fined to move in a one dimensional infinite potential well of lengtha:

V (x) = 0, 0 < x < a

= ∞, otherwise

Determine the energy and wave function of the ground state andthe first excited state, when the particles are

(a) spinless and distinguishable with masses m1 < m2 < m3,(b) identical bosons,(c) distinguishable spin 1

2 particles.

P14. i. A substance shows a Raman line at 4567A when the exciting

line 4358A is used. Deduce the positions of Stokes and anti-

Stokes lines for the same substance when the exciting line

4047A is used.

ii. The ground state of chlorine is 2P 32. Find its magnetic mo-

ment. How many substates will the ground state split intoin a weak magnetic field?

P15. The Λ-particle is an unstable sub-atomic particle that can decayspontaneously into a proton and a negatively charged pion

Λ→ p+ π−.

23

Page 24: Jrf Cs Sample2011

In a certain experiment, the outgoing proton and pion were ob-served, both travelling in the same direction along the positivex-axis with momenta Pp and Pπ− respectively. Find the rest massof Λ-particle given the rest masses of proton and pion to be mp

and mπ− respectively.

P16. i. Consider the multiplication of two 2-bit integers a1a0 andb1b0 to get a 4-bit output c3c2c1c0. Design a circuit forderiving the bit c2 using only 2-input NAND gates.

ii. Suppose in a voltage sensitive Wheatstone bridge, each armhas a resistance R. Now the resistance of one arm is changedto R + r, where r << R. The Wheatstone bridge issupplied with an input voltage of ei. Show that on accountof imbalance, the output voltage is[

(r/R)

4 + 2(r/R)

]ei.

P17. (a) A negative feedback amplifier has a voltage gain of 100. Vari-ations of the voltage gain up to ±2% can be tolerated forsome specific application. If the open-loop gain variations of±10% are expected owing to spread in device characteristicsbecause of variation in manufacturing conditions, determinethe minimum value of the feedback ratio β and also the openloop gain to satisfy the above requirements.

(b) Calculate the output voltage V0 for the following network:

5V 10K 20K

10K 20K

5V

20K 5V

+

-

V

V

V 2

1

o

+

-

-

-

-

+

+

+

24

Page 25: Jrf Cs Sample2011

P18. (a) Consider the following circuit for deriving a +5 volt powersupply to a resistive load RL from an input d-c voltage sourcewhose voltage may vary from 8V to 11V. The load RL maydraw a maximum power of 250 mW. The Zener diode has abreakdown voltage of 5 volts. Compute the maximum value

DC voltage

source -

+ R

Zener

diode R

L

5 V

+

-

8 - 11 V

of the resistance R and also the power dissipation require-ments for R and the Zener diode. Assume that the minimumbreakdown current of the Zener diode is negligible comparedto the load current.

(b) Consider the following circuit. Calculate the potential dif-ference between the points F and C, as shown by the idealvoltmeter.

10

2

2

4

2

2

4

5 V

+ -

A

EF

D

CB

1

25

Page 26: Jrf Cs Sample2011

(iv) ELECTRICAL AND ELECTRONICS ENGINEERING

E1. (a) Consider the multiplication of two 2-bit integers a1a0 and b1b0 toget a 4-bit output c3c2c1c0. Design a circuit forderiving the bit c2 using only 2-input NAND gates.

(b) Consider a bit sequence ai, i ≥ 0 which has the property ai+4 =ai+1 ⊕ ai.i. To generate this sequence, which bits of the sequence need

to be initialized?

ii. Design a logic circuit using flip-flops and NAND gates togenerate the above bit sequence.

iii. For any given value of i, identify the points in the circuit atwhich the values of ai, ai+1, . . . , ai+4 may be obtained.

E2. In the following circuit, determine the current through the 4Ω resistor.It is assumed that the two batteries are ideal and L is an ideal currentsource.

2 Ω

2 Ω

1 Ω 3 Ω

4 Ω

10 Ω

6 A L

10 V

24 V

I

26

Page 27: Jrf Cs Sample2011

E3. A long shunt D.C. generator supplies power to 55 lamps of rating200 W, 220 V each at 88% overall efficiency. The shunt and seriesfield resistances are 110 Ω and 0.06 Ω respectively, while the armatureresistance is 0.04 Ω. Calculate

(a) the copper loss,

(b) the iron and friction loss,

(c) the torque of the rotor if the generator runs at 1000 r.p.m., and

(d) the efficiency of the generator if the shunt field resistance ischanged to 220 Ω.

E4. Consider a voltage amplifier circuit shown in the figure below, whereRi and R0 represent the input and output impedances respectively,C0 is the total parasitic capacitance across the output port, µ is theamplifier gain and the output is terminated by a load resistance RL.

(a) Calculate the current, voltage and power gain in decibels (dB) ofthe amplifier, whenRi = 1MΩ, RL = 600Ω, R0 = 100MΩ, C0 = 10pf , µ = 10.

(b) Calculate the 3-dB cutoff frequency of the amplifier whenRi = 5KΩ, RL = 1KΩ, R0 = 100Ω, C0 = 10pf , µ = 2.

E5. Open-circuit and short-circuit tests are conducted on a 220/440 V,4.4 KVA, single phase transformer. The following readings are ob-tained.

Open Circuit test with voltage applied on low-voltage side:

Voltage = 110 V,Current = 1.1A, andPower = 150 W.

Short Circuit test with voltage applied on high-voltage side:

27

Page 28: Jrf Cs Sample2011

Voltage = 24 V,Current = 8A, andPower = 64 W.

At 0.8 p.f. lagging, calculate

(i) the efficiency of the transformer at full-load, and

(ii) the output voltage at the secondary terminal when supplying full-load secondary current.

E6. Assume that an analog voice signal which occupies a band from 300Hz to 3400 Hz, is to be transmitted over a Pulse Code Modulation(PCM) system. The signal is sampled at a rate of 8000 samples/sec.Each sample value is represented by 7 information bits plus 1 paritybit. Finally, the digital signal is passed through a raised cosine roll-offfilter with the roll-off factor of 0.25. Determine

(a) whether the analog signal can be exactly recovered from the dig-ital signal;

(b) the bit duration and the bit rate of the PCM signal before filter-ing;

(c) the bandwidth of the digital signal before and after filtering;

(d) the signal to noise ratio at the receiver end (assume that theprobability of bit error in the recovered PCM signal is zero).

E7. (a) Determine the necessary and sufficient conditions on theparameters (k, α) such that all roots of the cubic equation s(s+2)(s+5)+k(s+α) = 0 are in the left-half plane, where s denotesthe Laplace Transform operator.

Using Routh-Hurwitzs’ criterion, determine the value of α interms of k to make the system stable.

(b) The transfer function of a single-input single-output (SISO) sys-

tem is given by P (s) =4

1 + 0.4s.

i. Determine the controller characteristics G(s) such that thedesired transmittance T (s) for the unity feedback system is

4

1 + 0.5s.

ii. Draw the block diagram of the overall system showing all ofits components.

28

Page 29: Jrf Cs Sample2011

E8. Determine the stability of the following closed loop system. S repre-sents Laplace operator.

E9. Consider a hypothetical three-input H gate defined as

H(A,B,C) = AC ′ +B′C.

Using minimum number of H gates, realize the conventional BooleanNOT, two-input AND, two-input OR and two-input XOR. The twoinput variables may be denoted by A and B.

E10. (a) A prism is made of wire mesh with each side having equal resis-tance R. (See the figure given below.) A battery of 6 V and zerointernal resistance is connected across E and F. If R is 0.5 Ω, findthe current in the branch AD.

A B

CD

E

F

29

Page 30: Jrf Cs Sample2011

(b) In the circuit given below, the capacitor C1 having capacitance Cis charged to potential V0. At time t = 0, the switch S1 is closedwhile S2 is opened and the capacitor C2 of capacitance 2C was

uncharged. After time t = π√LC6 , if the switch S1 is opened and

the switch S2 is closed, find the maximum charge stored on C2.

L S

S

1

2

2

C = 2C

1C = C

E11. (a) Consider a Discrete Memory-less System (DMS) with eight sym-bols x0, x1, . . . , x7 occurring with probabilities 0.005,0.005, 0.04, 0.10, 0.10, 0.15, 0.25 and 0.35 respectively.

i. Devise an optimum variable length code for this system.

ii. What is the entropy of the DMS in bits?

iii. What is the average number of bits required by this codingsystem?

[log2 3 = 1.58496, log2 5 = 2.32193, and log2 7 = 2.80736.]

(b) Define Mutual Information (MI) between two randomvariables X and Y when

i. both X and Y are discrete,

ii. X is discrete and Y is continuous.

iii. In case (ii) above, consider that X has two outcomes x1 = Aand x2 = −A. If the conditional probability density functionp(y/xi) is Gaussian with mean xi and variance σ2 for i = 1, 2,then find the MI of the system.

30

Page 31: Jrf Cs Sample2011

E12. A 5 KVA distribution transformer has a full load efficiency at unitypower factor of 95%. It is given that Copper and Iron losses of thetransformer are of equal proportion (1:1) at full load. Calculate theaverage efficiency per day and explain the steps involved in the com-putation. Assume that the transformer is loaded throughout 24 hourswith the following load pattern:

(a) 1/4 th of full load for 7 hours

(b) No load for 10 hours

(c) 1/2 of full load for 5 hours

(d) Full load for 2 hours

Also, assume that the power factor of the load for the whole day to beunity.

E13. (a) A sequence x[n] of length 8 has a Discrete Fourier Transform(DFT) X[k] as follows:

X[k] =

1; k = 0, 1, 2, 3k − 2; k = 4, 5, 6, 70; otherwise.

x[n] is now up-sampled by a factor of 2 by inserting a zero betweenevery pair of samples of x[n], and appending a zero at the end toproduce a sequence y[n] of length 16. Sketch Y [k], the 16-pointDFT of y[n].

(b) A zero-mean, wide-sense stationary sequence with variance σ2xpasses through a stable and causal all-pass filter with z-transform

H(z) =α− z−1

1− αz−1.

Determine the range of values that α can take. Also calculatethe power spectrum of the output, i.e., the Discrete Time FourierTransform (DTFT) of the auto-correlation sequence of the out-put.

31

Page 32: Jrf Cs Sample2011

E14. (a) Consider the following circuit where the amplifier has a voltagegain of A with zero phase shift. Let a ramp voltage Vi = αt,α (> 0) being a constant, be applied to the input. Derive anexpression for the output voltage Vo. Also, find the initial slopeof Vo as time t→ 0.

C

R2

2

VoVi

C

R

1

1

+

−−

+Amplifier

(b) Calculate the gain and cutoff frequency of the following circuitwhen R1 = R2 = 2 kΩ, C1 = C2 = 0.05 µF, Roi = 10 kΩ andRof = 50 kΩ.

+

V

C C

R R

R R

1

1

2

21 Vo

oi of

op−amp

32

Page 33: Jrf Cs Sample2011

(v) COMPUTER SCIENCE

C1. (a) Write the smallest real number greater than 6.25 that can berepresented in the IEEE-754 single precision format (32-bit wordwith 1 sign bit and 8-bit exponent).

(b) Convert the sign-magnitude number 10011011 into a 16-bit 2’scomplement binary number.

(c) The CPU of a machine is requesting the following sequence ofmemory accesses given as word addresses: 1, 4, 8, 5, 20, 17,19, 56. Assuming a direct-mapped cache with 8 one-word blocks,that is initially empty, trace the content of the cache for the abovesequence.

C2. Consider a collection of n binary strings S1, . . . , Sn. Each Si is oflength li bits where 1 ≤ li ≤ k.(a) Write a function prefix(S,T) in C programming language that

takes two binary strings S and T and returns 1 if S is a prefix ofT, else it returns 0. For example, prefix (001,00101) returns 1but prefix(010,00101) returns 0.

(b) Suppose we want to report all the pairs (i, j) for which Si is aprefix of Sj , (1 ≤ i = j ≤ n). How many times do we need to callthe prefix function described above?

(c) Write an O(nk) time algorithm to report all the (i, j)’s as men-tioned in (b). (Hint: Use a binary tree with each edge markedas 0 or 1; a path from the root to a node in the tree represents abinary string.)

C3. Let S = x1, x2, . . . xn be a set of n integers. A pair (xi, xj) (wherei = j) is said to be the closest pair if |xi − xj | ≤ |xi′ − xj′ |, for allpossible pairs (xi′ , xj′), i

′, j′ = 1, 2, . . . , n, i′ = j′.

(a) Describe a method for finding the closest pair among the set ofintegers in S using O(n log2 n) comparisons.

(b) Now suggest an appropriate data structure for storing the ele-ments in S such that if a new element is inserted to the set S oran already existing element is deleted from the set S, the currentclosest pair can be reported in O(log2 n) time.

(c) Briefly explain the method of computing the current closest pair,and necessary modification of the data structure after each up-date. Justify the time complexity.

33

Page 34: Jrf Cs Sample2011

C4. Consider the C program given below.

#include <stdio.h>

#define n 5

#define m n*n

int **a;

main()

int i, j, k;

void printarray();

a = (int **)calloc(n, sizeof(int *));

for(i = 0; i < n; i++)

*(a+i) = (int *)calloc(n, sizeof(int));

for(k=1, i=0, j=(n-1)/2; k<=m; i--, j--, k++)

i = (i + m) % n;

j = (j + m) % n;

if (a[i][j] != 0)

i = (i + 2) % n;

j = (j + 1) % n;

a[i][j] = k;

printarray();

return 0;

void printarray()

int i, j;

for(i = 0; i < n; i++)

for (j = 0; j < n; j++)

printf("%d", a[i][j]);

printf("\n");

(a) Write the output of the above program.

(b) Modify the subroutine “printarray” to print all the elements ofthe array in decreasing order.

34

Page 35: Jrf Cs Sample2011

C5. Let a1 = 1, a2 = 2, and an = an−1 + an−2 + 1 for n > 2.

(a) Express 63 as a sum of distinct ai’s.

(b) Write an algorithm to express any positive integer k as a sum ofat most ⌈log2 k⌉ many distinct ai’s.

(c) Prove the correctness of your algorithm.

C6. Let A be an n×n matrix such that for every 2×2 sub-matrix

(a bc d

)of A, if a < b then c ≤ d. Moreover, for any pair of rows i and j,if aik and ajl are the largest elements in i-th and j -th rows of A,respectively, then k ≤ l (as illustrated in the 5× 5 matrix below).

3 4 2 1 17 8 5 6 42 3 6 6 55 6 9 10 74 5 5 6 8

(a) Write an algorithm for finding the maximum element in each row

of the matrix with time complexity O(n log n).

(b) Establish its correctness, and justify the time complexity of theproposed algorithm.

C7. Consider a file consisting of 100 blocks. Assume that each disk I/Ooperation accesses a complete block of the disk at a time. How manydisk I/O operations are involved with contiguous and linked allocationstrategies, if one block is

(a) added at the beginning?

(b) added at the middle?

(c) removed from the beginning?

(d) removed from the middle?

C8. (a) Consider the context-free grammar G = (S,A, a, b, S, P ),where P = S → AS,

S → b,A→ SA,A→ a.

35

Page 36: Jrf Cs Sample2011

Show that G is left-recursive. Write an equivalent grammar G′

free of left-recursion.

(b) Consider the grammar G = (S, T, a, π, (, ),+, S, P ),where

P = S → a|π|(T ),T → T + S|S.

Find the parse tree for the sentence:

(((a+ a) + π + (a)) + a)

C9. (a) Five batch jobs P1, . . . , P5 arrive almost at the same time. Theyhave estimated run times of 10, 6, 2, 4 and 8 ms, respectively.Their priorities are 3, 5, 2, 1 and 4 respectively, where 1 indicatesthe highest priority and 5 indicates the lowest. Determine theaverage turnaround and waiting time for the following schedulingalgorithms:

(i) Round robin with time quantum of 5 ms,

(ii) Priority scheduling.

(b) The access time of a cache memory is 100 ns and that of mainmemory is 1000 ns. It is estimated that 80% of the memoryrequests are for read and the remaining 20% are for write. Thehit ratio for read access is 0:9. A write through procedure is used.

(i) What is the average access time of the system consideringonly memory read cycles?

(ii) What is the average access time of the system consideringboth read and write requests?

C10. (a) A program P consisting of 1000 instructions is run on a machineat 1 GHz clock frequency. The fraction of floating point (FP)instructions is 25%. The average number of clock-cycles per in-struction (CPI) for FP operations is 4.0 and that for all otherinstructions is 1.0.

(i) Calculate the average CPI for the overall program P .

(ii) Compute the execution time needed by P in seconds.

(b) Consider a 100mbps token ring network with 10 stations havinga ring latency of 50 µs (the time taken by a token to make onecomplete rotation around the network when none of the stations isactive). A station is allowed to transmit data when it receives thetoken, and it releases the token immediately after transmission.The maximum allowed holding time for a token (THT) is 200 µs.

36

Page 37: Jrf Cs Sample2011

(i) Express the maximum efficiency of this network when only asingle station is active in the network.

(ii) Find an upper bound on the token rotation time when allstations are active.

(iii) Calculate the maximum throughput rate that one host canachieve in the network.

C11. Consider a graph G (called an interval graph) whose nodes correspondto a set of intervals on the real line. The i-th interval is denoted by[αi, βi], where 0 ≤ αi < βi. An edge between two nodes (i, j) impliesthat the corresponding intervals [αi, βi] and [αj , βj ] overlap.

(a) Consider the set of intervals [3, 7], [2, 4], [2, 3], [1, 5], [1, 2], [6, 7],[10, 16], [11, 12]. Draw the corresponding interval graph and iden-tify the largest subgraph where all the nodes are connected toeach other.

(b) Write an algorithm which takes the interval graph G as inputand finds the largest subgraph of G in which all the nodes areconnected to each other. What is the time complexity of youralgorithm?

(c) Given a list of intervals, write an algorithm to list all the con-nected components in the corresponding interval graph. What isthe time complexity of your algorithm?

C12. (a) Let R = (A,B,C,D,E, F ) be a schema with the set F = A →BC, CD → E,B → D,E → A of functional dependencies.Suppose R is decomposed into two schemata R1 = (A,B,C) andR2 = (A,D,E, F )

(i) Is this decomposition loss-less? Justify.

(ii) Is this decomposition dependency preserving? Justify.

(iii) Identify all the candidate keys for R.

(iv) Decompose R into normalized sets of relations using 3NF.

(v) If a new dependency A F (multi-valued dependency) isintroduced, what would be the new set of normalized rela-tions?

(b) Consider the relations r1(A,B,C), r2(C,D,E) and r3(E,F ). As-sume that the set of all attributes constitutes the primary keysof these relations, rather than the individual ones. Let V (C, r1)be 500, V (C, r2) be 1000, V (E, r2) be 50, and V (E, r3) be 150,where V (X, r) denotes the number of distinct values that appear

37

Page 38: Jrf Cs Sample2011

in relation r for attribute X . If r1 has 1000 tuples, r2 has 1500tuples, and r3 has 750 tuples, then give the ordering of the nat-ural join r1 r2 r3 for its efficient computation. Justify youranswer.

C13. (a) Write a Context Free Grammar (CFG) for structure definitions(structs) in C. Assume that the fields in a structure can onlybe of char, int or float type (i.e., you need not consider fields thatare pointers, or arrays, or fields that are themselves of structuretype).

(ii) Assume that chars are stored using 1 byte each; ints and floats arestored using 4 bytes each and are aligned at 4 byte boundaries.Add semantic rules to your grammar to calculate the number ofbytes required to store the structure defined by your grammar.

(b) (i) Compute the canonical collection of sets of LR(1) items (i.e.canonical LR items) for the following grammar: S → aXcd,S → aY ce, X → b, Y → b. Is the grammar LR(1)? Brieflyjustify.

(ii) Give an example of a grammar that is unambiguous but notLR(2). Briefly justify/explain your example.

C14. An operating system allocates memory in units of 1 KB pages. Theaddress space of a process can be up to 64 MB in size; however, at anypoint of time, a process can be allocated at most 16 MB of physicalmemory. In addition the kernel uses 65 KB of physical memory tostore page table entries of the current process. The OS also uses atranslation-lookaside buffer (TLB) to cache page table entries. Youare also given the following information:

• size of a page table entry is 4 bytes,

• TLB hit ratio is 90%,

• time for a TLB lookup is negligible,

• time for a memory read is 100 nanoseconds,

• time to read a page from the swapping device into physical mem-ory is 10 milliseconds.

Calculate the effective memory access time for a process whose ad-dress space is 20 MB? Assume that memory accesses are random anddistributed uniformly over the entire address space.

38

Page 39: Jrf Cs Sample2011

C15. (a) What are the conditions which must be satisfied by a solution tothe critical section problem?

(b) Consider the following solution to the critical section problem fortwo processes. The two processes, P0 and P1, share the followingvariables:

char flag[2] = 0,0;

char turn = 0;

The program below is for process Pi (i = 0 or 1) with process Pj

(j = 1 or 0) being the other one.

do

flag[i] = 1;

while (flag[j])

if (turn == j)

flag[i] = 0;

while (turn == j) ;

...

CRITICAL SECTION

...

turn = j;

flag[i] = 0;

...

REMAINDER SECTION

...

while (1);

Does this solution satisfy the required conditions?

C16. (a) Construct an AVL tree of height 5 with minimum number ofnodes.

(b) Consider a B-tree of order 3.

(i) Trace the insertion of the keys a, g, f, b, k, d, h, m, into aninitially empty tree, in lexicographic order.

(ii) Sketch the B-tree upon deletion of keys h, d.

C17. (a) Construct a finite state machine that accepts all the binary stringsin which the number of 1’s and number of 0’s are divisible by 3and 2, respectively.

39

Page 40: Jrf Cs Sample2011

(b) Describe the language recognized by the following machine.

a

bb

b

a,b

ba

a

a

(c) Consider the grammar E → E + n|E × n|n. For a sentencen + n × n, find the handles in the right sentential form of thereductions.

C18. (a) Station A is sending data to station B over a full duplex errorfree channel. A sliding window protocol is being used for flowcontrol. The send and receive window sizes are 6 frames each.Each frame is 1200 bytes long and the transmission time for sucha frame is 70 µS. Acknowledgment frames sent by B to A are verysmall and require negligible transmission time. The propagationdelay over the link is 300 µS. What is the maximum achievablethroughput in this communication?

(b) Consider a large number of hosts connected through a sharedcommunication channel. The hosts transmit whenever they haveany data. However, if two data packets try to occupy the channelat the same time, there will be a collision and both will be gar-bled. The hosts retransmit these packets that suffered collisions.Assume that the generation of new packets by a host is a Poissonprocess and is independent of other hosts. The total number oftransmissions (old and new packets combined) per packet timefollows Poisson distribution with mean 2.0 packets per packettime. Compute the throughput of the channel. (Packet time isthe amount of time needed to transmit a packet.)

C19. For a graph G = (V,E), a vertex coloring with x colors is defined as afunction C : V → 1, 2, . . . , x, such that C(u) = C(v) for every edge(u, v) ∈ E. The chromatic polynomial P (G, x) denotes the number of

40

Page 41: Jrf Cs Sample2011

distinct vertex colorings for G with at most x colors. For example,P (K2, x) = x(x− 1).

(a) Derive the chromatic polynomial for the graphs

i. K1,5

ii. C4

where Km,n denotes the complete bipartite graph of m and nvertices in the two partitions, and Cn is the simple cycle with nvertices.

(b) Consider Kn to be a complete graph with n vertices. ExpressP (Kn, x) as a recurrence relation and solve it.

C20. The diameter of a tree T = (V,E) is given by maxu,v∈V

δ(u, v), where

δ(u, v) is the shortest path distance (i.e., the length of the shortestpath) between vertices u and v. So, the diameter is the largest of allshortest path distances in the tree.

(a) Write pseudo-code for an efficient algorithm to compute the di-ameter of a given tree T .

(b) Analyze the time complexity of your algorithm.

(c) What is its space complexity?

(d) Clearly mention the data structure(s) used by your algorithm.

(e) A vertex c is called a center of a tree T if the distance from c toits most distant vertex is the minimum among all vertices in V .Write an algorithm to determine and report a center of the giventree T .

C21. (a) Write a context-free grammar for the language consisting of allstrings over a, b in which the number of a’s is not the same asthat of b’s.

(b) Let the set D = p | p is a polynomial over the single variable x,and p has a root which is an integer (positive or negative).i. Design a Turing machine (TM) to accept D.

ii. Can D be decided by a TM? Justify your answer.

41

Page 42: Jrf Cs Sample2011

C22. Consider three parallel lines L1, L2 and L3. On each line Li, a set ofn points pi1, pi2, . . . , pin is placed.The objective is to identify a triplet of indices (k, ℓ,m) (if exists) suchthat a straight line can pass through p1k, p2ℓ and p3m on L1, L2 andL3 respectively. [See the following two figures for a demonstration.]

L1

L2

L3

L1

L2

L3

(a) (b)

In Figure (a), there does not exist any triplet (k, ℓ,m) such that astraight line can pass through p1k, p2ℓ and p3m. In Figure (b), thetriplet (3, 3, 4) is a solution since a straight line passes through p13, p23and p34.

Present an efficient algorithm for solving this problem. Justify itscorrectness and worst case time complexity.

[Full credit will be given if your algorithm is correct, and of worst casetime complexity O(n2).]

C23. Consider a bit sequence ai, i ≥ 0 which has the property ai+4 =ai+1 ⊕ ai.

(a) To generate this sequence, which bits of the sequence need to beinitialized?

(b) Design a logic circuit using flip-flops and NAND gates to generatethe above bit sequence.

(c) For any given value of i, identify the points in the circuit at whichthe values of ai, ai+1, . . . , ai+4 may be obtained.

42

Page 43: Jrf Cs Sample2011

C24. (a) How many distinct labeled spanning trees does a complete graphof n vertices have? Give a formal argument toestablish your answer.

(b) A least expensive connection route among n houses needs to bedesigned for a cable-TV network. Consider the following algo-rithm A for finding a spanning tree.

Algorithm AInput: G = (V,E)Output: Set of edges M ⊆ ESort E in decreasing order of cost of edges;i← 0;while i < |E| dobegin

Let temp = (u1, u2) be the i-th edge E[i] in E;Delete E[i], i.e., replace E[i] by ϕ;if u1 is disconnected from u2 then

restore temp in list E as E[i];i← i+ 1;

endreturn the edges in E which are not ϕ;

i. Prove that the algorithm A can be used to correctly finda least cost connection route, given a set of n houses andinformation about the cost of connecting any pair of houses.

ii. What is the worst case time complexity of A?iii. If all the edges have distinct cost, how many solutions can

there be?

43