Professional Documents
Culture Documents
Paper Set 2018
Paper Set 2018
ISBN : 978-9386629029
26
PRACTICE SET 3
INSTRUCTIONS
1. There are a total of 65 questions carrying 100 marks. Duration of the set is 3 hrs.
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
1
NEGATIVE marks. For all 1 mark questions, mark will be deducted for each wrong answer. For all 2 marks questions,
3
2
mark will be deducted for each wrong answer..
3
6. There is NO NEGATIVE MARKING for questions of NUMERICAL ANSWER TYPE.
é6ù
Again applying 4-way merge sort, we can create ê ú = 2
Q J K Q ( t + 1) ê4ú
0 0 0 0 sorted subfiles.
0 0 1 0 These two can be merged to get the final sorted file.
0 1 0 1 We require a total of 4-passes.
0 1 1 1 Total cast will be 2 × 105 × 4 = 840 units.
1 0 0 1
1 0 1 0 20. (b) Þ ( A + BC ) B + ( A + BC ) CD
1 1 0 1
Þ AB + BC + ACD + BCD
1 1 1 0
= AB + ACD + BC (1 + D )
AB AB Ù C * D - + EF / GH + /
CD 00 01 11 10 AB Ù C * D - EF / GH + /
0 1 3 2
00 1 1 d 1 28. (d) The integer value 257 is stored in the memory as
4 5 7 6
00000001 00000001. So, the individual bytes are taken
01 0 0 1 1 by casting it to char* and get printed.
12 13 15 14 29. (c)
11 0 0 d 1
9 11
30. (d) BST is
8 10
10 d 0 d 1
55
Þ Y = f (A, B, C, D) = C D + A
75
45
S E M
24. (a) 85
1 bit 8 bits 23 bits 24 50 60
(14.25)10 = (1110.01)2
1110.01 × 20 = 1.11001 × 23 10
35 48
S: 1
E : (3 + 127)10 = (10000010)2
31. (d) The procedure of inserting an element in the binary
M : 11001000 ------- search tree takes O (h) time, where h is the height of
Value stored: the tree.
It is known that the expected height of a randomly
1 1 0 0 0 0 0 10 1 1 0 0 1 0 0 0 0 - - -
built binary search tree on n keys is O (log n).
[C 1 6 4 0 0 0 ]H
\ The running time to insert an element = O(h)
25. (c) = O(log n)
\ The running time to insert n elements = O (n log n)
26. (c) fun = fun (fun (106))
32. (c) We know that, the order of the algorithm is equivalent
= fun (96) to the total sum of the order of that modules.
= fun (fun (107)) So, the order of given algorithm
= fun (97) = Order of module M1 + Order of module M2
= f(n) + f ¢(n)
= fun (fun (108))
33. (d) Loop terminate in O(1) time if n is even and O(2) time if
= fun (98) n is odd.
= fun (fun (109)) 34. (c) L 2 £ pL 4
= fun (99)
L1 £ pL 2
= fun (fun (110))
= fun (100) If L4 Î P
= fun (fun (111)) then L2 Î P
= fun (101) L1 Î P ,
= 91
Hence option (c).
35
35. (d) Minimum string that it will accept = 011 and it will 42. (b) The TM leaves the starting 0 and 1 as it is and then
always be in end but as at state A and B there are converts remainder of string to 0’s due to 0, 0, R and 1,
looping of 1 and 0. So, it will accept (0/1)*. 0, R combination of state B.
\ Regular expression = (011) * 011
\ (0 + 1) 0* enclosed by blanks will be the final
2n æ - n ö2 contents of tape after TM halts in F.
æ 1ö æ 1ö
36. (b) lim ç1- ÷ =ç lim ç1- ÷ ÷
n®¥ è n ø ç n®¥ è n ø ÷ 43. (b) There is the theorem which shows that intersection of
è ø
a regular language and context free language is context
= (e)–2 = e–2 free as L1 is regular and L2 is context free.
-f (x)
æ 1 ö 44. (b) The regular expression generate
[because lim ç1- ÷
n®¥ è f (x) ø {0, 00, 10, 000, 110, 100, 110, .....}
37. (a) Total number of divisors of 1099 = 299 × 599 = 2 × 5 and all string end with 0.
that are most direct of 1096 45. (a) Grammar with no Î production so that no consecutive
º (99 + 1)(991 + 1)
symbols on RHS of productions are non-terminals, will
1096 × 103
be operator grammar.
Þ 1096, 2 × 1096, 4 × 1096, 9 × 1096, 8 × 1096
From the given option, only option (a) does not contain
1000 any grammar with Î production and consecutive non-
=0
n
terminal symbols on RHS.
Þ 10 × 1096, 20 × 1096, 29 × 1096, 40 × 1096, 50 × 1096
n = 1 – 100 125 × 1096, 250 × 1096, 500 × 1096, 100 × 46. (d) P1 : ( ( A Ù B ) ® C ) º ( ( A ® C ) Ù ( B ® C ) )
1096, 100 × 1096, 200 × 1096
= total 16 LHS : ( A Ù B) ® C º AB ® C
10 1
\ Required probability = = = ( AB )¢ + C º A¢ + B¢ + C
10000 625
38. (c) Multiply as (M1 × (M2 × M3 )) × M4
RHS : ( A ® C ) Ù ( B ® C ) ¹ ( A ¢ + C )( B¢ + C )
Total number of scalar multiplication is
= qrs + pqs + pst = A ¢B¢ + C
= 10000 + 5000 + 4000 = 19000 Þ RHS ¹ LHS
39. (a) n = 1024
\ P1 is not tautology
f1(n) = 21024
f2(n) = 215 P2 : (( A Ú B ) ® C ) º ( ( A ® C ) Ú ( B ® C ) )
f3(n) = 10 × 210
f4(n) = 102410 = 2100 LHS : ( A Ú B ) ® C º A + B ® C
\ f3, f2, f4, f1 is required increasing order
40. 9 Want to paint 52 with k-color no adjacent letter will have = ( A + B )¢ + C
the same colour. This problem is 9 colourable, so k = 9
41. (b) L1 is not context-free but L2 is context-free grammar = A ¢B¢ + C
For L2, the grammar is
RHS : ( A ® C ) Ú ( B ® C ) = ( A¢ + C ) + ( B¢ + C )
S ® AT | ZB, A ® 000 A1|Î, B ® 111B2 |Î, T ® 2T |Î,
Z ® 0Z |Î A ¢ + B¢ + C
For example, The string accepted by the above grammar is Þ LHS ¹ RHS
S ® AT S ® ZB Þ P2 is also not tautology.
® 000 A12 T ® 0Z111B2 47. (d) The strings accepted by above DFA are { Ù , 1, 10, 0,
® 000000 A1122T ® 00Z111111B22 01, 00, 011, 011, 000111 .. only those contains at most
® 0000001122 ® 0011111122 two 0’s]
36
48. (c) 0*0(0 + 1)*0(0 + 1)*1 also have at least two 0’s but it Let us suppose P1 executes and release S0 (Now value
will never start with 1. of S0 is 1).
49. (b) SJF results in minimum waiting time of 4 s as Gantt Now there are two possibilities either P0 or P2 can
chart execute.
Let us take P2 executes and releases S0, so at the end
P5 P3 P1 P4 P2 P0 execute and print 0 (mean two 0’s) but if P0 executes
0 1 3 6 10 17 before P2, then total of 3 0’s will print (one at the time
Waiting time for of P0 and then P2 which release S0 so P0 executes again).
Total moves = (20 – 18) + (25 – 18) + (35 – 25) + (39 – 35) + {AD}+ = {A, B, C, D, E}
(39 – 8) + (8 – 5) + (5 – 3) = 59 and closure of FD is
Seek takes 5 ms per cylinder moved {A ® B, AB ® C, A ® C, D ® AC, D ® A, D ® C, D ® E}
Þ Seek time = 5 × 59 = 295 ms The candidate key for R2 is AD and closure of FD is
51. (d) It is important to note that SSTF (Shortest Seek Time {A ® B, A ® C, A ® BC, D ® A, D ® C, D ® E, D ® AC}
First) is the optimal scheduling scheme for the access
As we can see clearly
of file only. Therefore, the IN/OUT performance of the
user program is determined by many input and output R1 @ R 2
devices and not only by the disk. So, when FCFS is Hence, functional dependency of R1 is equivalent to that of
replaced by SSTF, it improves only disk performance, R2.
not the IN/OUT performance. This implies, 58. (b) Attributes can be transitively dependent on a key in 3
improvement in performance of user program is 0%.
NF.
52. (a) Initially P0 will execute because only S0 = 1, it will print
59. (c)
single 0.
60. (a)
Now when S1 and S2 are released by P0 then any one
d
of them can be executed. 61. (c) L = R ´ bits = 2000 bits.
v
37
62. (b) Class C 193.158.12.0/28 network means there are 28 65. (a) Network ranges are
bits in the subnet. So, the subnet mask is
0 . 0 . 0 . 0 – default
11111111.11111111.11111111.11110000. 128 . 96 . 164 . 0
There are 4 bits belonging to the subnet and 4 bits to R3
belonging to host in the fourth octet. 128 . 96 . 165 . 0
128 . 96 . 166 . 0
So, 4 bits of subnet mask corresponds to to R2
128 . 96 . 167 . 255
(24 – 2) = 16 – 2 = 14 subnets
128 . 96 . 168 . 0
and 4 bits belonging to host address corresponds to to interface 1
128 . 96 . 169 . 255
(24 – 2) = 16 – 2 = 14 hosts. 128 . 96 . 170 . 0
63. (d) All the given statements above the relation R are true. to interface 0
Hence, the correct answer is option (d). 128 . 96 . 171 . 255
64. (c) Router is used to connect LAN to WAN. Ans = A
A– 1
B– 3
C– 5
D– 4