2015g-ec2.images-amazon.com/images/g/31/img15/books/tiles/... · 2015. 7. 10. · olved aper - 2015...

14
2015-1 SOLVED PAPER - 2015 GENERALAPTITUDE QUESTION 1 T O 5 CARR Y ONE MARK EACH 1. Given Set A = {2, 3, 4, 5} and Set {11, 12, 13, 14, 15}, two numbers are randomly selected, one from each set. What is the probability that the sum of the two numbers equals 16? (a) 0.20 (b) 0.25 (c) 0.30 (d) 0.33 2. Which of the following options is the closest in meaning to the sentence below? She enjoyed herself immensely at the party. (a) She had a terrible time at the party (b) She had a horrible time at the party (c) She had a terrific time at the party (d) She had a terrifying time at the party 3. Which one of the following combinations is incorrect? (a) Acquiescence – Submission (b) Wheedle – Roundabout INSTRUCTIONS 1. There are a total of 65 questions carrying 100 marks. 2. This question paper consists of 2 sections, General Aptitude (GA) for 15 marks and the subject specific GATE paper for 85 marks. Both these sections are compulsory. 3. The GA section consists of 10 questions. Question numbers 1 to 5 are of 1-mark each, while question numbers 6 to 10 are of 2-marks each. The subject specific GATE paper section consists of 55 questions, out of which question numbers 11 to 35 are of 1-mark each, while question numbers 36 to 65 are of 2-marks each. 4. Questions are of Multiple Choice Question (MCQ) or Numerical Answer type. A multiple choice question will have four choices for the answer with only one correct choice. For numerical answer type questions, the answer is a number and no choices will be given. 5. Questions not attempted will result in zero mark. Wrong answers for multiple choice type questions will result in NEGATIVE marks. For all 1 mark questions, 1 3 mark will be deducted for each wrong answer. For all 2 marks questions, 2 3 mark will be deducted for each wrong answer. 6. There is NO NEGATIVE MARKING for questions of NUMERICAL ANSWER TYPE. (c) Flippancy – Lightness (d) Profligate – Extravagant 4. Based on the given statements, select the most appropriate option to solve the given question. If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building? Statements: I. Each step is 3 4 foot high II. Each step is 1 foot wide. (a) Statement I alone is sufficient, but statement II alone is not sufficient (b) Statement II alone is sufficient, but statement I alone is not sufficient (c) Both statements together are sufficient, but neither statement alone is sufficient (d) Statement I and II together are not sufficient Duration: 3 hrs Maximum Marks: 100 2015-1 SOLVED PAPER - 2015 2015 SET - 1

Upload: others

Post on 30-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-1 SOLVED PAPER - 2015

GENERAL APTITUDE

QUESTION 1 TO 5 CARRY ONE MARK EACH

1. Given Set A = {2, 3, 4, 5} and Set {11, 12, 13, 14, 15}, twonumbers are randomly selected, one from each set. What isthe probability that the sum of the two numbers equals 16?(a) 0.20 (b) 0.25(c) 0.30 (d) 0.33

2. Which of the following options is the closest in meaning tothe sentence below?She enjoyed herself immensely at the party.(a) She had a terrible time at the party(b) She had a horrible time at the party(c) She had a terrific time at the party(d) She had a terrifying time at the party

3. Which one of the following combinations is incorrect?(a) Acquiescence – Submission(b) Wheedle – Roundabout

INSTRUCTIONS

1. There are a total of 65 questions carrying 100 marks.

2. This question paper consists of 2 sections, General Aptitude (GA) for 15 marks and the subject specificGATE paper for 85 marks. Both these sections are compulsory.

3. The GA section consists of 10 questions. Question numbers 1 to 5 are of 1-mark each, while question numbers 6 to10 are of 2-marks each. The subject specific GATE paper section consists of 55 questions, out of which question numbers11 to 35 are of 1-mark each, while question numbers 36 to 65 are of 2-marks each.

4. Questions are of Multiple Choice Question (MCQ) or Numerical Answer type. A multiple choice question will havefour choices for the answer with only one correct choice. For numerical answer type questions, the answer is a numberand no choices will be given.

5. Questions not attempted will result in zero mark. Wrong answers for multiple choice type questions will result in

NEGATIVE marks. For all 1 mark questions, 13

mark will be deducted for each wrong answer. For all 2 marks questions,

23

mark will be deducted for each wrong answer..

6. There is NO NEGATIVE MARKING for questions of NUMERICAL ANSWER TYPE.

(c) Flippancy – Lightness(d) Profligate – Extravagant

4. Based on the given statements, select the most appropriateoption to solve the given question.If two floors in a certain building are 9 feet apart, how manysteps are there in a set of stairs that extends from the first floorto the second floor of the building?Statements:

I. Each step is 34

foot high

II. Each step is 1 foot wide.(a) Statement I alone is sufficient, but statement II alone is

not sufficient(b) Statement II alone is sufficient, but statement I alone is

not sufficient(c) Both statements together are sufficient, but neither

statement alone is sufficient(d) Statement I and II together are not sufficient

Duration: 3 hrs Maximum Marks: 100

2015-1 SOLVED PAPER - 2015

2015SET - 1

Page 2: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -2 SOLVED PAPER - 2015

5. Didn’t you buy ______ when you went shopping?(a) any paper (b) much paper(c) no paper (d) a few paper

QUESTION 6 TO 10 CARRY TWO MARKS EACH

6. The pie chart below has the breakup of the number ofstudents form different departments in an engineering collegefor the year 2012. The proportion of male to female studentsin each department is 5:4. There are 40 males in ElectricalEngineering. What is the difference between the numbers offemale students in the Civil department and the femalestudents in the Mechanical department?

Computer Science, 40%

Civil, 30%

Electrical, 20%

Mechanical, 10%

7. The given statement is followed by some courses of action.Assuming the statement to be true, decide the correct option.Statement: There has been a significant drop in the waterlevel in the lakes supplying water to the city.Course of action:I. The water supply authority should impose a partial cut

in supply to tackle the situation.II. The government should appeal to all the residents

through mass media for minimal use of water.II. The government should ban the water supply in lower

areas.(a) Statements I and II follow(b) Statements I and III follow(c) Statements II and III follow(d) All statements follow

8. Select the alternative meaning of the underlined part of thesentence.The chain snatchers took to their heels when the police partyarrived.(a) took shelter in a thick jungle(b) open indiscriminate fire(c) took to flight(d) unconditionally surrendered

9. The number of students in a class who have answeredcorrectly, wrongly, or not attempted each question in exam,are listed in the table below. The marks for each question arealso listed. There is no negative or partial marking.

Q. No M arks AnsweredCorrectly

AnsweredW rongly

NotAttempted

1 2 21 14 62 3 15 27 23 1 11 29 44 2 23 18 35 5 31 12 1What is the average of the marks obtained by the class in theexamination?(a) 2.290 (b) 2.970(c) 6.795 (d) 8.795

10. The probabilities that a student passes in Mathematics,Physics and Chemistry are m, p, and c respectively. Of thesesubjects, the student has 75% chance of passing in atleastone, a 50% chance of passing in atleast two and a 40% chanceof passing in exactly two.Following relation are drawn in m, p, c.I. p + m + c = 27/20II. p + m + c = 13/20III. (p) × (m) × (c) = 1/10(a) only relation I is true(b) only relation II is true(c) relations II and III are true(d) relations I and III are true

TECHNICAL SECTION

QUESTION 11 TO 35 CARRY ONE MARK EACH

11. Suppose that everyone in a group of N people wants tocommunicate secretly with the N-1 others using symmetrickey cryptographic system. The communication between anytwo persons should not be decodable by the others in thegroup. The number of keys required in the system as a wholeto satisfy the confidentiality requirement is(a) 2N (b) N(N-1)(c) N(N-1)/2 (d) (N-1)2

12. Which one of the following fields of an IP header is NOTmodified by a typical IP router?(a) Checksum(b) Source address(c) Time To Live (TTL)(d) Length

13. Which one of the following is TRUE at any valid state in shift– reduce parsing?(a) Viable prefixes appear only at the bottom of the stack

and not inside(b) Viable prefixes appear only at the top of the stack and

not inside(c) The stack contains only a set of viable prefixes(d) The stack never contains viable prefixes

Page 3: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-3 SOLVED PAPER - 2015

14. The height of a tree is the length of the longest root-to-leafpath in it. The maximum and minimum number of nodes ina binary tree of height 5 are(a) 63 and 6, respectively(b) 64 and 5, respectively(c) 32 and 6, respectively(d) 31 and 5, respectively

15. Match the following:P: Prim’s algorithm for minimum spanning treeQ: Floyd – Warshll algorithm for all pairs shortest pathsR: MergesortS: Hamiltonian circuit(I) Backtracking (II) Greedy method(III) Dynamic programming(IV) Divide and conquer(a) P-III, Q-II, R-IV, S-I(b) P-I, Q-II, R-IV, S-III(c) P-II, Q-III, R-IV, S-I(d) P-II, Q-I, R-III, S-IV

16. Which one of the following is NOT equivalent to p«q?(a) (ØpÚq)^(p^Øq) (b) (ØpÚq) ^(q®p)(c) (Øp^q)Ú(p^Øq) (d) (Øp^Øq) v(p^q)

17. SELECT operation in SQL is equivalent to(a) the selection operation in relational algebra(b) the selection operation in relational algebra, except that

SELECT in SQL retains duplicates(c) the projection operation in relational algebra(d) the projection operation in relational algebra, except

that SELECT in SQL retains duplicates18. For any two languages L1 and L2 such that L1 is context-free

and L2 is recursively enumerable but not recursive, which ofthe following is/are necessarily true?

I. 1L (complement of L1) is recursive

II. 2L (complement of L2) is recursive

III. 1L is context – free

IV. 1L È L2 is recursively enumerable(A) I only (B) III only(C) III and IV only (D) I and IV only

19. For a set A, the power set of A is denoted by 2A. If A = {5,{6}, {7}}, which of the following options are TRUE?I. fÎ 2A II. f Î 2A

III. {5, {6}} Î 2A IV. {5{6}} Í 2A

(a) I and III only (b) II and III only(c) I, II and III only (d) I, II and IV only

20. Consider a 4-bit Johnson counter with an initial value of0000. The counting sequence of this counter is(a) 0, 1, 3, 7, 15, 14, 12, 8, 0(b) 0, 1, 3, 5, 7, 9, 11, 13, 15, 0(c) 0, 2, 4, 6, 8, 10, 12, 14, 0(d) 0, 8, 12, 14, 15, 7, 3, 1, 0

21. Which of the following statements is/are FALSE?I. XML overcomes the limitations in HTML to support a

structured way of organizing content.II. XML specification is not case sensitive while HTML

specification is case sensitive.III. XML supports user defined tags while HTML uses pre-

defined tags.IV. XML tags need not be closed while HTML tags be

closed(a) II only (b) I only(c) II and IV only (d) III and IV only

22. A file is organized so that the ordering of data records is thesame as or close to the ordering of data entries in some index.Then that index is called(a) Dense (b) Sparse(c) Clustered (d) Unclustered

23. Which of the following is/are correct inorder traversalsequence(s) of binary search tree(s)?I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25III. 2, 7, 10, 8, 14, 16, 20 IV. 4, 6, 7, 9, 18, 20, 25(a) I and IV only (b) II and iii only(c) II and IV only (d) II only

24. Suppose two hosts use a TCP connection to transfer a largefile. Which of the following statements is/are FALSE withrespect to the TCP connection?I. If the sequence number of a segment is m, then the

sequence number of the subsequent segment is alwaysm + 1.

II. If the estimated round trip time at any given point oftime is t sec the value of the retransmission timeout isalways set to greater than or equal to t sec.

III. The size of the advertised window never changesduring the curse of the TCP connection.

IV. The number of unacknowledged bytes at the sender isalways less than or equal to the advertised window.

(a) III only (b) I and III only(c) I and IV only (d) II and IV only

25. For computers based on three-address instruction formats,each address field can be used to specify which of thefollowing.S1: A memory operandS2: A processor registerS3: An implied accumulator register(a) Either S1 or S2 (b) Either S2 or S3(c) Only S2 and S3 (d) All of S1, S2 and S3

26. Consider a system with byte–addressable memory, 32-bitlogical addresses, 4 kilobyte page size and page table entriesof 4 bytes each. The size of the page table in the system inmegabytes is ______.

Page 4: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -4 SOLVED PAPER - 2015

27. The following two functions P1 and P2 that share a variableB with an initial value of 2 execute concurrently.P1 ( ) { P2 ( ) {

C = B – 1; D = 2 * B;B = 2 * C; B = D – l;

} }

28. lim®¥x x1/x is

(a) ¥ (b) 0(c) 1 (d) Not defined

29. Which one of the following is the recurrence equation for theworst case time complexity of the Quicksort algorithm forsorting n (³ 2) numbers? In the recurrence equations givenin the options below, c is a constant.(a) T(n) = 2T(n/2) + cn(b) T(n) = T(n–1) + T(1) + cn(c) T(n) = 2T(n–1) + cn(d) T(n) = T(n/2) + cn

30. If g(x) =1 – x and h(x) = x

x 1-, then

g(h(x))h(g(x))

is

(a)h(x)g(x) (b)

1x-

(c)g(x)h(x) (d) 2

x(1 x)-

31. In one of the pairs of protocols given below, both theprotocols can use multiple TCP connections between thesame client and the server. Which one is that?(a) HTTP, FTP (b) HTTP, TELNET(c) FTP, SMTP (d) HTTP, SMTP

32. What are the worst-case complexities of insertion anddeletion of a key in a binary search tree?(a) q(log n) for both insertion and deletion(b) q(n) for both insertion and deletion(c) q(n) for insertion and q(log n) for deletion(d) q(log n) for insertion and q(n) for deletion

33. The output of the following C program is ______.void f1(int a, int b){

int c;c=a; a=b; b=c;

}void f2(int *a, int *b){

int c;c=*a; *a=*b; *b=c;

}int main ( ){

int a=4, b=5, c=6;f1(a, b);f2(&b, &c);printf(“%d”, c–a–b);

}

34. Match the following:P: Condition coverageQ: Equivalence class partitioningR: Volume testingS: Alpha testing(I) Black-box testing (II) System testing(III) White-box testing (IV) Performance testing(a) P-II, Q-III, R-I, S-IV(b) P-III, Q-IV, R-II, S-I(c) P-III, Q-I, R-IV, S-II(d) P-III, Q-I, R-II, S-IV

35. In the LU decomposition of the matrix 2 24 9

é ùê úë û

, if the

diagonal elements of U are both 1, then the lower diagonalentry l22 of L is ______.

QUESTION 36 TO 65 CARRY TWO MARKS EACH

36. The graph shown below has 8 edges with distinct integer edgeweights. The Minimum Spanning Tree (MST) is of weight 36and contains the edges: {(A, C), (B, C), (B, E),(E, F), (D,F)}. The edge weights of only those edges whichare in the MST are given in the figure shown below. Theminimum possible sum of weights of all 8 edges of this graphis _______.

15

2

9 6

4B

A

E

F

DC

37. Consider a disk pack with a seek time of 4 milliseconds androtational speed of 10000 Rotations Per Minute (RPM). Ithas 60 sectors per track and each sector can store 512 bytesof data. Consider a file stored in the disk. The file contains2000 sectors. Assume that every sector access necessitates aseek, and the average rotational latency for accessing eachsector is half of the time for one complete rotation. The totaltime (in milliseconds) needed to read the entire file is_______.

38. Consider the following pseudo code, where x and y arepositive integers.beginq: = 0r : = x

Page 5: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-5 SOLVED PAPER - 2015

while r > y dobeing r : = r – y q : = q + 1end

endThe post condition that needs to be satisfied after the programterminates is(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}

39. Consider the following relations:Students

Roll No. Student Name1 Raj2 Rohit3 Raj

Performance

Roll No Course Marks1 Math 801 English 702 Math 753 English 802 Physics 653 Math 80

Consider the following SQL query. SELECT S.Student_Name, sum (P.Marks)FROM Student S, Performance PWHERE S.Roll_No. = P.Roll_No.GROUP BY S.Student_NameThe number of rows that will be returned by the SQL queryis _______.

40. Consider a uniprocessor system executing three tasks T1, T2and T3, each o which is composed of an infinite sequence ofjobs (or instances) which arrive periodically at intervals of 3,7 and 20 milliseconds, respectively. The priority of each taskis the inverse of its period, and the available tasks arescheduled in order of priority, with the highest priority taskscheduled first. Each instance of T1, T2 and T3 requires anexecution time of 1, 2 and 4 milliseconds, respectively. Giventhat all tasks initially arrive at the beginning of the 1st

millisecond and task preemptions are allowed, the firstinstance of T3 completes its execution at the end of ______milliseconds.

41. Consider the NPDA < Q = {q0, q1, q2}, S = {0, 1},G = {0, 1,}^d, q0, ^, F = {q2}>, where (as per usualconvention) Q is the set of states, S is the input alphabetd isthe stack alphabet, d is the state transition function, q0 is theinitial state, ^ is the initial stack symbol, and F is the set ofaccepting states. The state transition is as follows:

q0 q1 q2

1, Z Z®0, Z 0Z®

0, 1Z Z®1, 0Z Z®

0/1/ , Z ZÎ ® Î ^®Î,

Which one of the following sequences must follow the string101100 so that the overall string is accepted by theautomation?(a) 10110 (b) 10010(c) 01010 (d) 01001

42. What is the output of the following C code? Assume that theaddress of x is 2000 (in decimal) and an integer requires fourbytes of memory?int main( ){unsigened int x[4] [3] = {(1,2,3), {4,5,6}, {7, 8, 9}, {10, 11,12}};printf(“%u, %u, %u”, x+3, *(x+3),

*(x+2)+3);}(a) 2036, 2036, 2036(b) 2012, 4, 2204(c) 2036, 10, 10(d) 2012, 4, 6

43. The binary operator ¹ is defined by the following truth table.

0 0 00 1 11 0 11 1 0

¹p q p q

Which one of the following is true about the binary operator ¹ ?(a) Both commutative and associative(b) Commutative but not associative(c) Not commutative but associative(d) Neither commutative nor associative

Page 6: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -6 SOLVED PAPER - 2015

44. The least number of temporary variables required to createthree-address code in static single assignment form for theexpression q+r/3+s–t*5+u*v/w is ______.

45.

M: a

b

b a

N: b

a

a b

Consider the DFAs M and N given above. The number ofstates in a minimal DFA that accepts the languagesL(M) Ç L(N) is ________.

46. Consider a main memory with five page frames and thefollowing sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3,8, 9, 3, 6, 2, 1, 3. Which one of the following is true withrespect to page replacement policies First In First Out (FIFO)and Least Recently Used (LRU)?(a) Both incur the same number of page faults(b) FIFO incurs 2 more page faults than LRU(d) LRU incurs 2 more page faults than FIFO(d) FIFO incurs 1 more page faults than LRU

47. Suppose L = {p,q,r,s,t} is a lattice represented by thefollowing Hasse diagram:

q r

t

p

s

For any x, y Î L, not necessarily distinct, x Ú y and x Ù y arejoin and meet of x, y respectively. Let L3 = {(x,y,z): x,y,z ÎL} be the set of all ordered triplets of the elements of L. Letpr be the probability that an element (x, y, z) Î L3 chosenequiprobably satisfies x Ú (y Ù z) = (x Ú y) Ù (x Ú z). Then(a) pr = 0 (b) pr = 1

(c) 0 < pr 15

£ (d)15

< pr < 1

48. Let G = (V, E) be a simple undirected graph, and s be aparticular vertex in it called the source. For x Î V, let d(x)denote the shortest distance in G from s to x. A Breadth FirstSearch (BFS) is performed starting at s. Let T be resultantBFS tree. If (u, v) is an edge of G that is not in T, then whichone of the following CANNOT be the value of d(u) – d(v)?(a) –1 (b) 0(c) 1 (d) 2

49. Let G be a connected planar graph with 10 vertices. If thenumber of edges on each face is three, then the number ofedges in G is ______.

50. Consider the operationsf(X,Y,Z) = X¢YZ+ XY¢+Y¢Z¢ andg(X,Y,Z) = X¢YZ+ X¢YZ¢++XY.Which one of the following is correct?(a) Both {f} and {g} are functionally complete(b) Only {f} is functionally complete(c) Only {g} is functionally complete(d) Neither {f} nor {g} is functionally complete

51. Consider the following 2 × 2 matrix A where two elementsare unknown and are marked by a and b. The eigenvalues ofthis matrix ar –1 and 7. What are the values of a and b?

A = 1 4b a

æ öç ÷è ø

(A) a = 6, b = 4 (B) a= 4, b = 6(C) a = 3, b = 5 (D) a= 5, b = 3

52. 2/2

cos(1/ x)dx

x

p

p=ò _________ .

53. Suppose that the stop-and-wait protocol is used on a link witha bit rate of 64 kilobits per second and 20 millisecondspropagation delay. Assume that the transmission time for theacknowledgement and the processing time at nodes arenegligible. Then the minimum frame size in bytes to achievea link utilization of at least 50% is _________.

54. A positive edge-triggered D flip-flop is connected to apositive edge-triggered JK flip-flop as follows. The Q outputof the D flip-flop is connected to both the J and K inputs ofthe JK flip-flop, while the Q output of the JK flip-flop isconnected to the input of the D flip-flop is connected to boththe J and K inputs of the JK flip-flop, while the Q output ofthe JK flip-flop is connected to the input of the D flip-flop.Initially, the output of the D flip-flop is set to logic one andthe output of the JK flip-flop is cleared. Which one of thefollowing is the bit sequence (including the initial state)generated at the Q output of the JK flip-flop when the flip-flops are connected to a free running common clock? Assumethat J = K = 1 is the toggle mode and J = K = 0 is the state-holding mode of the JK flip-flop. Both the flip-flops havenon-zero propagation delays.(a) 0110110….. (b) 0100100….(c) 011101110…. (d) 011001100…

Page 7: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-7 SOLVED PAPER - 2015

55. Consider the following C function.int fun1 (int n){int i, j, k, p, q = 0;for (i = 1; i < n; ++i){

p = 0;for(j = n; j > 1; j = j/2)++p;for(k =1; k < p; k = k*2)++q;

}return q;

}Which one of the following most closely approximates thereturn value of the function fun1?(A) n3 (B) n(log n)2(C) n log n (D) n log(log n)

56. Consider a non-pipelined processor with a clock rate of 2.5gigahertz and average cycles per instruction of four. Thesame processor is upgraded to a pipelined processor with fivestages; but due to the internal pipelined delay, the clock speedis reduced to 2 gigahertz. Assume that there are no stalls inthe pipeline. The speed up achieved in this pipelinedprocessor is _____.

57. Consider an Entity-Relationship(ER) model in which entitysets E1 and E2 are connected by an m: n relationship R12. E1and E3 are connected by a 1: n (1 on the side of E1 and n onthe side of E3) relationship R13.E1 has two single-valued attributes a11 and a12 of which a11is the key attribute. E2 has two single-valued attributes a21and a22 of which is the key attribute. E3 has two single-valuedattributes a31 and a32 of which a31 is the key attribute. Therelationships do not have any attributes.If a relational model is the derived from the above ER model,then the minimum number of relations that would begenerated if all the relations are in 3NF is _______.

58.99

x 1

1x(x 1)=

=+å ______________ .

59. Let an represent the number of bit strings of length ncontaining two consecutive 1s. What is the recurrencerelation for an?(A) an–2+ an–1+2n–2

(B) an–2+2an–1+2n–2

(C) 2an–2+an–1+2n–2

(D) 2an–2+2an–1+2n–2

60. Consider the following C program segment.while (first <= last){

if (array[middle] < search)first = middle + 1;else if (array[middle] = = search)

found = TRUE;else last = middle – 1;

middle = (first + last)/2;}if (first > last) notPresent = TRUE;

The cyclomatic complexity of the program segment is______.

61. Consider a max heap, represented by the array: 40, 30, 20,10, 15, 16, 17, 8, 4.

Array Index 1 2 3 4 5 6 7 8 9Value 40 30 20 10 15 16 17 8 4

Now consider that a value 35 is inserted into this heap. Afterinsertion, the new heap is(a) 40, 30, 20, 10, 15, 16, 17, 8, 4, 35(b) 40, 35, 20, 10, 30, 16, 17, 8, 4, 15(c) 40, 30, 20, 10, 35, 16, 17, 8, 4, 15(d) 40, 35, 20, 10, 15, 16, 17, 8, 4, 30

62. Suppose the following disk request sequence (track numbers)for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80,25, 70. Assume that the initial position of the R/W head is ontrack 50. The additional distance that will be traversed by theR/W head when the Shortest Seek Time First (SSTF)algorithm is used compared to the SCAN (Elevator)algorithm (assuming that SCAN algorithm moves towards100 when it starts execution) is ______ tracks.

63. Consider a LAN with four nodes S1¸S2, S3 and S4. Time isdivided into fixed-size slots, and a node can begin itstransmission only at the beginning of a slot. A collision is saidto have occurred if more than one node transmit in the sameslot. The probability of generation of a frame in a time slotby S1, S2, S3 and S4 are 0.1, 0.2, 0.3 and 0.4, respectively.The probability of sending a frame in the first slot without anycollision by any of these four stations is ________.

64. An algorithm performs (log N)1/2 find operations, N insertoperations, (log N)1/2 delete operations, and (log N)1/2

decrease-key operations on a set of data items with keysdrawn form a linearly ordered set. For a delete operation, apointer is provided to the record that must be deleted. For the

Page 8: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -8 SOLVED PAPER - 2015

decrease-key operation, a pointer is provided to the recordthat has its key decreased. Which one of the following datastructures is the most suited for the algorithm to use, if thegoal is to achieve the best asymptotic complexity consideringall the operations?(a) Unsorted array(b) Min–heap(c) Sorted array(d) Sorted doubly linked list

65. A variable x is said to be live at a statement Si in a programif the following three conditions hold simultaneously:I. There exists a statement Sj that uses xII. There is a path from Si to Sj in the flow graph

corresponding to the programIII. The path has no intervening assignment to x including

at Si and Sj

1

2 3

4 q = v + r

v = r + u

p = q + rs = p + qu = s * v

q = s * u

The variables which are live at the statement in basic block2 and at the statement in basic block 3 of the above controlflow graph are(A) p, s, u (B) r, s, u(C) r, u (D) q, v

Page 9: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-9 SOLVED PAPER - 2015

GENERAL APTITUDE

1. (a) Number of possible combinations of two number

one from each set = 1 1

4 5 20C C´ =

Combinations having sum 16 are (2, 14), (3, 13),(4, 12) and (5, 11)

Required Probability 4 0.20

20= =

2. (c)3. (b) As a verb wheedle is to cajole or attempt to persuade

by flattery. As a adjective roundabout is indirectcircuitous or circumlocutionary; that doesnot do somethey in a direct way.

4. (a) I. Each step is 34

foot high.

No. of steps 4 12

39´= =

Statement I alone is sufficient to answer.5. (a)6. 32 Let total number of students be x

Then, 5 20%9´ of x = 40

5 20 409 100

x´ =

x = 360

No. of females in civil department = 4 30%9´ of x

No. of females in Mechanical department 4 10%9= ´ of x

Difference 4 3 49 10 10 9 5

x x xé ù= - = ´ê úë û

4 360 329 5= ´ =

7. (a) 8. (c)

9. (b)21 2 15 3 11 11 1 23 2 31 5 2.970

21 15 11 23 31´ + ´ + ´ ´ + ´ + ´ =

+ + + +10. (a) P(atleast two) – P(exactly 2)

= 0.5 – 0.4 = 0.10.75 = p + m + c + 0.1 – (0.5 + 0.11 × 2)

\ p + m + c = 0.65 + 0.7 = 1.35 = 2720

=

TECHNICAL SECTION

11. (c) In Symmetric Key Cryptography, if 'N' number of usersis keen to partake, then N (N-1)/2 number of keys isrequired to satisfy the confidentiality requirements ofany users.

12. (b) Option (a), (Checksum) needs to be reorganized by eachvisited Router since Time to Live value is customized.Option (b), (Source Address) can't be customized byan IP router. Only NAT (Network Address Translation)can transform it.Option (c), (TTL) is decremented by each visited router.When it arrives at to zero, then packet will be rejected.Option (d), (Length) also customized whenever thereis a need of performing the destruction process.

13. (b) Viable prefixes appear only at the top of the stack andnot inside is valid in shift reduce parsing, because wewill write the shift reduce parsing program for everyvariable such that if any variable contain more thanone possibility, it will choose the correct production.

14. (a) We know that the maximum no. of nodes in a binarytree with (height) h = 2h+1–1.Here h = 5, then, we easily calculate the h as:

h = 25 + 1–1= 64 – 1 = 63And the minimum no. of nodes with height h is h + 1.\h = 5

L = 0L = 1

L = 2L = 3

L = 4L = 5

15. (c) Prim's Algorithm always select minimum distancebetween two of its positions which is not anythingbut greedy method. Floyd-Warshall always varies itdistance at each iteration, which is nothing but dynamicprogramming. In Merge Sort first, we always dividedthe data and merge to it withcomplete sorting. Hencedivide and conquer.

16. (c) We can present p«q as:p«q º (p ®q) Ù (p ®q)º (7pÚ q)Ù (7pÚ q) (\p ®q = 7p Ú q)º (7p Ù q) Ú (q Ù 7q) Ú (7p Ù p) Ú (q Ù p)(using distributive laws)º (7pÙ 7q)Ú (qÙ p) (using complement lawsand commutative laws)

\p«q is NOT equivalent to (7pÙ q)Ú (q Ù 7q)

Page 10: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -10 SOLVED PAPER - 2015

17. (d) SELECT operation in SQL perform vertical partitioningwhich is made by projection operation in relationalcalculus, but SQL is multi-sets. Hence the projectionoperation in relational algebra, except that SELECT inSQL retains duplicates answer is correct.

18. (d) I Þ 1L is recursive

This one is true, because L1 is context free which isnonentity but recursive, recursive language is closedunder complement. Hence it is true.

II Þ 2L (complement of L2) is recursive

If L2 and L2 both are recursive enumerable then L2 isrecursiveHence, statement II is false

III Þ 1L is context freeWhich is false because context free language doesnot closed under complement.

IV Þ 1L L2 is recursive enumerable.

1L recursive, because every recursive language isalso recursive enumerable.

2L recursive enumerable.

1 2L LÈ Þ recursive enumerable, because recursiveenumerable language closed under union.

19. (c) 2A ® Power set of A i.e., set of all subsets of A. Sinceempty set is a subset of every set

Aφ 2\ Í and Aφ 2Î

Since { }5, 6 Í and 5 Ï 2A

{ } A5, 6 2\ Î and { } A5, 6 2Í

\ I, II and III are TRUE20. (d) 0000 – 0

1000 – 81100 – 12and so on.

21. (c) I . XML overcomes the limitations in HTML to supporta structured way of organizing content.There for, it istrue.II. HTML is case insensitive while XML is casesensitive Hence it is false.III. XML supports user defined tags while HTMLuses predefined tags. Hence it is true.IV XML tags must be closed Hence it is false.

22. (a) According to the given question, we can say thateach data record in the data file has one entry in theindex file. So it must be dense index.

23. (a) In-order traversal of binary search tree gives ascendingorders and in BST, at every node root element is greaterthan and equal to all element present in left sub-treeand less than or equal to all the elements in right sub-tree.

24. (b) I: FALSEThe sequence number of the subsequent segmentdepends on the number of 8-byte characters in thecurrent segment.II: TRUEDepending on the value of a or expected RTT it mayor may not be greater than 1.III: FALSEIt is the size of the receiver's buffer that's neverchanged. Receive Window is the part of the receiver'sbuffer that's changing all the time depending on theprocessing ability at the receiver's side and the networktraffic.IV: TRUEThe number of unappreciated bytes that A sends cannotexceed the size of the receiver's window. But if it can'texceed the receiver's window, then it definitely has noway to exceed the receiver's buffer as the window sizeis always less than or equal to the buffer size. On theother hand, for urgent messages, the sender CAN sendit in even although the receiver's buffer is full.

25. (a)26. Given that Logical Address (LA) = 32 bits

Logical Address Size (LAS) = 232 = 448Page size = 4 kB

\number of pages 20LAS 44B 2P.S 4KB

= =

Size of the page table entry = 4 bytes\Page table size =220 × 4 = 4 MB

27. (c) If we execute P2 process after P1 process, then we getB = 3If we execute P1 process after P2 process, then we getB = 4If we did preemption between P1 and P2 processes,then we get B = 2 (Preemption have done from P1 toP2) or B = 3 (Preemption have done from P2 to P1). So,among 2 and 3 values, only one value will be saved inB. So, total no. of different values that B can possiblytake after the execution is 3.

28. (c) Let y 1

lim®¥

= xx

x

ln y lim®¥

=x

ln xx

(Taking Logorihms)

ln y

1

lim1®¥

=x

x (¥¥

form and using L-Hospital rule)

ln y = 0Hence, y = 1

29. (b) When the pivot is the smallest or largest element atpartitioning on a block of size n the result capitulatesone empty sub-block, one element (pivot) in the correctplace and sub block of size n-1Hence recurrence relationT(n) = T(n – 1) + T(1) + cn

Page 11: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-11 SOLVED PAPER - 2015

30. (a) g(x) = 1 – x ...(1)

( )1

xh xx

=- ...(2)

Replace x by h (x) in ...(1)Replace x by g (x) in ...(2)g(h(x) ) =1– h (x)

11

xx

= --

11x

-=-

( )( ) ( )( ) 1g x

h g xg x

=-

1 xx-=-

( )( )( )( ) ( )( )1 1

g h x xx xh g x

=- -

( )( )( )( )

11

xg h x x

xh g x-=-

( )( )( )( )

( )( )

g h x h xg xh g x

=

31. (d) HTTP (Hyper Text Transfer Protocol) and SMTP(Simple Message Transfer Protocol) protocols can useseveral TCP associations between the same client andthe server.

32. (b) If we judge a single string of binary search tree, thenwe have to sketch all the nodes for insertion or deletionin worst case hence θ (n) for both.

33. –5 In function "main ()"f1 is called by value, so local variables a, b, c of f1 arecustomized but not the local variables a, b, c of mainfunction.f2 is called by reference.int main () {int a = 4, b = 5, c = 6f1(a, b)f2(&b, &c)printf ("%d", c-a-b);}f2(int *a, int *b){int c;c = * a; c 5* a = b; [will change 'b' value of main to c value ofmain]*b = c; [will change 'c' value of main to c value of f2]}

34. (d) Condition coverage is also known as predicate coveragein which each of the Boolean expression estimated toboth true and false.Which is nothing but white-boxtesting, which tests internal structures of a function?HenceP matches with III.

Equivalence class partitioning is a software testingmethod that divides the input data of a software unitinto partitions of corresponding data from which testcases can be derived, which is nothing but black boxtesting.HenceQ Matches with I.Volume testing submits to testing a softwareapplication with certain amount of data which isnothing but system testing.HenceR matches with II.Alpha testing is replicated or actual operation testingby potential client/stakeholders, which is nothing butperformance testing.HenceR matches with IV

35. 511 12

21 22

02 2 1A LU

4 9 0 1l ul lé ùé ù é ù= Þ = ê úê ú ê ú

ë û ë ûë û

11 11 12

21 21 12 22

l l ul l u lé ù

= ê ú+ë û\ l11 = 2;l11u12 = 2 Þ u12 = 1l21 = 4; l21u12 + l22 = 9 Þ l22 = 5

36. 69

C

B E

D

FA

10

15

4

6

16

9

2 7

Total sum = 10 + 9 + 2 + 15 + 7 + 16 + 4 + 6 = 6937. 14020

Given thatSeek time = 4ms60s ® 10000 rotations60s ® 10000 rotations

60 6 110000

ms rotation= ¬ time

\ Rotational Latency1 6 32

ms ms= ´ =

1 track ® 600 sectors6ms ¬ 600 sectors (1 rotation means 600 sectors or 1 track)

1 sector 6ms 0.01ms600

® =

2000 sector ® 2000 (0.01) = 20 ms\ Total timeneeded to read the entire tile is = 2000 (4 + 3) + 20

= 8000 + 6000 + 20= 14020 ms

Page 12: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -12 SOLVED PAPER - 2015

38. (b) The loop terminater when r < y. so, r < y is one postcondition.In each iteration q is incremented by 1 and y issubtracted from r. Initialvalue of r is x.

So, loop iterates xy times and q will be equal to

xy

and r = x% yÞ x = qy + rSo, (b) is correct answer.

39. (2) Output table is

Raj 310Rohit 140

40. 13T1 T2 T1 T3 T1 T2 T1 T3 T1 ...1 2 4 5 7 8 10 11 (13) 14

41. (d) 42. (c)43. (a) It is clear that from the truth table, the binary operation

# is equivalent to XOR i.e., Å,which satisfies bothcommutative and associative i.e., p # q º q # p and p# (q # r) º (p # q) # r

44. 345. 1 M accepts the strings which end with a and N accepts

the strings which end with b. Their intersection shouldaccept empty language.

a, b

46. (a)47. (d) Number of elements in L3 = Number of ways in which

we can choose 3 elements from 5 with repetition= 5 × 5 × 5 = 125 Now, when we take x = t, then also thegiven condition is satisfied for any y and z. Here, yand z can be taken in 5 × 5 = 25 ways.Take x = r, y = p, z = p, these, also the given condition

is satisfied. So, 25 1 .

125 5rp > >

For x = p, y = r, z = t , the given condition is notsatisfied.So, pr ¹ 1.So, (d) corret option.

48. (d)49. 24 By Euler's formula,

|V|+|R| = |E|+2 _________ (1) where |V|, |E|, |R| arerespectively number of vertices, edges and faces(regions)Given |V| = 10 _______ (2) and number of edges oneach face is three

` \3|R| = 2|E|Þ |R| 32= |E|_________ (3)

Subtracting (2), (3) in (1), we get

E210 E E 2 8 E 243 3

+ = + Þ = Þ =

50. (b)51. (d) Given that 1l = –1 and 2 7l = are eigen values of AA

By the properties, ( )1 2 tr Al l+ = , traces of A i.e.,

sum of the diagonal elements and 1 2.l l = determinantof A.

Þ 1 + a = 6a = 5

And ¯a – 4b = –75 – 4b = –7–4b = –7 –5–4b = –12 Þ b = 3

52. (-1)2

1 2

1cos æ öç ÷è øò x dxx

p

p

Put 1 tx

=

21-Þ =dx dt

xAnd

22

x t pp= Þ =

1x t pp= Þ =

( ) ( )æ ö= -ç ÷è øò òQb aa b

f x dX f x dx

2cos t dt= òpp

( )2

sin sin sin 12æ ö= = = = -ç ÷è ø

t pppp

53. 320 Given that B = 64 kbpsTp = 20 msh ³ 50%For h ³ 50% Þ L ³ BRÞ L = 64 ×103 × 2 × 20 × 10–3

= 2560 bits = 320 bytes54. (a)

prev.Q O Q

— 1 00 0 11 1 11 1 00 0 11 1 1

Page 13: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015-13 SOLVED PAPER - 2015

D flipflop outputs its input and Jk flipflop outputtoggles its output when 1 is given to both J and Kinputs.Q = Dprev (Qprev) + (Dprev) (Qprev).

55. (c) int fun1(int n){int i, j, k, p, q = 0;for (i = 1;i < n; ++ p)® n times{p = 0For( j = n; j > 1; j = j/ 2)++p;log (log n) timesfor (k = 1;k < p;k = k * 2)++q;}return q;}\ nlog(logn)

56. 3.2 Speed up = old execution time/ new execution time.

old

old

new

new

CPICF

CPICF

=

(where CF is clock frequency and CPI is cycles perintruction. So, CPI/CF gives time per instruction)

42.5 3.212

= =

Without pipelining an instruction was taking 4 cycles.After pipelining to 5 stayes we need to see themaximum clock cycle a staye can take and this will bethe CPI assuning no stalls.

57. 5

a11 a12 a21 a22

E1 R12E1

R13

E3

a31 a32

n

m n

E1(a11, a12), E2 (a21, a22), E3 and R13 (a11, a31, a32),R2 (a11, a12),But in table (a11, a31, a32) there may be transitivedependency between a11 and a32 so we shoulddecompose this table into 2 more tables.

58. 0.99 ( )99

11

1X x x= =+å _____________ .

( ) ( ) ( ) ( ) ( )99

1

1 1 1 1...1 1 2 2 3 3 4 99 100X x x=

1= + + + ++å

( ) ( ) ( ) ( )2 1 3 2 4 3 100 99...1 2 2 3 3 4 99 100- - - -= + + +

1 1 1 1 1 1 1 1 1...1 2 2 3 3 98 99 99 100= - + - + + - + -

1 991 0.99100 100

= - = =

59. (a)60. 561. (b)

40

30

10

8 4

15 16

20

17

Insert 35 Þ according to CBT

40

30

10

8 4

15 16

20

17

35

Page 14: 2015g-ec2.images-amazon.com/images/G/31/img15/books/tiles/... · 2015. 7. 10. · OLVED APER - 2015 2015-3 14. The height of a tree is the length of the longest root-to-leaf path

2015 -14 SOLVED PAPER - 2015

Heapification

40

30

10

8 4

15 16

20

17

35

40

30

10

8 4

35 16

20

17

15

40

35

10

8 4

30 16

20

17

15

62. 1063. 0.4404

P = P(S1) P(~S2) P (~S3) P(~S4) +P(~S1) P(S2) P(~S3) P(~S4) +P(~S1) P(~S2) P(S3) P(~S4) +P(~S1) P(~S2) P (~S3) P(S4)= 0.1 × 0.8× 0.7 × 0.6+ 0.9 × 0.2 × 0.7 × 0.6+ 0.9 × 0.8 × 0.3 × 0.6+ 0.9 × 0.8 × 0.7 × 0.4= 0.4404.

64. (a) If we use unsorted array(logN)1/2 find operations will take log N1/2.q(N(log N)1/2) timeN insertions will take N×q(1) = q(N) time(logN)1/2 delete operations will take (log N)1/2 θ× (1)=q(log N)1/2 time as pointer to the record which shouldbe deleted is provided(logN)1/2 decrease key operations will take q(logN)1/2

time\ On the whole, time complete to perform all theseoperations is q( N(log N) 1 /2 )If we use sorted array insertions will take more time[O(NlogN) as it should be sorted after insertions]. Ifwe use min heap, again insertions will take more time[O(NlogN) as it should be heapifie d].

65. (c)