(Q.1– 5): Car r y One M ar k Each
1. Based on the given statements, select the mostappropr iate opt ion to solve the given quest ion
What wil l be the total weight of 10 poles each ofsame weight?
St at emen t s
I . One four th of the weight of a pole is 15kg.
I I . The total weight of these poles is 160 kg morethan the total weight of two poles
(a) Statement I alone is not sufficient
(b) Statement I I alone is not sufficient
(c) Either I or I I alone is sufficient
(d) Both statements I and I I t ogether are notsufficient .
2. Consider a funct ion f(x) = 1 – x on – 1 x 1. Thevalue of x at whi ch t he funct i on at t ai ns amaximum, and t he maximum value of t hefunct ion are.
(a) 0, – 1 (b) – 1, 0
(c) 0, 1 (d) – 1, 2
3. A gener ic term that include var ious i tems ofclothing such as a skir t , a pair of t rousers and ashir t is
(a) fabr ic (b) text i le
(c) fibre (d) apparel
4. Choose the statement where under l ined word isused cor rect ly.
(a) The industr ial ist load a personnel jet .
(b) I wr ite my exper ience in my personnel diary.
(c) Al l personnel are being given the day off.
(d) Being rel igious is a personnel aspect .
5. We _______ our fr iend’s bir thday and we _______how to make it up to him.
(a) Completely forgot - - - don’t just know
(b) Forgot completely - - - don’t just know
(c) Completely forgot - - - just don’t know
(d) Forgot completely - - - just don’t know
(Q.6– 10): Car r y Tw o M ar k s Each6. I n a t r iangle PQR, PS is the angle bisector of
QPR and QPS = 60. What is the length of PS ?
(a)( )q r
qr
P
Q RS
r q
p
(b) ( )qr
q r
(c) 2 2( )q r
(d) 2( )q rqr
7. Out of the fol lowing four sentences, select themost suitable sentence with respect to grammarand usage.(a) Since the repor t lacked needed informat ion,
i t was of no use to them.(b) The repor t was useless to them because there
were no needed informat ion in i t .(c) Since the repor t did not contain the needed
informat ion, i t was not real useful to them(d) Since the repor t lacked needed informat ion,
i t would not had been useful to them.8. I f the l ist of let ters P, R, S, T, U is an ar ithmet ic
sequence, which of the fol lowing are also inar ithmet ic sequence?I . 2P, 2R, 2S, 2T, 2UI I . P – 3, R – 3, S – 3, T – 3,U – 3I I I .P2, R2, S2, T2, U2
(a) I only (b) I and I I(c) I I and I I I (d) I and I I I
9. I f p, q, r , s are dist inct integers such that :f(p, q, r , s) = max (p, q, r , s)g(p, q, r , s) = min (p, q, r , s)h(p, q, r , s) = r emainder of (p q)/(r s) i f(p q) > (r s) or remainder of (r s)/(p q)i f (r s) > (p q)Also a funct ion fgh (p, q, r , s) = f(p, q, r , s) g(p, q, r , s) h(p, q, r , s)Also the same oper at ions are val id wi th twovar iable funct ions of the form f(p, q)What is the value of fg(h(2, 5, 7, 3), 4, 6, 8) ?
GENERAL APTI TUDE (GA)
GATE – 2015CS : COM PUTER SCI ENCE
& I NFORM ATI ON TECH NOL OGYSet - 2
N o. of Quest i ons : 65 Maxi mum Mar k s : 100
2 SOLVED PAPER – 2015 (SET - 2)
10. Four branches of a company are located at M.N.Oand P. M is nor th of N at a distance of 4 km : P issouth of O at a distance of 2 km: N is southeastof O by 1 km. What is the distance betweenM and P in km?
(a) 5.34 (b) 6.74
(c) 28.5 (d) 45.49
COMPUTER SCIENCE ANDINFORMATION TECHNOLOGY
(Q.1– 25): Car r y One M ar k Each1. An unordered l ist contain n dist inct elements.
The number of compar isons to find an elementin this l ist that is neither maximum nor minimumis
(a) (n log n) (b) (n)
(c) (log n) (d) (1)
2. Let R be the relation on the set of positive integerssuch that a aRb if and only i f a and b are dist inctand have a common divisor other than 1. Whichone of the fol lowing statements about R is t rue?
(a) R is symmetr ic and reflexive but not transitive
(b) R is reflexive but not symmet r ic and nott ransit ive
(c) R is t r ansi t ive but not r eflexive and notsymmetr ic
(d) R is symmet r ic but not r eflexive and nott ransit ive
3. Consider the fol lowing transact ion involving twobank account x and y.
read (x); x : = x – 50; write (x); read (y); y : = y + 50;wr ite (y)
The const raint that the sum of the accountsx and y should remain constant is that of
(a) Atomicity (b) Consistency
(c) I solat ion (d) Durabil i ty
4. A binary t ree T has 20 leaves. The number ofnodes in T having two chi ldren is _________.
5. Consider the basic COCOMO model where E isthe effor t applied in per son-months, D is thedevelopment t ime i n chr onologi cal mont hs,KLOC is the estimated number of del ivered l inesof code (in thousands) and ab, bb, cb, db have theirusual meanings. The basic COCOMO equat ionsare of the form
(a) E = ab(KLOC) exp (bb), D = cb(E) exp (db)
(b) D = ab(KLOC) exp (bb), E = cb(D) exp (db)
(c) E = abexp (bb), D = cb(KLOC) exp (db)
(d) E = abexp (Db), D = cb(KLOC) exp (bb)
6. Consider the fol lowing two statements.
S1 : i f a candidate is known to be cor rupt , thenhe wil l not be elected
S2 : i f a candidate is kind, he wil l be elected
Which one of the fol lowing statements fol lowsfrom S1 and S2 per sound inter ference rules oflogic?
(a) I f a person is known to cor rupt , he is kind
(b) I f a person is not known to be cor rupt , he isnot kind
(c) I f a person is kind, he is not known to becor rupt
(d) I f a person is not k ind, he is not known to becor rupt
7. Assume t hat for a cer t ain pr ocessor, a r eadrequest takes 50 nanoseconds on a cache missand 5 nanoseconds on a cache hit . Suppose whilerunning a program, i t was observed that 80% ofthe processors read requests result in a cachehit . The average and access t ime in nanosecondsis _______.
8. A syst em has 6 i dent i cal r esour ces and Nprocesses compet ing for them. Each process canrequest atmost 2 r esources. Which one of thefol lowing values of N could lead to a deadlock?
(a) 1 (b) 2
(c) 3 (d) 4
9. Consider a complete binary t ree where the leftand the r ight subtrees of the root are maxheaps.The lower bound for the number of operat ions toconver t the t ree to a heap is
(a) (log n)
(b) (n)
(c) (n log n)
(d) (n2)
10. I n the context of abstract-syntax-t ree (AST) andcont r ol -fl ow-gr aph (CFG), whi ch one of t hefol lowing is TRUE?
(a) In both AST and CFG, let node, N 2 be thesuccessor of node N1. I n the input program,the code cor responding to N2 is present afterthe code cor responding in N1.
(b) For any input program, neither AST nor CFGwil l contain a cycle
(c) The maximum number of successors of a nodein an AST and a CFG depends on the inputprogram
(d) Each node is AST and CFG cor responds to atmost one statement in the input program
SOLVED PAPER – 2015 (SET - 2) 3
11. With reference to the B+ t ree index of order 1shown below, the minimum number of nodes(including the Root node) that must be fetchedin order to sat isfy the fol lowing query: “Get al lrecords with a search key greater than or equalto 7 and less than 15” is _________
1 3 5 7 9 11 13 15 17
9
5 13 17
12. A softwar e r equi r ements speci ficat ion (SRS)document should avoid discussing which one ofthe fol lowing?(a) User inter face issues
(b) Non-funct ional requirements(c) Design specificat ion(d) Inter faces with third par ty software
13. I dent i fy the cor r ect or der in which a ser verprocess must invoke the funct ion cal ls accept ,bind, l isten, and recv according to UNIX socketAPL(a) l isten, accept , bind recv(b) bind, l isten, accept , recv(c) bind, accept , l isten, recv(d) accept , l isten, bind recv
14. The larger of the two eigenvalues of the matr ix4 5
2 1
is _____
15. The cardinal i ty of the power set of {0, 1, 2, ..., 10}is ______
16. Which one of the fol lowing statements is NOTcor rect about HTTP cookies?
(a) A cook ie is a piece of code t hat has t hepotent ial to compromise the secur ity of aninternet user
(b) A cookie gains entry to the user ’s work areathrough an HTTP header
(c) A cookie has an expiry date and t ime
(d) Cookies can be used to t rack the browsingpattern of a user at a par t icular site
17. Consider the fol lowing funct ion wr it ten the Cprogramming language.
void foo (char * a) {
i f (*a & & * a ! = ‘ ’)
putchar (*a);
}
}
The output of the above funct ion on input “ABCDEFGH” is
(a) ABCD EFGH (b) ABCD(c) HGFE DCBA (d) DCBA
18. A l ink has a t ransmission speed of 106 bits/sec. I tuses data packets of size 1000 bytes each. Assumet hat t he ack nowl edgemen t has negl i gi bl et ransmission delay, and that i t s pr opagat iondelay is the same as the data propagat ion delay.Also assume that the processing delays at thenodes ar e negl i gi bl e. The ef f i ci ency of t hestop-and-wai t protocol in this setup is exact ly25%. The value of the one-way propagation delay(in mil l iseconds) is ___________.
19. The minimum number of JK fl ip-flops requiredto construct a synchronous counter with the countsequence (0, 0, 1, 1, 2, 2, 3, 3, 0, 0....) is ________.
20. Match the fol lowing :
(P) Lexical analysis 1. Graph color ing(Q) Parsing 2. DFA minimizat ion
(R) Register al locat ion 3. Post-order traversal(S) Expression evaluat ion 4. Product ion t ree
(a) P – 2, Q – 3, R – 1, S – 4(b) P – 2, Q – 1, R – 4, S – 3
(c) P – 2, Q – 4, R – 1, S – 3(d) P – 2, Q – 3, R – 4, S – 1
21. Consider two decision pr oblems Q1, Q2 suchthat Q1 reduces in polynomial t ime to 3-SAT and3 -SAT reduces in polynomial t ime to Q2. Thenwhich one of fol lowing is consistent with theabove statement?(a) Q1 is in NP, Q2 in NP hard
(b) Q2 is in NP, Q1 is NP hard(c) Both Q1 and Q2 are in NP
(d) Both Q1 and Q2 are NP hard22. A computer system implements a 40-bit vir tual
address, page size of 8 ki lobytes, and a 128-entrytranslat ion look-aside buffer (TLB) organized into32 sets each having four ways. Assume that theTLB tag does not stor e any pr ocess i d. Theminimum length of the TLB tag in bits is _______.
23. Consider the fol lowing C funct ion.int fun (int n) {
int x = 1, k;i f (n == 1) return x;
for (k = 1; k < n; + +k) x = x + fun (k) * fun (n – k);
return x;}
The return value of fun (5) is _______
4 SOLVED PAPER – 2015 (SET - 2)
24. Consider the fol lowing statements
I . The complement of every Tur ing decidablelanguage is Tur ing decidable
I I . There exists some language which is in NPbut is not tur ing decidable
I I I .I f L is a language in NP, L is tur ing decidable
Which of the above statements is/are t rue?
(a) Only I (b) Only I I I
(c) Only I and I I (d) Only I and I I I
25. The number of divisors of 2100 is _______.
(Q.26– 55) : Car r y Tw o M ar k s Each
26. I n a connected graph, a br idge is an edge whoseremoval disconnects a graph. Which one of thefol lowing statements is t rue?
(a) A t ree has no br idges
(b) A br idge cannot be par t of a simple cycle
(c) Every edge of a cl ique with size 3 is a br idge(A cl ique is any compete sub graph of a graph)
(d) A graph with br idges cannot have a cycle
27. Consider six memory par t i t ions of sizes 200 KB,400 KB, 600 KB, 500 KB, 300 KB and 250 KB,wher e KB refers to ki lobyte. These par t i t ionsneed to be al lot ted to four processes of sizes357 KB, 210KB, 468 KB and 491 KB in that order.I f the best fi t algor ithm is used, which par t i t ionsare NOT al lot ted to any process?
(a) 200KB and 300 KB
(b) 200KB and 250 KB
(c) 250KB and 300 KB
(d) 300KB and 400 KB
28. Which one of the fol lowing asser t ions concerningcode inspect ion and code walkthrough is t rue?
(a) Code inspect ion is car r ied out once the codehas been unit tested
(b) Code inspect ion and code walkthrough aresynonyms
(c) Adher ence to coding standards is checkeddur ing code inspect ion
(d) Code walkthrough is usually car r ied out byan independent test team
29. Given below are some algor i thms, and somealgor ithm design paradigms.
1. Dijkstra’s Shor test Path
2. Floyd-Warshall algor ithm to compute al l pairshor test path
3. Binary search on a sor ted ar ray
4. Backtracking search on a graph
i. Divide and Conquer
ii . Dynamic Progamming
iii . Greedy design
iv. Depth-first search
v. Breadth-first search
Match the above algor ithms on the left to thecor responding design paradigm they fol low.
(a) 1 – i , 2 – i i i , 3 – i , 4 – v
(b) 1 – i i i , 2 – i i i , 3 – i , 4 – v
(c) 1 – i i i , 2 – i i , 3 – i , 4 – iv
(d) 1 – i i i , 2 – i i , 3 – i , 4 – v
30. Suppose you are provided with the fol lowingfunct ion declar at ion in the C pr ogr amminglanguage
int par t i t ion (int a [ ], int n);
The funct ion t reats the first element of a [ ] as api vot , and r ear r anges t he ar r ay so t hat al lelements less than or equal to the pivot is in theleft par t of the ar ray , and al l elements greaterthan the pivot is in the r ight par t . I n addit ion, i tmoves the pivot so that the pivot is the lastelements of the left par t . The return value is thenumber of elements in the left par t .
The fol lowing par t ial ly given funct ion in the Cprogramming language is used to find the K th
smallest element in an ar ray a [ ] of size n usingthe par t i t ion funct ion We assume k n.
int kth _ smallest (int a [ ], int n, int k)
{
int left _ end par t i t ion (a, n);
i f (left _ end + 1 == k){
return a[left _ end];
}
i f (left _ end + 1 > k){
return kth _ smallest ();
} else {
return kth_smallest ();
}
}
The missing argument l ists are respect ively
(a) (a, left _ end,k) and (a + left _ end +1, n – left_ end – 1, k – left _ end – 1)
(b) (a, left _ end,k) and (a, n – left _ end – 1,k – left _ end – 1)
(c) (a + left _ end + 1, n – left end – 1, k – left _end – 1) and (a, left _ end, k)
(d) (a, n – left_ end – 1, k – left _ end – 1) and(a, left _ end,k)
SOLVED PAPER – 2015 (SET - 2) 5
31. Consider a typical disk that rotates at 15000rotat ions per minute (RPM) and has a t ransferrate of 50 106 bytes/sec. if the average seek t imeof the disk is twice the average rotat ional delayand the control ler ’s t ransfer t ime is 10 t imes thedi sk t r ansfer t i me, t he aver age t i me (i nmil l iseconds) to read or wr ite a 512-byte sectorof the disk is _____________.
32. Let f(x) = x– (1/3) and A denote the area of the regionbounded by f(x) and the X-axis, when x var iesfrom – 1 to 1. Which of the fol lowing statementsis/are TRUE?
I . f is cont inuous in [– 1, 1]
I I . f is not bounded in [– 1, 1]
I I I .A is nonzero and finite
(a) I I only
(b) I I I only
(c) I I and I I I only
(d) I , I I and I I I
33. Consider the intermediate code given below.
1. i = 1
2. j = 1
3. t1 = 5 * i
4. t2 = t1 + j
5. t3 = 4 * t2
6. t4 = t3
7. a[t4] = – 1
8. j = j + 1
9. i f j <= 5 goto (3)
10. i = i + 1
11. if i < 5 goto 2
The number of nodes and edges in the control-f low-gr aph const r ucted for the above code,respect ively, are
(a) 5 and 7
(b) 6 and 7
(c) 5 and 5
(d) 7 and 8
34. The number of min-terms after minimizing thefol lowing Boolean expression is _______.
[D + AB + AC + ACD + ACD]
35. The number of on t o funct i on (su r j ect i vefunct ion) from set X = {1, 2, 3, 4} to set Y = {a, b, c}is ______.
36. Consider the alphabet = {0.1}, the null /emptystr ing and the sets of st r ings X0, X1, and X2
generated by the corresponding non-terminals ofregular grammar. X0, X1, and X2 are related asfol lows:
X0 = 1X1
X1 = 0X1 + 1X2
X2 = 0X1 +{}
Which one of the fol lowing choices preciselyrepresents the str ings in X0?
(a) 10(0* + (10)* )1
(b) 10(0* + (10)* )*1
(c) 1(0 + 10)*1
(d) 10(0 + 10*)*1 + 110(0 + 10)*1
37. Which of the fol lowing languages is/are regular?
L 1 : {wxwR w, x {a, b}* and w , x > 0}, wR is thereverse of st r ing w
L 2 : {anbm m n and m, n 0}
L 3 : {apbqcr p, q, r 0}
(a) L 1 and L 3 only (b) L 1 only
(c) L 2 and L 3 only (d) L 3 only
38. Consider a pr ocessor wi th byte-addr essablememory. Assume that al l r egister s, includingProgram Counter (PC) and Program Status Word(PSW), are of size 2 bytes. A stack in the mainmemory is implemented from memory locat ion(0100)16 and it grows upward. The stack pointer(SP) points to the top element of the stack. Thecur r ent value of SP is (016E)16. The CAL Linstruct ion is of two words, the first word is theop-code and the second wor d is the star t ingaddress of the subrout ine. (one word = 2bytes).The CALL instruct ion is implemented as fol lows:
Store the cur rent Vale of PC in the Stack
Store the value of PSW register in the stack
Load the starting address of the subroutine in PC
The content of PC just before the fetch of a CALLinstruct ion is (5FA0)16. After execut ion of theCALL instruct ion, the value of the stack pointeris
(a) (016A)16 (b) (016C)16
(c) (0170)16 (d) (0172)16
39. The number of st at es i n t he mi n i maldeterminist ic finite automaton cor responding tothe regular expression (0 + 1) * (10) is __________
6 SOLVED PAPER – 2015 (SET - 2)
40. Host A sends a UDP datagram containing 8880bytes of user data to host B over an EthernetLAN. Ethernet frames may car ry data up to 1500bytes (i.e. MTU = 1500 bytes). Size of UDP headeris 8 bytes and size of IP heard is 20 bytes.Thereis no opt ion field in IP header. How many totalnumber of IP fragments wil l be t ransmit ted andwhat wil l be the contents of offset field in thelast fragment?
(a) 6 and 925
(b) 6 and 7400
(c) 7 and 1110
(d) 7 and 8880
41. Consider the fol lowing rout ing table at an IProuter :
Network No. N et M ask N ext Hop
128.96.170.0 255.255.254.0 In ter face 0
128.96.168.0 255.255.254.0 In ter face 1
128.96.166.0 255.255.254.0 R2
128.96.164.0 255.255.252.0 R3 0.0.0.0 Default R4
For each IP address in Group I identify the correctchoice of the next hop from Group I I using theentr ies from the rout ing table above.
Group I Group I I
i. 128.96.171.92 a. Inter face 0
ii . 128.96.167.151 b. Inter face 1
i ii . 128.96.163.151 c. R2
iv. 128.96.165.121 d. R3
e. R4
(a) i – a, i i – c, i i i – e, iv – d
(b) i – a, i i – d, i i i – b, iv – e
(c) i – b, i i – c, i i i – d, iv – e
(d) i – b, i i – c, i i i – e, iv – d
42. Consider two relat ions R1(A, B) with the tuples(1.5), (3, 7) and R2(A, C) = (1, 7), (4, 9). Assumethat R(A, B, C) is the ful l natural outer join ofR1 and R2. Consider the fol lowing tuples of theform (A, B, C): a = (1.5, nul l), b = (1, nul l , 7)c = (3, nul l , 9), d = (4, 7, nul l), e = (1, 5, 7),f = (3, 7, nul l), g = (4, nul l , 9).Which one of thefol lowing statements is cor rect?
(a) R contains a, b, e, f, g but not c, d.
(b) R contains al l of a, b, c, d, e, f, g
(c) R contains e, f, g but not a, b
(d) R contains e but not f, g.
43. Consider a simple checkpointing protocol and thefol lowing set of operat ions in the log.(Star t , T4); (wr i te, T4, y, 2, 3); (St ar t , T1);(commit , T4); (wr ite, T1, z, 5, 7);(checkpoint );(Star t ,T2); (wr i te, T2, x,1, 9); (commit , T2);(star t , T3), (wr ite,T3, z, 7, 2);I f a crash happens now and the system tr ies torecover using both undo and redo operat ions,what are the contents of the undo l ists and theredo l ist?(a) Undo T3, T1; Redo T2(b) Undo T3, T1; Redo T2, T4
(c) Undo: none; redo :T2, T4, T3, T1(d) Undo T3, T1; T4; Redo :T2
44. A computer system implements 8 ki lobyte pagesand a +32-bit physical address space. Each pagetable entry contains a val id bit , a dir ty bit , threeper mission bi t s, and the t r anslat i on. I f t hemaximum size of the page table of a process is 24megabytes, the length of the vi r tual addr esssuppor ted by the system is _________ bits.
45. Which one of the fol lowing hash funct ions onintegers wil l distr ibute keys most uniformly over10 buckets numbered 0 to 9 for i ranging from0 to 2020?(a) h(i ) = i 2 mod 10(b) h(i ) = i 3 mod 10(c) h(i ) = (11 * i ) mod 10(d) h(i ) = (12 * i ) mod 10
46. Assume that the bandwidth for a TCP connect ionis 1048560 bits/sec. Let be the value of RTT inmil liseconds. (rounded off to the nearest integer )after which the TCP window scale opt ion isneeded. Let be the maximum possible windowsize the window scale opt ion. Then the values of and are(a) 63 mil l i seconds, 65535 214
(b) 63 mil l i seconds, 65535 216
(c) 500 mil l iseconds, 65535 214
(d) 500 mil l iseconds, 65535 216
47. A young t ableau i s a 2D ar r ay of in t eger sincr easing from left t o r ight and fr om top tobot tom. Any unfi l led entr ies are marked with ,and hence there cannot be any entry to the r ightof, or below a . The fol lowing Young tableauconsists of unique entr ies.
1 2 5 14
3 4 6 23
10 12 18 25
31
SOLVED PAPER – 2015 (SET - 2) 7
When an element is r emoved fr om a Youngtableau, other elements should be moved into i tsplace so that the result ing table is st i l l a Youngtableau (unfi l led entr ies may be fi l led in witha ). The minimum number of entr ies (otherthan 1) to be shifted, to remove 1 from the givenYoung tableau is _________
48. A half adder is implemented with XOR and ANDgates. A ful l adder is implemented with two halfadders and one OR gate. The propagat ion delayof an XOR gate is twice that of an AND/OR gate.The propagat ion delay of an AND/OR gate is 1.2microseconds. A 4-bit r ipple-car ry binary adderis implemented by using four ful l adders. Thetotal propagat ion t ime of this 4-bit binary adderin microseconds is ____________.
49. Consider the sequence of machine instruct iongiven below:
MUL R5, R0, R1
DIV R6, R2, R3
ADD R7, R5, R6
SUB R8, R7, R4
In the above sequence, R0 to R8 ar e gener alpurpose registers. In the instructions shown. Thefirst register stores the result of the operat ionper formed on the second and the third registers.
This sequence of instruct ions is to be executed ina pipel i ned i nst r uct i on pr ocessor wi t h t hefol lowing 4 stages
(1) Instruct ion Fetch and Decode (IF),
(2) Operand Fetch (OF),
(3) Per form Operat ion (PO) and
(4) Wr ite back the result (WB).
The IF, OF and WB stages take 1 clock cycle eachfor any instruct ion. The PO stage takes 1 clockcycle for ADD or SUB instruct ion, 3 clock cyclesfor MUL instruct ion and 5 clock cycles for DIVinstruct ion. The pipel ined processor uses operandforwarding from the PO stage to the OF stage.The number of cl ock cycl es t ak en for t heexecut ion of the above sequence of instruct ionsis __________
50. Per form the fol lowing operat ions on the matr ix3 4 45
7 9 105
13 2 195
.
i. Add the third row to the second row.
ii . Subt r act the thi r d column fr om the fi r stcolumn.
The determinant of the resultant matr ix is _____.
51. Which one of the fol lowing well formed formulaeis tautology ?
(a) R( , ) R( , )x y x y y x x y
(b) R( , ) ( , ) S( , )x y x y x y x y x y
(c) ( ( , ) R( , )x y p x y x y
( P( , )VR( , )x y x y x y
(d) ( , ) ( , )x yp x y x yp y x
52. A graph is self-complementary i f i t is isomorphicto i t s complement For al l selfcomplementar ygraphs on n ver t ices, n is(a) A mult iple of 4(b) Even(c) Odd(d) Congruent to 0 mod 4, or, 1 mod 4
53. The secant method is used to find the root of anequat ion f(x) = 0 . I t is star ted from two dist inctest imates, xa and xb for the root . I t is an i terat iveprocedure involving linear interpolat ion to a root.The iterat ion stops i f f(xb) is very small and thenxb is the solut ion. The procedure is given below.Obser ve that ther e is an expression which ismissing and is marked by? Which is the suitableexpression that is to be put in place of ? so that i tfol lows al l steps of the secant method?Secant
Ini t ial ize : xa, xb, , N // = convergence indicator
// N = maximum no. of iterations
fb = – f(xb)
i = 0
Whi le (i < N and |fb| > ()do
i = i + 1 // update counter
x1 = ? // missing expression for
xa = xb // intermediate value
// rest xa
xb = xt // rest xb
fb = f(xb) // function value at new xb
end whi le
i f fb > then // loop is terminated wi th i = N
wri te “Non-convergence”
else
Wri te ‘Non-convergence”
Else
Wri te “ return xb”
End i f
(a) xb – (fb – f(xa)) fb/(xb – xa)(b) xa – (fb – f(xa)) fa/(xb – xa)(c) xb – (xb – xa) fb/(fb – f(xa))(d) xa – (xb – xa) fa/(fb – f(xa))
8 SOLVED PAPER – 2015 (SET - 2)
54. Let X and Y denote the sets containing 2 and20 dist inct objects respect ively and F denote theset of al l possible funct ions defined from X to Y.let f be randomly chosen from F .The probabil i tyof f being one-to-one is _______.
55. Consider the C program below.#include <stdio.h>Int *A, stkTop;Int stkFunc (int opcode, int val){
Stat ic int size =0, stkTop=0;
Switch (opcode) {Case -1 : Size = val; break;Case 0 : i f (stkTop < size) A (stktop++] = val;break;
Default : i f (stktop) return A [--stkTop];}return -1;}int main ( ){int B[20] ; A = B; stkTop = -1;
stkFunc (-1, 10);stkFunc (0, 5);stkFunc (0, 10);pr int f (“%d\ n” , stkFunc(1, 0) + stkfunc(1, 0);}The value pr inted by the above program is ______.
ANSWERS
GENERAL APTI TUDE (GA)
1. (c) 2. (c) 3. (d) 4. (c) 5. (c) 6. (b)
7. (a) 8. (b) 9. (8) 10. (a)
COM PUTER SCI ENCE AND I NFORM ATI ON TECHNOL OGY
1. (d) 2. (d) 3. (b) 4. (19) 5. (a) 6. (c)
7. (14) 8. (d) 9. (a) 10. (c) 11. (5) 12. (c)
13. (b) 14. (6) 15. (2048) 16. (a) 17. (d) 18. (12)
19. (3) 20. (c) 21. (a) 22. (22) 23. (51) 24. (d)
25. (36) 26. (b) 27. (a) 28. (c) 29. (c) 30. (a)
31. (6.1-6.2) 32. (c) 33. (b) 34. (1) 35. (36) 36. (c)
37. (a) 38. (d) 39. (3) 40. (c) 41. (a) 42. (c)
43. (a) 44. (36) 45. (b) 46. (c) 47. (5) 48. (19.2)
49. (13) 50. (0) 51. (c) 52. (d) 53. (c) 54. (0.95)
55. (15)
SOLVED PAPER – 2015 (SET - 2) 9
GENERAL APTI TUDE (GA)
1. From I Statement
Let the weight of single pole be x kg
Now according to I statement
14
x = 15 kg
x = 60 kg
i.e. weight of one pole is 60 kg
weight of 10 pole = (10 60) kg = 600 kg
From I I statement
10x = 160 + 2x
8x = 160
x = 20
weight of one pole is 20 kg
weight of 10 pole = (10 20) kg
= 200 kg
Either (I ) or (I I ) statement alone are sufficient
Option (c) is cor rect .
2. For – 1 x 1, 0 0 3x
f (x) w i l l be maximum when x i s mi n imum
x = 0
x = 0
maximum value of f (x) = 1 – x
= 1 – 0 = 1 opt i on (c) i s cor r ect .
6.
60°60°
30° 30°
P
Q R
r q
SO
Fr om f i g. r = q
and i n PSQ
sin30 = PSr
PS = 2r
= 2q
Now f r om opt i on (b)
qrq r =
2
2rr
= 2r
opt i on (b) i s cor r ect .8. Here P, R, S, T and U are in A.P.
Let P = 1, R = 2, S = 3, T = 4, and U = 5Now from I , 2P, 2R, 2S, 2T, 2U
2, 4, 6, 8, 10 (common difference of 2)
2P, 2R, 2S, 2T, 2U are in A.P..from I I
P-3, R-3, S-3, T-3, U-3
– 2, – 1, 0, 1, 2 (common difference of 1)
P-3, R-3, S-3, T-3, and U-3 are in A.P..from I I I P2, R2, S2, T2, U2
1, 4, 9, 16, 25 (common di fference is notsame)
P2, R2, S2, T2 and U2 are not in A.P..
opt ion (b) is cor rect .10.
4km
M
N2km 1km
(S)
(N)
(E)(W)O
N
P
Hence distance of M from P is 5.34COM PUTER SCI ENCE AND I NFORM ATI ONTECHNOL OGY
1. Suppose a l ist contains n elements, consider firstthree element and find middle element which willbe neither maximum nor minimum.Hence it is (1) .
2. R is not reflexive not t ransit iveR is symmetr icconsider a = 3, b = 6, c = 8The common divisor of 3 & 6 is 3The common divisor of 6 & 8 is 2But there is no common divisor of 3 & 8Hence 3R6, 6R8 but not 3R8
EXPL ANATI ONS
10 SOLVED PAPER – 2015 (SET - 2)
3. Consistency : Consistancy proper ly ensure thatany t ransact ion wil l br ing the database from onevalid state to another
read (x);
x : = x – 50;wr ite (x) ;
read (y);y : = y + 50;wr ite (y)
5. The Basic cocomo equat ion are(E) = ab (KLOC) exp (bb)(D) = cb (E) exp (db)
6. I f t he per son is k ind, he is not known to becor rupt
7. Average access t ime can be calculated as0.8 × 5 + 0.2 × 50 = 14ns
9. The subtrees are already Max-heap, so to makeit half, we have to heapify the root , which takes(log n) t ime.
11. I n given B+ t ree
9
5 13 17
1 3 5 7 9 11 13 15 17543
2
1
So to find greater than or equal to 7 and less than15. I t wi l l fatch 5 nodes.As shown in above diagram it may be
1 – 2 – 3 – 4 – 5or
1 – 6 – 5 – 4– 3Ans = 5
12. SRS avoids inter face with third Par ty software13. bind, l isten, accept , recv14. The given matr ix is
A = 4 5
2 1
I norder to find eigen values of above matr ix
A – I = 0
4 – 5
2 1 –
= 0
(4 – ) (1 – ) – 10 = 0 4 – 5 + 2 – 10 = 0
2 – 5 – 6 = 0 2 – 6 + 1 – 6 = 0 ( – 6) + 1( – 6) = 0 + 1 = 0 or = – 1 or = 6 Larger eigen value of matr ix is 6
15. Cordinali ty of power set {0, 1, 2, ........, 10} = 211 = 2048
17. DCBA is the outputThe condi t i on w i l l f ai l on encoun t er i ng(‘ ’-space), and pr inted character wil l be DCBA
18. The efficiency of stop-and-wait protocol is 25%,then
14
=1
1 2a i .e 1 +2a = 4
a =32
Now, TX =3
6
8 108ms
10
as a =P
X
T32 T
2TP = 3TX
2TP = 3 × 8
TP = 12 ms
19. The minimum number of fl ip-flop required is 3.
20. The match are as fol lows
Lexical analysis – DFA minimizat ion
Parsing – Product ion Tree
Register al locat ion – Graph color ing
expression evaluat ion – Post order t raversal
21. Q1 is in NP and Q2 is in NP-hard
22.22 5 13
40 bits
TAG SETOFFSET
WORDOFFSET
Then TAG bits are 22
24. By proper ty,
Complement of every Tur ing decidable languageis also tur ing decidable
I f L is in NP, L is Tur ing decidable.
26. A br idge can not be par t of simple cycle27. Consider the memory par t i t ion and using best
fi t algor ithm
200 400 600 500 300 250
357 491 468 201
Hence 200 and 300 are not alloted to any process.
SOLVED PAPER – 2015 (SET - 2) 11
29. Di jkst ra use gr eady appr oach, war shals usedynamic programming approach, Binary searchis based on divide and conquer and Back t rackingis depth first search.
31. 15000 rotat ion in 1 minute
1 rotat ion =1
15000or
60sec1500
= 4 ms.
rotat ional delay =1
42 = 2 ms
Seek t ime = 2 2 = 4 mstransfer t ime = 0.1 ms.Average t ime = 4 + 2 + 0.1 = 6.1ms
34. 001
1
011
1
11
1
1
101
1
00
01
ABCD
1 1 X 1
1 1 1 1
11
10
Ans = 1, ABCD
36. X0 = 1X1 100 X1
101 X2 1010 X1
101 (Str ing)
110 X1
11 - St r ing (minimum)
10 X1
11 X2
All st r ing are star t ing with 1 with min str ing 11.which can be generated by 1(0* + 10)*1.
37. L 1 = R *W W W, ( , ) , W , X 0x a b
WR is reverse of st r ing of WIt can not be regular, because we can not compareW is regular expression.
L 2 = ,and , 0n ma b m n m n i s al so not
regular due to compar ision in a and b
L 3 = , , 0p q ra b c p q r
Here a, b, c are independent and regular exp isa*b*c* . Hence L 3 is regular.
39.1
1 1
00
0
0
Ans = 3
40. 7 and 1110
41. Network ranges are0 · 0 · 0 · 0 – default128 · 96 · 164 · 0
to — R3
128 · 96 · 165 · 0
128 · 96 · 166 · 0 to — R2
128 · 96 · 167 · 255
128 · 96 · 168 · 0 to — inter face 1128 · 96 · 169 · 255
128 · 96 · 170 · 0 to — inter face 0128 · 96 · 171 · 255
Ans = AA – 1B – 3C – 5D – 4
43. Undo T3, T i j Redo T2
T1 and T3 wi l l be undo, the t ransact ion aftercheckpoint is T2 which must be redo.
44. Page size = 8 KB
PAS = 32 bits
Number of frames = 32
13
22
= 219 frames
One entry require 24 bits
Page Table size = n e
24 220 3 = n 24
n = 223 pages
Then length of vir tual Address is
23 + 13 = 36 bits
45. h(i ) = l 3 mod 10
i = 1 = 13 mod 10 = 1
2 = 23 mod 10 = 8
3 = 33 mod 10 = 7
4 = 43 mod 10 = 4
5 = 53 mod 10 = 5
6 = 63 mod 10 = 6
7 = 73 mod 10 = 3
8 = 83 mod 10 = 2
9 = 93 mod 10 = 9
10 = 103 mod 10 = 0Hence the hash funct ion wil l be h(i ) = l 3 mod 10
12 SOLVED PAPER – 2015 (SET - 2)
48. Propagat ion delay for AND/OR Gate= 1 · 2 µs
Propagat ion delay for XOR Gate= 2 × 1.2 = 2.4 µs
Propagat ion t ime for a half adder= 1.2 + 2.4 = 3.6 µs
Propagat ion t ime for ful l adder= 2 × 3.6 + 1.2= 7.2 + 1.2= 8.4 µs
Total 4-adders are used in 4-bit binary adderHence 8.4 × 4 = 33.6 µs
49.
1 2 3 4 5 6 7 8 9 10 11 12 13
IF OF PO PO PO WB
IF OF – – PO PO PO PO PO WB
IF – – OF – PO WB
IF – – OF PO WB
Total clock cycle require = 1350. The given matr ix is
A =
3 4 45
7 9 105
13 2 195
Now according to quest ion(i) R2 R2 + R3 (Adding t h i r d r ow t o t he
second row)
B = 3 4 45
20 11 300
13 2 195
(i i ) C1 C1 – C3 (subtract ing third column fromfirst column)
C =
– 42 4 45
– 280 11 300
– 182 2 195
Now | C| = – 42(2145 – 600) – 4(– 54600 + 54600) + 45(– 560 + 2002)
C = – 42(1545) – 4(0) + 45(1442)
= – 64890 + 64890 = 0
54. x = 2
and y = 20
Total number of funct ion from set x to set y is
202 = 400
and total number of one-one funct ion from set xto set y is
20P2 =20!
(20 – 2)!=
20!18!
!P
( )!n
r
nn r
= 20 19
= 380
Pr obabi l t i y t he F chosen t o be one-onefunct ion
= 380400
= 3840
= 1920
= 0.95
Top Related