You are on page 1of 12

GATE – 2 0 1 5

CS : COM PU T ER SCI EN CE
& I N F ORM AT I ON T E CH N OL OGY
Set - 1
N o. of Qu est i on s : 65 M a xi m u m M a r k s : 100

GEN ERAL APT I T UD E (GA)


(Q. 1 – 5): Car r y On e M ar k Each (Q. 6 – 10): Car r y Tw o M ar k s Each
1. Given Set A = {2, 3, 4, 5} and Set B = {11, 12, 13, 6. The pi e char t bel ow has t he br eak up of t he
14, 15}, t wo number s ar e r andomly select ed, one number of st udent s for m differ ent depar t ment s
fr om each set . What is t he pr obabilit y t hat t he in an engineer ing college for t he year 2012. The
sum of t he t wo number s equals t o 16 ? pr opor t ion of male t o female st udent s in each
(a) 0.20 (b) 0.25 depar t ment i s 5 : 4. Ther e ar e 40 mal es i n
Elect r ical Engineer ing. What is t he differ ence
(c) 0.30 (d) 0.33 bet ween t he number s of female st udent s in t he
2. Which of t he following opt ions is t he closest in Civil depar t ment and t he female st udent s in t he
meaning t o t he sent ence below ? Mechanical depar tment ?
She enjoyed her self immensely at t he par t y.
(a) She had a t er r ible t ime at t he par t y
(b) She had a hor r ible t ime at t he par t y
(c) She had a t er r ific t ime at t he par t y
(d) She had a t er r ifying t ime at t he par t y
3. Wh i ch on e of t h e f ol l owi ng combi nat i ons i s
incorr ect ?
(a) Acquiescence – Submission 7. The given st at ement is followed by some cour ses
(b) Wheedle – Roundabout of act ion. Assuming t he st at ement t o be t r ue,
decide t he cor r ect opt ion.
(c) Flippancy – L ight ness
St at em en t :
(d) Profligat e – Extr avagant
Ther e has been a significant dr op in t he wat er
4. Based on t he given st at ement s, select t he most level in t he lakes supplying wat er t o t he cit y.
appr opr iat e opt ion t o solve t he given quest ion.
Cou r se of act i on :
I f t wo floor s in a cer t ain building ar e 9 feet apart ,
how many st eps ar e t her e in a set of st air s t hat I . The wat er supply aut hor it y should impose a
par t ial cut in supply t o t ackle t he sit uat ion.
ext ends fr om t he fir st floor t o t he second floor of
the building ? I I . The gover nment shoul d appeal t o al l t he
resident s through mass media for minimal use
St at em en t s :
of wat er.
I . Each st ep is ¾ foot high
I I I. The gover nment should ban t he wat er supply
I I . Each st ep is 1 foot wide. in lower ar eas.
(a) St at ement I alone is sufficient , but stat ement (a) St at ement s I and I I follow
I I alone is not sufficient (b) St at ement I and I I I follow
(b) St at ement I I alone is sufficient, but st atement (c) St at ement s I I and I I I follow
I alone is not sufficient
(d) All st at ement s follow
(c) Bot h st at ement s t oget her ar e sufficient , but
8. Select the alter native meaning of t he under lined
neit her st at ement alone is sufficient
par t of t he sent ence.
(d) St atement I and I I t oget her ar e not sufficient
The chain snat cher s t ook t o t heir heels when t he
5. Didn’t you buy ______ when you went shopping? police par t y ar r ived.
(a) any paper (a) t ook shelt er in a t hick jungle
(b) much paper (b) open indiscriminat e fir e
(c) no paper (c) t ook t o flight
(d) a few paper (d) uncondit ionally sur rendered
2 SOLVED PAPER – 2015 (SET - 1)

9. The number of st udent s i n a class who have 3. Which one of t he following is TRUE at any valid
answer ed cor r ect ly, wr ongly, or not at t empt ed st at e in shift – r educe par sing ?
each quest ion in exam, ar e list ed in t he t able (a) Viable pr efixes appear only at t he bot t om of
below. The marks for each question are also listed.
t he st ack and not inside
Ther e is no negat ive or par t ial mar king.
(b) Viable pr efixes appear only at t he t op of t he
Q. No. Mark s Answered Answer ed Not st ack and not inside
Correct ly Wrongly A tt empt ed
(c) The st ack contains only a set of viable pr efixes
1 2 21 14 6
(d) The st ack never cont ains viable pr efixes
2 3 15 27 2
4. The height of a t r ee is t he lengt h of t he longest
3 1 11 29 4
r oot -t o-l eaf pat h i n i t . T h e maxi mu m an d
4 2 23 18 3 minimum number of nodes in a binar y t r ee of
5 5 31 12 1 height 5 ar e
What is t he aver age of the mar ks obt ained by the (a) 63 and 6, r espect ively
class in t he examinat ion ? (b) 64 and 5, r espect ively
(a) 2.290 (b) 2.970 (c) 32 and 6, r espect ively
(c) 6.795 (d) 8.795 (d) 31 and 5, r espect ively
10. T h e pr obabi l i t i es t h at a st u den t passes i n
5. M at ch t he following :
M at hemat ics, Physics and Chemist r y ar e m, p,
and c r espectively. Of t hese subject s, t he st udent P : Prim’s algor ithm for minimum spanning t ree
has 75% chance of passing in at least one, a 50% Q : Fl oyd – War shal al gor i t hm for al l pai r s
chance of passing in atleast t wo and a 40% chance short est pat hs
of passing in exact ly two. Following r elations ar e R : M er gesor t
dr awn in m, p, c.
S : H amiltonian cir cuit
27
I. p + m + c = (I) Backtr acking
20
13 (II) Gr eedy met hod
II. p + m + c =
20 (II I) Dynamic pr ogr amming
1
I II . (p)  (m)  (c) = (IV) Divide and conquer
10
(a) P-I I I , Q-I I , R-I V, S-I
(a) only r elat ion I is t r ue
(b) only r elat ion I I is t r ue (b) P-I , Q-I I , R-I V, S-I I I
(c) r elat ions I I and I I I ar e t r ue (c) P-I I , Q-I I I , R-I V, S-I
(d) r elat ions I and I I I ar e t r ue (d) P-I I , Q-I , R-I I I , S-I V
6. Which one of t he following is NOT equivalent t o
COM PU T ER SCI ENCE & I NF ORM AT I ON
pq?
TECH NOL OGY
(a) ( p q) (p  q)
(Q. 1 – 25): Car r y On e M ar k Each
(b) ( p q) (q  p)
1. Suppose t hat ever yone in a gr oup of N people
wants to communicate secretly with the N-1 others (c) ( p q) (p  q)
using symmet r ic key cr ypt ogr aphic system. The (d) ( p  q) (p  q)
communicat ion bet ween any t wo persons should 7. SEL ECT oper at ion in SQL is equivalent t o
not be decodable by t he ot her s in the gr oup. The
(a) t h e sel ect i on oper at i on i n r el at i on al
number of keys requir ed in the system as a whole
t o sat isfy t he confidentiality r equir ement is algebra
(a) 2N (b) N(N-1) (b) t he select ion oper at ion in r elat ional algebr a,
except that SELECT in SQL retains duplicates
(c) N(N-1)/2 (d) (N-1)2
(c) t he pr oject ion oper at ion in r elat ional algebr a
2. Which one of t he following fields of an I P header
is NOT modified by a t ypical I P r out er ? (d) t h e pr oj ect i on oper at i on i n r el at i on al
(a) Checksum (b) Sour ce address algebr a, except t hat SEL ECT in SQL r et ains
duplicates
(c) Time t o L ive (TTL ) (d) L engt h
SOLVED PAPER – 2015 (SET - 1) 3

8. For any t wo languages L 1 and L 2 such t hat L 1 is 13. Whi ch of t he fol lowing i s/ar e cor r ect i nor der
context -fr ee and L 2 is recursively enumer able but t r aver sal sequence(s) of binar y sear ch t r ee(s)?
not r ecu r si ve, wh i ch of t he fol l owi n g i s/ar e I . 3, 5, 7, 8, 15, 19, 25
necessarily t rue ?
I I . 5, 8, 9, 12, 10, 15, 25
I. L 1 (complement of L 1) is r ecur sive I II . 2, 7, 10, 8, 14, 16, 20
I I . L 2 (complement of L 2) is r ecur sive IV. 4, 6, 7, 9, 18, 20, 25
I II . L 1 is cont ext – fr ee (a) I and I V only
(b) I I and I I I only
IV. L 1  L 2 is r ecur sively enumer able
(c) I I and I V only
(a) I only
(d) I I only
(b) I I I only
14. Suppose t wo host s use a TCP connect i on t o
(c) I I I and I V only t r ansfer a l ar ge fi l e. Whi ch of t he fol l owi ng
(d) I and I V only statements is/ar e FAL SE with respect to t he TCP
connection ?
9. For a set A, t he power set of A is denot ed by 2A. I f
A = {5, {6}, {7}}, which of the following options ar e I . I f t he sequence number of a segment is m,
TRUE ? t hen t he sequence number of t he subsequent
segment is always m + 1.
I .  2A I I .  2A
I I . I f t he est imat ed r ound t r ip t ime at any given
I II . {5, {6}}  2A IV. {5{6}}  2A
poi n t of t i m e i s t sec t h e val u e of t h e
(a) I and I I I only (b) I I and I I I only r et r an smi ssi on t i meou t i s al w ays set t o
(c) I , I I and I I I only (d) I , I I and I V only gr eat er t han or equal t o t sec.
10. Consider a 4-bit Johnson count er wit h an init ial I II . The si ze of t he adver t i sed window never
value of 0000. The count ing sequence of t his ch an ges du r i n g t h e cu r se of t h e T CP
count er is connect ion.
(a) 0, 1, 3, 7, 15, 14, 12, 8, 0 IV. The number of unacknowledged byt es at t he
sender is always less t han or equal t o t he
(b) 0, 1, 3, 5, 7, 9, 11, 13, 15, 0
adver t ised window.
(c) 0, 2, 4, 6, 8, 10, 12, 14, 0 (a) I I I only (b) I and I I I only
(d) 0, 8, 12, 14, 15, 7, 3, 1, 0 (c) I and I V only (d) I I and I V only
11. Which of the following st at ement s is/are FALSE ? 15. For computer s based on thr ee-address instr uction
I. XM L over comes t he limit at ions in H TM L t o format s, each addr ess field can be used to specify
suppor t a st r uct u r ed way of or gan i zi n g which of t he following.
cont ent . S1 : A memor y oper and
I I . XM L specificat ion is not case sensit ive while S2 : A pr ocessor r egist er
H TM L specificat ion is case sensit ive. S3 : An implied accumulat or r egist er
I II . XM L support s user defined tags while HTML (a) Eit her S1 or S2 (b) Eit her S2 or S3
uses pr e-defined t ags.
(c) only S2 and S3 (d) All of S1, S2 and S3
IV. XM L t ags need not be closed while H TM L
16. Con si der a sy st em w i t h byt e– addr essabl e
t ags be closed memor y, 32-bit logical addr esses, 4 kilobyt e page
(a) I I only size and page t able ent r ies of 4 byt es each. The
(b) I only size of t he page t able in t he syst em in megabyt es
(c) I I and I V only is .
17. The following t wo funct ions P1 and P2 that shar e
(d) I I I and I V only
a var iable B wit h an init ial value of 2 execut e
12. A file is or ganized so t hat t he or der ing of dat a concur r ent ly.
r ecor ds is t he same as or close t o t he or der ing of
P1 ( ) { P2 ( ) {
dat a ent r ies in some index. Then t hat index is
called C = B – 1; D = 2 * B;
(a) Dense (b) Sparse B = 2 * C; B = D – l;
} }
(c) Clust er ed (d) Unclustered
4 SOLVED PAPER – 2015 (SET - 1)

18. lim x x1/x is 24. M at ch t he following :


(a)  (b) 0 P : Condit ion coverage
(c) 1 (d) Not defined Q : Equivalence class par tit ioning
19. Which one of t he foll owing is t he r ecur r ence R : Volume t est ing
equat ion for t he wor st case t ime complexit y of S : Alpha test ing
t h e Qui ck sor t al gor i t hm for sor t i ng n ( 2) (I) Black-box t est ing (II) System t est ing
number s ? I n t he r ecur r ence equat ions given in (II I) White-box testing (IV) Per for mance t est ing
t he opt ions below, c is a const ant .
(a) P-I I , Q-I I I , R-I , S-I V (b) P-I I I , Q-I V, R-I I , S-I
(a) T(n) = 2T(9n/2) + cn
(c) P-I I I , Q-I , R-I V, S-I I (d) P-I I I , Q-I , R-I I , S-I V
(b) T(n) = T(n – 1) + T(1) + cn
(c) T(n) = 2T(n – 1) + cn  2 2
25. I n t he L U decomposit ion of t he mat r ix  ,
(d) T(n) = T(n/2) + cn 4 9
if t he diagonal element s of U ar e both 1, t hen t he
x g  h ( x)  lower diagonal ent r y 122 of L is .
20. I f g(x) =1 – x and h(x) = , t hen is
x 1 h  g( x) 
(Q. 26 – 55): Car r y Tw o M ar k s Each
h ( x) 1 26. The gr aph shown below has 8 edges wit h distinct
(a) (b)
g( x) x integer edge weights. The minimum spanning tree
g( x) x (MST) is of weight 36 and contains t he edges: {(A,
(c) (d) 2 C), (B, C), (B, E), (E, F), (D, F)}. The edge weight s
h ( x) 1  x 
of only t hose edges which are in the MST are given
21. I n one of t he pair s of pr ot ocols given below, bot h
in t he figur e shown below. The minimum possible
t he pr ot ocols can use mult iple TCP connect ions
sum of weights of all 8 edges of this graph is .
bet ween t he same client and t he ser ver. Which
one is t hat ?
(a) H TTP, FTP (b) H TTP, TEL NET
(c) FTP, SM TP (d) H TTP, SM TP
22. What ar e t he worst-case complexities of insert ion
and delet ion of a key in a binar y sear ch t r ee ?
27. Consi der a di sk pack wi t h a seek t i me of 4
(a) (log n) for bot h inser t ion and delet ion
milliseconds and rotational speed of 10000 rotations
(b) (n) for bot h inser t ion and delet ion per minute (RPM). I t has 60 sector s per track and
(c) (n) for inser t ion and (log n) for delet ion each sector can store 512 byt es of data. Consider a
(d) (log n) for inser t ion and (n) for delet ion file stored in the disk. The file contains 2000 sectors.
23. The out put of t he following C pr ogr am is . Assume that ever y sector access necessitates a
seek , and t he aver age r ot at i onal l at ency for
void f1(int a, int b)
accessing each sector is half of t he time for one
{
complete r otation. The total time (in milliseconds)
int c; needed to r ead the entir e file is .
c=a; a=b; b=c;
28. Consider t he following pseudo code, wher e x and
} y ar e posit ive int eger s.
void f2(int * a, int * b) begin
{ q: = 0
int c; r :=x
c=* a; * a=* b; * b=c; while r  y do
} being
r :=r – y
int main ( )
q:=q+1
{ end
int a=4, b=5, c=6; end
f1(a, b); The post condition t hat needs t o be satisfied after
f2(& b, & c); t he pr ogr am t er minat es is
pr int f(“%d”, c– a– b); (a) {r = qx + y  r < y} (b) {x = qy + r  r < y}
} (c) {y = qx + r  0 < r < y}(d) {q + 1 < r – y  y > 0}
SOLVED PAPER – 2015 (SET - 1) 5

29. Consider t he following r elat ions : 32. What i s t he out put of t he fol l owi ng C code?
St u den t s Assume t hat t he addr ess of x is 2000 (in decimal)
and an int eger r equir es four byt es of memor y ?
Rol l Nu m ber St u d en t Nam e int main( )
1 Raj {
2 Rohit unsigened int x[4] [3] = {(1,2,3),
3 Raj {4,5,6}, {7, 8, 9}, {10, 11, 12}};
Per for man ce pr int f(“ %u, %u, %u” , x + 3, * (x + 3),
* (x + 2) + 3);
Rol l N u m ber Cou r se M ar k s
}
1 M at h 80
(a) 2036, 2036, 2036
1 English 70
(b) 2012, 4, 2204
2 M at h 75
(c) 2036, 10, 10
3 English 80 (d) 2012, 4, 6
2 Physics 65
33. The binar y oper at or  is defined by t he following
3 M at h 80 t r ut h t able.
Consider t he following SQL quer y.
SELECT S. St udent _Name, sum (P.M arks) p q p q
FROM St udent S, Per for mance P 0 0 0
WH ERE S.Roll_No = P.Roll_No 0 1 1
GROUP BY S.Student_Name 1 0 1
The number of r ows t hat will be r et ur ned by t he 1 1 0
SQL query is .
30. Consider a unipr ocessor syst em execut ing t hr ee Which one of the following is true about the binary
t asks T 1, T 2 and T 3, each o which is composed of oper at or ?
an infinit e sequence of jobs (or inst ances) which (a) Bot h commut at ive and associat ive
ar r i ve per iodical ly at i nt er vals of 3, 7 and 20
(b) Commut at ive but not associat ive
milliseconds, r espect ively. The pr ior it y of each
t ask is t he inver se of it s per iod, and t he available (c) Not commut at ive but associat ive
t asks ar e scheduled in or der of pr ior it y, wit h t he (d) Neit her commut at ive nor associat ive
h i gh est pr i or i t y t ask sch edu l ed f i r st . Each 34. The least number of tempor ary variables requir ed
inst ance of T 1, T 2 and T 3 r equir es an execut ion t o cr eat e a t hr ee-addr ess code in st at i c single
time of 1, 2 and 4 milliseconds, respectively. Given assignment for m for t he expr ession q + r /3 +
t hat all t asks init ially ar r ive at t he beginning of s – t * 5 + u * v/w is .
t he 1st mi l li second and t ask pr eempt ions ar e
all owed, t he fir st inst ance of T 3 complet es i t s 35.
execut ion at t he end of  milliseconds.
31. Consider t he NPDA  Q = {q0, q1, q2},  = {0, 1},
 = {0, 1, } , q0, , F = {q2}, wher e (as per usual
convent ion) Q is the set of stat es,  is t he input
alphabet ,  is t he st ack alphabet ,  is t he st at e Consider t he DFAs M and N given above. The
t ransit ion function, q0 is t he init ial state,  is the number of st at es in a minimal DFA t hat accept s
initial st ack symbol, and F is t he set of accept ing t he languages L(M )  L(N) is .
states. The state t r ansit ion is as follows : 36. Consider a main memor y wit h five page fr ames
and t he following sequence of page r efer ences :
3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of
t h e f ol l ow i n g i s t r u e w i t h r espect t o page
r eplacement policies Fir st I n Fir st Out (FI FO)
and L east Recent ly Used (L RU) ?
Which one of t he following sequences must follow (a) Bot h incur t he same number of page fault s.
t he st r ing 101100 so t hat t he over all st r ing is
accept ed by t he aut omat ion ? (b) FI FO incur s 2 mor e page fault s t han L RU
(a) 10110 (b) 10010 (c) L RU incur s 2 mor e page fault s t han FI FO
(c) 01010 (d) 01001 (d) FI FO incur s 1 mor e page fault s t han L RU
6 SOLVED PAPER – 2015 (SET - 1)

37. Suppose L = {p, q, r , s, t} is a lat t ice r epr esent ed 43. Suppose t hat t he st op-and-wait pr ot ocol is used
by t he following H asse diagr am : on a link wit h a bit r at e of 64 kilobit s per second
and 20 milliseconds pr opagat ion delay. Assume
t h at t h e t r an sm i ssi on t i m e f or t h e
acknowledgement and t he pr ocessing t i me at
nodes ar e negligible. Then t he minimum fr ame
size in byt es t o achieve a link ut ilizat ion of at
least 50% is .
For any x, y  L , not necessar ily dist inct , x  y
44. A posit ive edge-t r igger ed D flip-flop is connect ed
and x  y ar e join and meet of x, y r espect ively.
to a positive edge-tr iggered JK flip-flop as follows.
L et L 3 = {(x, y, z) : x, y, z  L } be t he set of all
The Q out put of t he D flip-flop is connect ed t o
or der ed t r iplet s of t he element s of L . L et pr be bot h t he J and K input s of t he JK flip-flop, while
t he pr obabi lit y t hat an el ement (x, y, z)  L 3 t he Q out put of t he JK flip-flop is connect ed t o
chosen equipr obably satisfies x  (y  z) = (x  y)  t he input of t he D flip-flop is connect ed t o bot h
(x  z). Then t he J and K inputs of t he JK flip-flop, while t he Q
(a) pr = 0 (b) pr = 1 out put of t he JK flip-flop is connect ed t o the input
of t he D flip-flop. I nit ially, t he out put of t he D
1 1 flip-flop is set t o logic one and t he out put of t he
(c) 0  pr  (d)  pr  1
5 5 JK flip-flop is cleared. Which one of the following
38. L et G = (V, E) be a simple undir ect ed gr aph, and s is t he bit sequence (including t he init ial st at e)
be a par t icular ver t ex in it called t he sour ce. For generat ed at the Q out put of t he JK flip-flop when
t he fli p-fl ops ar e connect ed t o a fr ee r unning
x  V, let d(x) denot e t he shor t est dist ance in G
common clock ? Assume t hat J = K = 1 is t he
fr om s t o x. A br eadt h fi r st sear ch (BFS) i s
t oggle mode and J = K = 0 is t he st at e-holding
per for med st ar t ing at s. L et T be r esult ant BFS
mode of t he JK flip-flop. Bot h t he flip-flops have
t r ee. I f (u, v) is an edge of G t hat is not in T, t hen non-zer o pr opagat ion delays.
which one of the following CANNOT be the value
of d(u) – d(v) ? (a) 0110110 ..... (b) 0100100 .....
(c) 011101110 ..... (d) 011001100 .....
(a) – 1 (b) 0
45. Consider t he following C funct ion.
(c) 1 (d) 2
int fun1 (int n)
39. Let G be a connected planar graph with 10 vertices.
I f t he number of edges on each face is t hr ee, then {
t he number of edges in G is . int i, j, k, p, q = 0;
40. Consider t he oper at ions for (i = 1; i < n; ++i)
f(X, Y, Z) = X Y Z + X Y + YZ and {
g(X, Y, Z) = X YZ + XY Z + XY. p = 0;
for (j = n; j > 1; j = j/2)
Which one of t he following is cor r ect ?
++p;
(a) Bot h {f} and {g} ar e funct ionally complet e
for (k =1; k < p; k = k* 2)
(b) Only {f} is functionally complet e
++q;
(c) Only {g} is funct ionally complet e }
(d) N eit her {f} nor {g} is funct ionally complet e r et ur n q;
41. Consider t he following 2  2 mat r ix A wher e t wo }
element s ar e unknown and ar e mar ked by a and W h i ch on e of t h e f ol l ow i n g m ost cl osel y
b. The eigen values of t his mat r ix ar e – 1 and 7. appr oximat es t he r et ur n value of t he funct ion
What ar e t he values of a and b ? fun1 ?
1 4 (a) n 3 (b) n (log n)2
A   (c) n log n (d) n log (log n)
b a
46. Consider a non-pipelined pr ocessor wit h a clock
(a) a = 6, b = 4 (b) a = 4, b = 6 r at e of 2.5 gi gaher t z and aver age cycl es per
(c) a = 3, b = 5 (d) a = 5, b = 3 i n st r u ct i on of f ou r. T h e same pr ocessor i s
upgraded to a pipelined pr ocessor wit h five stages;
1 but due t o t he int er nal pipelined delay, t he clock
cos  
2 
 x dx  . speed is reduced to 2 gigahert z. Assume t hat there
42.  are no st alls in the pipeline. The speed up achieved
 x2
in this pipelined processor is .
SOLVED PAPER – 2015 (SET - 1) 7

47. Consider an Ent it y-Relat ionship (ER) model in 52. Su ppose t h e fol l ow i ng di sk r equest sequen ce
which ent it y set s E 1 and E 2 ar e connect ed by an (t r ack number s) for a di sk wi t h 100 t r ack s i s
m : n r elat ionship R12. E 1 and E 3 ar e connect ed by gi ven: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume
a 1 : n (1 on t he side of E 1 and n on t he side of E 3) t h at t he i ni t i al posi t i on of t he R/W head i s on
r elat ionship R13. t r ack 50. The addi t i onal di st ance t h at w i l l be
t r aver sed by t he R/W h ead when t he Shor t est
E 1 has t wo single-valued at t r ibut es a11 and a12 of
Seek T i me F i r st (SST F ) al gor i t h m i s u sed
which a11 is t he key at t r ibut e. E 2 has t wo single-
compar ed t o t he SCAN (El evat or ) al gor i t hm
valued at t r ibut es a21 and a22 of which a21 is t he (assuming t hat SCAN al gor it hm moves t owar ds
key at tr ibute. E 3 has two single-valued at t ributes 100 wh en i t st ar t s execut i on ) i s t r ack s.
a31 and a32 of which a31 is t he key at t r ibut e. The
53. Consider a L AN wit h four nodes S1¸S2, S3 and S4.
r elat ionships do not have any at t r ibut es.
Time is divided int o fixed-size slot s, and a node
I f a r elat ional model is t he der ived from the above can begin it s t r ansmission only at t he beginning
ER model, then the minimum number of relations of a slot . A collision is said t o have occur r ed if
t hat would be gener at ed if all t he r elat ions ar e in mor e t han one node t r ansmit in t he same slot .
3NF is . The probability of gener at ion of a fr ame in a t ime
slot by S1, S2, S3 and S4 ar e 0.1, 0.2, 0.3 and 0.4,
99
1 r espect ively. The pr obabilit y of sending a fr ame
48.  x  x  1  .
x 1 in t he fir st slot wit hout any collision by any of
t hese four st at ions is .
49. Let an represent the number of bit strings of length
n cont aining t wo consecut ive 1s. 54. An algor it hm per for ms (log N)1/2 find oper at ions,
N inser t oper at ions, (log N)1/2 delet e oper at ions,
What is t he r ecur r ence r elat ion for an ? and (log N)1/2 decr easekey oper at ions on a set of
(a) an– 2 + an– 1 + 2n– 2 (b) an– 2 + 2an– 1 + 2n– 2 dat a i t ems wi t h k eys dr awn for m a l i near l y
(c) 2an– 2 + an– 1 + 2 n– 2
(d) 2an– 2 + 2an– 1 + 2n– 2 or der ed set . For a delet e oper at ion, a point er is
pr ovided t o t he r ecor d t hat must be delet ed. For
50. Consider t he following C pr ogr am segment . t he decr ease-key operat ion, a point er is pr ovided
while (fir st <= last ) t o t he r ecor d t hat has it s key decr eased. Which
{ one of t he following dat a st r uct ur es is t he most
suit ed for t he algor it hm t o use, if t he goal is t o
if(ar ray[middle] < sear ch)
ach i ev e t h e best asy m pt ot i c com pl ex i t y
fir st = middle + 1; consider ing all t he oper at ions?
else if (ar r ay[middle] = = sear ch) (a) Unsor t ed ar r ay
found = TRUE; (b) Min– heap
else last = middle – 1; (c) Sor t ed ar ray
middle = (fir st + last )/2; (d) Sor t ed doubly linked list
} 55. A var iable x is said t o be live at a st at ement Si in
if (fir st > last ) not Pr esent = TRUE; a pr ogr am if t he following t hr ee condit ions hold
simult aneously :
T h e cycl omat i c compl exi t y of t h e pr ogr am
segment is . I . Ther e exist s a st at ement Sj t hat uses x
I I . Ther e is a path fr om Si t o Sj in t he flow graph
51. Consider a max heap, r epr esent ed by t he ar r ay :
cor r esponding t o t he pr ogr am
40, 30, 20, 10, 15, 16, 17, 8, 4.
I II . The pat h has no int er vening assignment t o x
A r r ay
including at Si and Sj
1 2 3 4 5 6 7 8 9
I n d ex
V al u e 40 30 20 10 15 16 17 8 4

Now consider that a value 35 is inser t ed int o this


heap. Aft er inser t ion, t he new heap is
(a) 40, 30, 20, 10, 15, 16, 17, 8, 4, 35
The var iables which ar e live at t he st at ement in
(b) 40, 35, 20, 10, 30, 16, 17, 8, 4, 15 basic block 2 and at t he st at ement in basic block
(c) 40, 30, 20, 10, 35, 16, 17, 8, 4, 15 3 of t he above cont r ol flow gr aph ar e
(d) 40, 35, 20, 10, 15, 16, 17, 8, 4, 30 (a) p, s, u (b) r , s, u
(c) r , u (d) q, v
8 SOLVED PAPER – 2015 (SET - 1)

AN SWERS
GENERAL APTI TU DE
1. (a) 2. (c) 3. (b) 4. (a) 5. (a) 6. (32) 7. (a)
8. (c) 9. (c) 10. (d)
COM PUT ER SCI EN CE & I N FORM AT I ON TECH NOL OGY
1. (c) 2. (b) 3. (c) 4. (a) 5. (c) 6. (c) 7. (d)
8. (d) 9. (c) 10. (d) 11. (c) 12. (c) 13. (a) 14. (b)
15. (a) 16. (4) 17. (3) 18. (c) 19. (b) 20. (a) 21. (a)
22. (b) 23. (– 5) 24. (c) 25. (5) 26. (69) 27. (14020)
28. (b) 29. (2) 30. (12) 31. (b) 32. (a) 33. (a) 34. (8)
35. (1) 36. (a) 37. (d) 38. (d) 39. (24) 40. (b) 41. (d)
42. (– 1) 43. (160) 44. (a) 45. (d) 46. (3.2) 47. (4) 48. (0.99)
49. (a) 50. (5) 51. (b) 52. (10) 53. (0.40– 0.46) 54. (a) 55. (c)

EXPL AN AT I ON S
GENERAL APTI TU DE  Statement-I alone is sufficient, but Statement-II
1. A = {2, 3, 4, 5} alone is not sufficient.
B = {11, 12, 13, 14, 15}  Opt ion (a) is cor r ect .
Now desired outome = {(2, 14), (3, 13), (4, 12), (5, 11)} 5. Any paper i s t he most appr opr iat e wor d and
gr ammat ically cor r ect for t he given blank.
and t ot al out come = A × B = 4 × 5 = 20
Opt ion (a) is t he cor r ect answer.
 Required probabilit y
6. Accor ding to quest ion,
Number of desired out come
= Ther e ar e 40 males in Elect r ical Engg.
Tot al number of out come
 Tot al number of females in Elect r ical Engg.
4 1
= =  0.20 = 72 – 40 = 32
20 5  Total number of students in Electrical Engg. = 72
 Opt ion (a) is cor r ect . 20% = 72
2. She had a t er r ific t ime at t he par t y. I t means she  30% = Tot al number of st udent s in Civil Engg.
enjoyed t he part y complet ely which is exact ly the
same given in t he quest ion.  Tot al number of st udent s in Civil Engg.
Opt ion (c) is t he cor r ect . 30  72
3. The wor ds has no combinat ion in t heir meaning = = 36 × 3 = 108
20
neit her t hey ar e ant onym nor synonym t o each
ot her lik e ot her wor ds combinat i on. Wheedle  Number of female st udent s in Civil Engg.
mean s t o en deavor t o i n f l u en ce a per son ,
4  108
Roundabout means circuit ous or indir ect . =
9
Opt ion (b) is t he cor r ect .
4. Two floor s in cer t ain building ar e 9 feet apar t = 4 × 12 = 48
F r om St at em en t -I Now, total number of students in Mechanical Engg.
Each st ep is 3/4 foot high 10  72
 I n or der t o cover 9 feet dist ance, t ot al number = = 36
20
9 94  Number of female students in Mechanical Engg.
of st air s r equir ed = =  12 st eps
3 3
4  36
4 =
9
F r om St at em en t -I I
= 16
Each st ep is 1 foot wide,
 Differ ence bet ween female st udent s in Civil
H er e in 2nd st at ement t he infor mat ion r elat ed t o
and M echanical depar t ment s
height of st ep is not ment ioned.
= 48 – 16
Thus we cannot guess t he number of st air s t o
r each 9 feet . = 32
SOLVED PAPER – 2015 (SET - 1) 9

7. St at emen t I an d St at emen t I I f ol l ow s t h e 9. A = {5, {6}, {7}}


st at ement given in t he quest ion which says t hat Power Set of A, (2A) = {, 5, {6}, {7}, {5, {6}}, {5, {7}},
wat er level of lakes has a significant dr op and {{6}, {7}}, {5, {6}, {7}}}
bot h of t hese t wo st at ement s pr ovide solut ions
t o t he same pr oblem. Opt ions I , I I and I I I ar e sat isfied.
Opt ion (a) is t he cor r ect answer.  Opt ion (c) is cor r ect .
8. "Took t o flight " has t he near est meaning of t he 10. The count ing sequence for given 4-bit Johnson
phr ase used in t he sent ence. Count er wit h initial value 0000 is
Opt ion (c) is t he cor r ect answer. 0, 8, 12, 14, 15, 7, 3, 1, 0
9. Tot al number of st udent s in class = 44 11. I I and I V ar e false,
Aver age of mar ks, Bot h H TM L and XM L ar e case sensit ive
(2  21)  (3  15)  (1  11)  (2  23)  (5  31) H TM L and XM L t ag must be closed.
=
42 12. Clust er ed: The order ing of dat a r ecor d is same as
42  45  11  46  155 299 or close t o t he or der ing of dat a ent r ies in same
= =  6.795
44 44 index.
 Opt ion (c) is cor r ect . 13. 1. 3, 5, 7, 8, 15, 19, 25
COM PU T ER SCI ENCE & I NF ORM AT I ON 4. 4, 6, 7, 9, 18, 20, 25
TECH NOL OGY All nodes ar e in ascending order inorder tr aversal
of a binar y sear ch t r ee.
1. I f there are N-people, then total no of key requir ed
ar e N(N – 1)/2. 14. I n a TCP connect ion
 I f t he sequence number of a segment s is m.
2. I n a I P header, t he sour ce addr ess i s never
modified checksum, TTL and lengt h may var y Th en i t i s n ot n ecessar y t he subsequ en t
for each r out er. segment is m + 1, because it depend upon no
of packet sent is cur r ent segment .
3. I n shift r educe par ser, t he st ack cont ains only a
 Adver t ise wi ndow can not be fi xed it may
set of var iable pr efix.
change on changing t he capacit y of r eceiver
4. M aximum number of nodes wit h height window.
h 25+1 – 1 = 63 nodes is 2h + 1 – 1 15. I n t hr ee address instr uction for mat, each addr ess
and minimum no. of nodes wit h height h is h + 1. field can be used t o specify memor y oper and and
H ence 5 + 1 = 6 nodes. pr ocessor r egist er
5. Pr ims al gor it hm is gr eedy met hod because it e.g. R = R1 + R2
choose minimum dist ance node. 16. L ogical Addr ess = 32 bit s
Floyd war shal’s is dynamic because it changes Page size = 4 kilobyt e
t he dist ance on each it er at ion. Page t able ent r y = 4 byt e each
Merge sor t is divide and conquer because it divide No. of pages = 1 M
t he hole list is sublist and combine aft er sor t ing Page Table size = 4B × 1M = 4 M B.
each su bl i st H ami l t oni an cycl e i s based on x1 / x  () 0  1
18. lim
backtracking. x 
 Opt ion (c) is cor r ect .
7. The select oper at ion is SQL is same as
19. The r ecur r ence equat ion is
The pr oject ion oper at ion i s r elat ional algebr a
T(n) = T(n – 1) + T(1) + cn
except t hat SEL ECT is SQL r et ain duplicat e.
I n quick sor t , wor st case divide t he list int o t wo
8. By t he pr oper t y.
list wit h 1 and (n – 1) element s each t ime.
I f L 1 is cont ext fr ee, L 1 is r ecur sive. x
20. g (x) = 1 – x and h ( x) 
I f L 2 is recursively enumerable and L 1 is recursive x– 1
t h en u n i on of r ecu r si v e an d r ecu r si v el y  x  x
Now g(h(x)) = g  = 1–
enumer able language is r ecur sively enumerable.  x – 1 x– 1
I I and I I I ar e false because complement of a x– 1– x
=
cont ext fr ee language i s not cont ext fr ee and x– 1
com pl emen t of a r ecu r si v el y en u m er abl e –1
language is not r ecur sive. =
x– 1
10 SOLVED PAPER – 2015 (SET - 1)

1– x 1– x  rotation = 6 ms r ot at ion lat ency


and h (g(x)) = h(1 – x) = 
1– x– 1 – x 1
=  6 ms = 3 ms
g(h( x)) –1 (– x) –x 2
Now =  = No. of sect or = 600 per t r ack,
h( g( x)) x– 1 1– x ( x – 1)2
Now fr om opt ion (a), 6ms
1 sect or = = 0.01 ms
h ( x) x 1 –x 600
=  = 2000 sect or = 2000 × 0.01 = 20 ms.
g( x) x– 1 1– x ( x – 1)2
 Opt ion (a) is cor r ect . Tot al t ime r equir ed = (2000 × (4 + 3)) + 20
21. H T T P an d F T P bot h can u se m u l t i pl e = 14020 ms
T CP con n ect i on bet w een same cl i en t an d 29. The out put is
ser ver.
22. Bot h inser t ion and delet ion of a key is a binar y Raj 310
search t ree is Q(n) in worst case as bot h ar e worst
case of BST wi ll t ake Q(n) for i nser t i on and Rohit 140
delet ion.
H ence no of r ows r et ur ned ar e 2
50 30. Gant t char t is
50
1 1 2 1 3 2 4 1 5
T 1 T 2 T 1 T 3 T 1 T 2 T 1 T3 T 1
60
40 0 1 3 4 6 7 9 10 12
all t asks ar e ar r iving at beginning of 1 ms means
70 at 0. T 1 has highest pr ior it y, t hen T 2 and t he T 3.
30 or
H ence fir st inst ance of T 1 by end of 12.
80 31. The over all st r ing accept ed by aut omata is 10010
20
32. 2036, 2036, 2036,
I t will r et ur n init ial addr ess for all t hr ee
23. The out put is – 5
i.e 2036
24. Whit e box t est ing check all condit i on cover ed
33. The oper at or  is both cumutative and associative
bl ack box t est i n g used for equi val en t cl ass
as p  q = q  p and p  (q r ) = (p q) r
Positioning
35. L (M )  L (N) = – (– L (M ) (– L (N))
Per for mance t est ing means volume t est ing
b
Alpha t est ing is syst em t est ing. a

26. M ST, The complet e gr aph should be  – L (M ) 


 a

15 b
B E
10 4 a b
b
A 2 7 F  – L (N) 


a
9 6
C D M accept all st r ing end wit h a and N accept all
16 st r ing end wit h b. The int er sect ion of bot h will
accept empt y language.
Tot al sum = 10 + 9 + 2 + 15 + 16 + 7 + 4 + 6 = 69.
H ence
27. Given seek time = 4 ms and 10000 rotation per
60sec
minute i.e. = 1 rotat ion Then no. of st at e is 1.
10000
SOLVED PAPER – 2015 (SET - 1) 11

36.
LRV 1 6 3 8 2 1 3
9 1 1 1 1 2 2 2
3 8 2 3 9 9 9 9 9 9 9 9
2 2 2 2 2 2 8 8 1 1
– 9– 3– 6–
8 8 8 8 8 6 6 6 6 6 6
No P.F
3 3 3 3 3 3 3 3 3 3 3 3
P.F P.F P.F – P.F P.F P.F – P.F P.F P.F –
Tot al page fault = 9

f 1f 0
6 3 8 2
1 1 1 1 1
9 9 9 9 2
– 9– 3– 6–  1 – 3 Both incur same
2 2 2 8 8
no. of page fault
8 8 3 3 No P.F 3 No P.F

3 6 6 6 6
P.F P.F P.F. P.F
5- Page fault

Tot al page fault = 9

1 43. Given Bit r at e = 64 kbps, T p = 20 ns


37.  Pr  1
5 L BR t hen
38. d(u) – d(v)  2 L = 64 × 103 × 20 × 10– 3
39. as | V| + | R| = | E| + 2, wher e | V| is ver t ices, = 1280 bit s
| E| i s edges and | R| i s r egi on gi ven for a = 160 byt e
connect ed planner gr aph | V| = 10 and no of edges
ar e 3. 44. 0110110 . . .
Then 3| R| = 2| E| 45. n log(log n)
2 Fir st for loop is r unning n t imes nested loops ar e
and t hen | R| = | E| r unning log (log n) t imes.
3
H ence H ence t ot al r unning t ime is n log(log n)
2 46. 3.2
10  | E| = | E| + 2
3 47. The E– R diagr am is
| E|
= 8 and | E| = 24 a12 a21
3
40. Bot h {f} and {g} ar e funct ionally complet e E1 R12 E2
41. Sum of Eigen value = 1 + a a11 a22
 6=1+a
R13
 a5
and pr oduct of Eigen value = det (A)
– 7 = a – 4b E3
 – 7 = 5 – 4b
 – 7 – 5 = – 4b a31 a32
 b3
 Opt ion (d) is cor r ect .
12 SOLVED PAPER – 2015 (SET - 1)
99
1 40
48.  Max heapily
x ( x  1)
x 1
35 20
99
1 1 
=  – 10 30 16
x 1  x x  1  17
1 1 1 1 1 1 1 1 1 8 4 15
= –  –  –  .... –  –
1 2 2 3 3 4 99 99 100
1 Then list is
= 1– 40, 35, 20, 10, 30, 16, 17, 8, 4, 15
100
99 52. Using SSTF algor it hm, t ot al head moment s ar e
= 5 + 15 + 10 + 10 + 10 + 65 + 5 + 10 = 130
100
= 0.99 using SCAN algor it hm t ot al head moment s ar e
49. The r ecur r ence is 10 + 10 + 10 + 10 + 10 + 55 + 20 + 5 + 10 = 140
an– 2 + an– 1 + 2n– 2 Hence additional distance covered = 140 – 130 = 10
50. The cyclomat ic complexit y of given code segment 54. Unsor t ed ar r ay
is 5. The algor it hm per for m
51. The max heap is find oper at ion (log N)½
40 40 I nser t oper at ion N
insert 35
30 30 delet e oper at ion (log N)½
20 20
decr ease key oper at ions (log N)½
10 15 16 10 15 16
17 17 H ence unsor t ed ar r ay is best dat a st r uct ur e for
8 4 8 4 35 inserted node all above oper at ions.


You might also like