You are on page 1of 29
GATE GATE - 2019 CS : Computer Science and Information Technology Duration : Three Hours Maximum Marks : 100 CS Question Paper Analysis Sr.No. | Topic Percentage 1 | Engineering Mathematics 16 2 | Theory of computation 6 3 _| Digital Logic 6 4 | Computer Organization 5 5 _| Data Structure 7 6 _| Programming Methodology 10 7 _ | Operating Systems 1 8 _ | Compiler Design 6 9 _ | Databases 8 10 | Computer Networks 10 11__| General Aptitude 15 GATE 19 : CS Question Paper Analysis ‘Engineering Mathematics Theory of computation Digital Logic Computer Organization mate Structure 15 Programming Methodology Operating Systems ‘= Compiler Desian Databases ‘= Computer Networks ‘= General Aptitude GATEICSIGATE Paper_2019/P9.1 Vidyalankar : GATE/CS Q.1 to Q. 10 : General Aptitude Q. 1-Q.5 Carry one mark each. 1 The expenditure on the project as follows: equipment Rs.20 lakhs, salaries Rs.12 lakhs, and contingency Rs.3 lakhs. (A) break down (8) break (C) breaks down (D) breaks The search engine's business model around the fulcrum of trust. (A) revolves (8) plays. (C) sinks (D) bursts Two cars start at the same time from the same location and go in the same direction. The speed of the first car is 50 km/h and the speed of the second car is 60 km/h. The number of hours it takes for the distance between the two cars to be 20 km is . A 4 (B) 2 () 3 (2) 6 Ten friends planned to share equally the cost of buying a gift for their teacher. When two of them decided not to contribute, each of the other friends had to pay Rs 150 more. The cost of the gift was Rs. (A) 666 (8) 3000 (C) 6000 (D) 12000 Accourt is to a judge as is toa teacher. (A) astudent (B) a punishment (C) — asyllabus (D) —_ aschool Q. 6 — Q. 10 Carry two marks each. 6. The police arrested four criminals - P, Q, R and S. The criminals knew each other. They made the following statements: P says "Q committed the crime.” Q says “S committed the crime.” R says “I did not do it.” S says “What Q said about me is false.” Assume only one of the arrested four committed the crime and only one of the statements made above is true. Who committed the crime? (A) P (B) R (c) Ss (Dp) a GATEICSIGATE Paper_2019/P9.2 GATE PAPER_2019 7. In the given diagram, teachers are represented in the triangle, researchers in the circle and administrators in the rectangle. Out of the total number of the people, the percentage of administrators shall be in the range of . Teachers = a 7 20 Administrators Researchers 40 (A) Oto 15 (8) 16 to 30 (C) 31045 (0) 46 to6o 8. “A recent High Court judgement has sought to dispel the idea of begging as a disease — which leads to its stigmatization and criminalization — and to regard it as a symptom. The underlying disease is the failure of the state to protect citizens who fall through the social security net.” Which one of the following statements can be inferred from the given passage? (A) Beggars are lazy people who beg because they are unwilling to work (8) _ Beggars are created because of the lack of social welfare schemes (C) Begging is an offence that has to be dealt with firmly (D) _ Begging has to be banned because it adversely affects the welfare of the state 9. In a college, there are three student clubs. Sixty students are only in the Drama club, 80 students are only in the Dance club, 30 students are only in the Maths club, 40 students are in both Drama and Dance clubs, 12 students are in both Dance and Maths clubs, 7 students are in both Drama and Maths clubs, and 2 students are in all the clubs. If 75% of the students in the college are not in any of these clubs, then the total number of students in the college is (A) 4000 (B) 975 (C) 900 (D) 225 GATEICSIGATE Paper_2019/P9.3 Vidyalankar : GATE/CS 10. Three of the five students allocated to a hostel put in special requests to the warden. Given the floor plan of the vacant rooms, select the allocation plan that will accommodate all their requests. Request by X: Due to pollen allergy, | want to avoid a wing next to the garden. Request by Y: | want to live as far from the washrooms as possible, since | am very sensitive to smell. Request by Z: | believe in Vaastu and so want to stay in the South-west wing. The shaded rooms are already occupied. WR is washroom. (8) (A) (c) (D) GATEICSIGATE Paper_2019/P9.4 GATE PAPER_2019 Q.1 to Q. 55 : Computer Science and Information Technology Q. 1 -Q. 25 Carry one mark each. 1 A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address, How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor? (A) 24 bits and 0 bits (B) 28 bits and 4 bits (C) — 24bits and 4 bits (D) 28 bits and 0 bits The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has 16 address lines denoted by ‘As to Ao, What is the range of addresses (in hexadecimal) of the memory system that can get enabled by the chip select (CS) signal? As 4——— Bu cs An’ CT (A) C800 to CFFF (B) C00 to CAFF (C) C800 to CaFF (D) _ DA0O to DFFF Which one of the following kinds of derivation is used by LR parsers? (A) —_Leftmost (B) _Leftmost in reverse (C) _ Rightmost (D) _ Rightmost in reverse In 16-bit 2's complement representation, the decimal number -28 is: (A) 1111 1111 0001-1100 (B) 0000 0000 1110 0100 (C) 1111 1111 1110 0100 (D) 1000-0000 1110 0100 Let U = {1, 2 ..., n}. Let A = {(x, X) Ix © X, X ¢ U}. Consider the following two statements on |A| [Al sna" (n) ue TAL = S2k(") \K) Which of the above statements is/are TRUE? (A) Only! (8) Only ll (C) Both land Il (0) Neither I nor 1! Which one of the following is NOT a valid identity? (A) (x@y)@z=xOy@z) (8) (K+y)@z=x@(y+z) (©) x@y=x+y,ifxy=0 (0) x@y=(Ky+xyy If Lis a regular language over 5 = (a, b}, which one of the following languages is NOT regular? (A) LL =gylxeby*e (B) jww'lwel} (C) Prefix (L) = (x ¢ © *|3y e 2 * such that xy © L} (D) Suffix (L) = fy < £*|3x © E* such that xy € L} GATEICSIGATE Paper_2019/P9.5 Vidyalankar : GATE/CS 8, 10. cs) 12. 13. 14. Consider Z = X - Y, where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z would require a minimum of: (A) nbits (B) — n—1 bits (C) n+1 bits (0) n+2bits Let X be a square matrix. Consider the following two statements on X. |. Xis invertible Il. Determinant of X is non-zero. Which one of the following is TRUE? (A) Limplies II; II does not imply | (B) implies |; | does not imply I (C) I does not imply I; II does not imply | (D) Land Il are equivalent statements. Let G be an arbitrary group. Consider the following relations on G R, : Va, b € G, aR; b if and only itig G such that a = g"' bg R, : Va, b e G, a Re b if and only if a = Which of the above is/are equivalence relation/relations? (A) Ry and Ry (8) Ryonly (C) — Rronly (D) Neither R; nor Re Consider the following two statements about database transaction schedules: |. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable. Il, Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable. Which of the above statements is/are TRUE? (A) Lonly (8) only (C) Both | and Il (D) Neither I nor 1! Let G be an undirected complete graph on n vertices, where n > 2. Then, the number of different Hamiltonian cycles in G is equal to (A) nt (B) (n-1)! © 1 wo Compute lim —*—81_ <8 By? —Bx—3 (A) 1 (B) 53/12 (C) 1087 (D) Limit does not exist Which one of the following statements is NOT correct about the B+ tree data ‘structure used for creating an index of a relational database table? (A) B+ Tree is a height — balanced tree (B) —_ Non-leaf nodes have pointers to data records (C) _ Key values in each node are kept in sorted order (D) Each leaf node has a pointer to the next leaf node GATEICSIGATE Paper_2019/P9.6 GATE PAPER_2019 15. 16. 17. 18. 19. For © = {a, b), let us consider the regular language L = {x | x = a®* * or x = b’* "* k > 0}. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for L? (A) 3 (B) 5 (c) 9 (D) 24 Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)? (A) IMAP, POP3 (8) SMTP, POP3 (C) SMTP, MIME (D) IMAP, SMTP The following C program is executed on a Unix/Linux system: #include int main () { inti; for (i= 0;1<10;1+4) if ('% 2==0) fork (); return 0; } The total number of child processes created is Consider the following C program: #include < stdio.h> int jumble (int x, int y){ X=2X+Y; return x; } int main () { intx = 2, y=5; y = jumble (y, x); x= jumble (y, x); printf ("% d\n", x); return 0; } The value printed by the program is Consider the grammar given below: SAa A>BD Boble Dodle Let a, b, d and $ be indexed as follows: a|blid $ 312 1 0 Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order. (For example, if the FOLLOW set is {a, b, d, $}, then the answer should be 3210) Answer: GATEICSIGATE Paper_2019/P9.7 Vidyalankar : GATE/CS 20. 21 22. 23. 24. 25. An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is The value of 3°! mod 5 is Two numbers are chosen independently and uniformly at random from the set (1, 2, .... 13}. The probability (rounded off to 3 decimal places) that their 4—bit (unsigned) binary representations have the same most significant bit is Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100. PI P2 P3 D=D+20 | p=D-s0 | D=D+10 The process are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y- X is Consider the following C program: #include int main () { int arr[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,2, 5), *ip=arr+4; printf ("%d \n”, ip[t]); return 0; } The number that will be displayed on execution of the program is Consider a sequence of 14 elements: A = [-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The subsequence sum S(i, j) = 5°}, A[k]. Determine the maximum of S (i, )), where 0 intr (){ static int num = 7; return num } int main () { for(rQsr (ir ()) printf ("%d”, r () ); return 0; } Which one of the following values will be displayed on execution of the programs? (a) 41 (8) 82 () 63 (D) 630 Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true? (A) M,N, and P alll belong to the same subnet (B) Only Mand N belong to the same subnet (C) Only Nand P belong to the same subnet (D) M,N, and P belong to three different subnets Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this? (A) X-sends an ARP request packet to the local gateway's IP address which then finds the MAC address of Y and sends to X (8) X sends an ARP request packet to the local gateway's MAC address which then finds the MAC address of Y and sends to X (C) _X sends an ARP request packet with broadcast MAC address in its local subnet (D) _X sends an ARP request packet with broadcast IP address in its local subnet GATEICSIGATE Paper_2019/P9.9 Vidyalankar : GATE/CS 30. 31 32, 33, 34, Consider three 4-variable functions f,, f, and f,, which are expressed in sum-of-minterms as f,=2(0,2,5,8,14), =2(2,3,6,8, 14,15), f= (2, 7, 11, 14) For the following circuit with one AND gate and one XOR gate, the output function f can be expressed as: 4— f, —| —) =") ' f (A) 5(7,8,11) (8) -¥(2,7,8, 11, 14) (C) (2, 14) (D) 5 (0,2,3,5,6, 7,8, 11, 14, 15) Which one of the following languages over E = {a, b} is NOT context-free? (A) {ww" |w e {a, b)*} (B) {wa"b"w® |w « (a, b)*, n> 0} (C) {wa"w®b"|w e (a, b)*,n=0} (D) {a"b'| ie {n, 3n, Sn}, n=O} Let the set of functional dependencies F = {QR > S, R > P, S + Q} hold ona relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS). Consider the two statements given below. |. Both Y and Z are in BCNF Il Decomposition of X into Y and Z is dependency preserving and lossless Which of the above statements is/are correct? (A) Both | and Il (B) only (C) Il only (D) Neither I nor Il Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressible. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss? (A) 16 x 2"? (B) 256 x 2° (Cc) 4x2 (D) 8x 2° Consider the following sets: S1. Set of all recursively enumerable languages over the alphabet {0,1} S2. Set of all syntactically valid C programs $3. Set of all languages over the alphabet {0,1} $4. Set of all non-regular languages over the alphabet {0,1} Which of the above sets are uncountable? (A) Stands2 (8) $3 ands4 (C) $2 ands3 (D) St ands4 GATEICSIGATE Paper_2019/Pg.10 GATE PAPER_2019 35, 36, 37. 38. Consider the first order predicate formula 9: ¥x [(vz zIx > (2 =x) v (2 = 1) > 3w (W> x) a (VzzlW=> ((W= 2) v (z= 1)))] Here ‘ab’ denotes that ‘a divides b’, where a and b are integers. Consider the following sets: St. {1,2,3,..., 100} $2. Set of all positive integers $3. Set ofall integers Which of the above sets satisfy ? (A) Stand $2 (8) Stand s3 (Cc) S2ands3 (0) $1, S2ands3 Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let X;, X2, Xs, Xa, Xs, and Xs be the placeholders for the non-terminals D, T, Lor L; in the following table: Production rule | Semantic action DoTL Xi.type = Xp.type Tint T.type = int T= float T.type = float LoL, id Xs.type = X,.type addType(id.entry, Xs.type) Lid addType(id.entry, Xs.type) Which one of the following are the appropriate choices for X;, X2, Xs and X.? (A) XSL, Xe=T, Xsab Xeal (B) X= T, Xa L, Xsab Xe=T (C) XSL, Xe=L, Xs=Ly, Xy=T (0) X=T,X=LXs=T, X= Ly There are n unsorted arrays: A;, Ag, ..., An. Assume that n is odd. Each of Ay, Az, ...,An contains n distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of A;, Az, ..., An is (A) O(n) (8) O(n logn) (C) O(n’) (D) —Q{n? log n) Let G be any connected, weighted, undirected graph. I. G has a unique minimum spanning tree, if no two edges of G have the same weight. Il. G has a unique minimum spanning tree, if, for every cut of G, there is a unique minimum-weight edge crossing the cut, Which of the above two statements is/are TRUE? (A) Lonly (8) Honly (C) Both land II (D) Neither | nor I GATEICSIGATE Paper_2019/Pg.17 Vidyalankar : GATE/CS 39. Consider the following snapshot of a system running n concurrent processes. Process i is holding X; instances of a resource R, 1 Min (¥, | 1 *S]}). The number of items in the set GOTO (lo, () is: GATEICSIGATE Paper_2019/P9.12 GATE PAPER_2019 44. 45. 46. 47. 48. 49. 50. Consider the following matrix: 12 4 8) _|13 9 27] “|1 4 16 64/ 15 25 125) The absolute value of the product of Eigen values of R is A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock. To service a cache miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 3 cycles to fetch all the eight words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. The maximum bandwidth for the memory system when the program running on the processor issues a series of read operations is x 10° bytes/sec. Let T be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves a and b of T are chosen uniformly and independently at random. The expected value of the distance between a and b in T (Le., the number of edges in the unique path between a and b) is (rounded off to 2 decimal places) . Suppose Y is distributed uniformly in the open interval (1,6). The probability that the polynomial 3x’ + 6xY + 3Y +6 has only real roots is (rounded off to 1 decimal place) Let 2 be the set of all bijections from {1, ..., 5} to {1, ....5}, where id denotes the identity function, i.e. id@j) = j, vj. Let » denote composition on functions. For a string x =X; Xp ... Xy € EZ", n=O, let m(X) = xy © Xe ©... © Xp. Consider the language L = {x < =*| (x) = id}. The minimum number of states in any DFA accepting L is Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum number of switches needed is What is the minimum number of 2-input NOR gates required to implement a 4- variable function expressed in sum-of-minterms form as f = E (0, 2, 5, 7, 8, 10, 13, 15)? Assume that all the inputs and their complements are available. Answer: GATEICSIGATE Paper_2019/P9.13 Vidyalankar : GATE/CS 51 A relational database contains two tables student and performance as shown below: Student Performance Roll_no. | Student_name Roll_no. | Subject_code | Marks 1 ‘Amit 1 A 86 2 Priya 1 B 95 3 Vinit 1 Cc 90, 4 Rohan 2 A 89 5 ‘Smita 2 Cc 92 3 c 80 The primary key of the student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together form the primary key. Consider the SQL query given below: SELECT S.Student_name, sum (P. Marks) FROM Student S, Performance P WHERE P. Marks > 84 GROUP BY S.Student_name; The number of rows returned by the above SQL query is 52. Consider the following C program: #include int main () { float sum = 0.0, j = 1.0, i= 2.0; while (i/j > 0.0625) { isit sum = sum + i/j; printf ("%f \n", sum); } return 0; } The number of times the variable sum will be printed, when the above program is executed, is 53. Consider the following C program: #include int main () { int a[]=(2, 4, 6, 8, 10}; inti, sum =0, *b=a+4; for (i= 0;1<5;i++) sum = sum + (*b—i) -* (b-i); printf ("'% d/n”, sum); return 0; } The output of the above C program is GATEICSIGATE Paper_2019/P9.14 GATE PAPER_2019 54. 55, In an RSA cryptosystem, the value of the public modulus parameter n is 3007. If it is also known that p(n) = 2880, where @( ) denotes Euler's Totient Function, then the prime factor of n which is greater than 50 is Consider the following relations P (X, Y, Z), Q (X, Y, T) and R (Y, V). P Q R x _Y Zz x _Y T Y Vv xt [yt [ zt x2_[_Y1 2 YI vi x1 [yt [ z2 x1 | y2 [5 y3_| v2 x2_[ Y2 [ z2 x [Yt 6 y2_|_Vv3 x2 | y4 | z4 x3 [3 1 y2_| v2 How many tuples will be returned by the following relational algebra query? TI]. ev-n van v-ve) (PR) - [], (ay-nyna.t>2 (Q xR) Answer : gagaa GATEICSIGATE Paper_2019/P9.15 GATE GATE - 2019 CS : Computer Science and Information Technology Model Solutions Answer Key General Aptitude 1 c 2. A 3. B 4. c 5. D 6 B 7. c 8. B 9. c 10. D Computer Science and Information Technology 1. D 2. A 3. D 4. c 5. c 6. B 7. B 8. c 9. D 10. B 11. c 12, | CORD | 13. c 14, B 15. D 16. B 17. | 31to31 | 18. | 26t026 | 19. | 31to31| 20. ower 21. | 2to2 | 22. | 9522! | 55.) sotoso| 24. | sto | 25. | 291029 0.504 26. D 27. B 28. c 29. c 30. A 31. c 32. c 33. B 34, B 35. c 36. A 37. c 38. c 39. A 40. A 3.710 3.80R 160 to 41. | 2t02 | 42. | “poi, | 43] StoS | 44. | 121012] 45, 160 41 4.25 to 0.8 to 120 to 4%. | “55. | 47 os | 4%) 420 49. | 3to3 | 50. | 3to3 51. | 5toS | 52 | 5to5 | 53.| 10to10| 54. | 97t097| 55. | 1to1 GATEICS/GATE Paper_2019-SolniPg.1 Vidyalankar : GATE/CS Model Solutions Q.1 to Q. 10 : General Aptitude 1. (C) ‘Breaks down’ is a transitive phrasal verb which means to divide something such as a total amount into separate parts. Option (C) is most appropriate. 2. (A) The search engine business model revolves around the fulcrum of trust. Fulcrum is any thing that plays a central essential role in an activity, event, or situation. Thus, out of the given options, ‘revolves’ is the most appropriate. 3. (B) Speed of car A = 50 km/hr Speed of car B = 60 km/hr Since, both cars A and B are moving in same direction, the relative speed = 60 - 50 = 10 km/hr. Distance required between them = 20 km Distance 20 Time = ———— = —=2hrs Speed 10 4 (C) Let share of each student = x Total cost of gift= 10x x x = 8(x + 150) x= 600 Total cost = 10 x 600 = 6000 5. (D) A ‘court is for a ‘judge’ as a ‘schoo!’ is for a ‘teacher’. Court is place where a judge works Similarly, school is a place where a teacher works. 6. (8) Suffix C as criminal =, NC as not criminal. Case I: Criminals | P | Q | R Assumption) T | F | F Result | Qc | Sc [Ro |S ao is Q and R are criminal in the result is impossible because only one person committed the crime. Case Il: Criminals | P [Q[R|S Assumption | F | T Result | Qyo| So [Fo | Sc GATEICSIGATE Paper_2019-Soln/Pg.2 GATE PAPER_2019-Solutions S and R are criminal in the result is impossible because only one person committed the crime Case Ill: Criminals | P|] Q]R 1S Assumption| F | F | T | F Result [Oyo | Sno [Pro | So Se and Sc in the result which is contradiction. [S committed crime and same time not committed crime which is contradiction] Case IV: Criminals P Qi Rs Assumption| F | F |F | T Result | Qc | Sno | Re | Sue R is criminal in the result. Hence this case satisfies only one person committed the crime. So option (B) is correct. 7 © Percentage of Administrators = Administrators , 4 49 Total = 22 4400=31.25 160 8. (8) The passage states that the underlying disease behind begging is the failure of the state to protect citizens who fall through the social security net. Only option (B) can be inferred from this. 9% (C) fo ance Total number of students = 60 + 80 + 30 + 38+5+10+2=225 25% = 225 = 100% = 225 400-900 25 10. (D) GATEICSIGATE Paper_2019-SoiniPg.3 Vidyalankar : GATE/CS Q.1 to Q. 55 : Computer Science and Information Technology 1. (0) Cache memory size = 16 kB Block size = 16 B Main memory address = 32 bit Number of lines (N) = 18K _, 2° _p10 16 2 Fully associative cache memory (N-way) N 2 So, number of sets (S) = ==. P—way 2” S2bit . Address format: Tac | wo 2BbL _og;16=4 bit So, TAG = 28 bit Index = 0 bit (No address) 2. (A) Ais Aig A13 412 Ari Ato Ag 41400100 oe Chip select (CS) 11 [C800 to CFFF] 3. (D) LR parser is a bottom up parser. Hence it uses right most derivation in reverse order. So option (D) is the correct answer. 4 (©) +28 = 0000 0000 0001 1100 -28 => 1111 1111 1110 0100 (2's complement form) 5. (C) A={(x, X), xe X and X c U} (n) The number of k element subsets of a set U with n elements = lk |=", J The number of possible ordered pairs (x, X) where x « X is k. °C, for a given value of k from 1 ton GATEICSIGATE Paper_2019-Soln/Pg.4 GATE PAPER_2019-Solutions So total number of ordered pairs in A. 0 1 (n\ =|Al=dk."C, =k.) IAD" Dk (| So ll, is correct. (Note that k = 0 is excluded since empty set has no elements and cannot form an order pair such as (x, X)). But since by the combinational identity ms AK) So | is also correct. So both | and II are correct. (B) (D) xBy=(xy+xX y)! = Oy) =x @y, itis valid, (c) x@y=(x+y) (x+y) =(k+) = (x+y) 0 = (x +y), So itis valid. (A) (x @y) @z=x@(ySz) Associativity is true on Ex-OR operator so it valid. (B) (k+y) @z= (x+y). z+(x+y)z = KyZ+xz+yz 1 46 26 = Em (1,2, 4,6) x@ (y+z)= X(y+z)+x(y+z) = XY+XZ+xyZ 23 1,3 4 Im (1, 2,3, 4) (+y)z 4 x@(y+z) So option (B) is invalid. (B) * I Lis regular, L. L" is also regular by closure property. * Suffix (L) and Prefix (L) are also regular by closure property. However, option (d) {ww"|w eL|} need not be regular since if L is an infinite regular language, then {ww"|w a = g"' bg for some g__ =b=gag'=(g")" ag” g”’ always exists for every g < G So symmetric. Transitive: aRb and bRe => a = g;,"bg, andb =g," cg, forsomeg,g, aRc hence transitive Clearly R, is equivalence relation. Ry is not equivalence it need not even be reflexive, since aR, a => a = a which not be true in a group. R; is equivalence relation is the correct answer. ay 11. (C) |. Strict 2PL guaranteed conflict serializable because of 2PL condition and also strict recoverable. Il. Thomas Write time stamp ordering ensures serializable. Thomas write rule time stamp ordering allowed to execute schedule which is view equal serial schedule based on time stamp ordering. 12. (CORD) In a complete graph we can traverse the n vertices in any order and return to the starting vertex and form a Hamiltonian cycle. The number of such cycles will be n! However, since circular rotations will have to ignored. Since for example K, with vertices (1, 2, 3, 4), the cycle 1-2-3-4 is same as 2-3-4-1 is same as 3-4-1-2 etc. we now get only (n - 1)! distinct Hamiltonian cycles. Further, the cycle 1-2-3-4 and 1-4-3-2 are also same (clockwise and anticlockwise). (n-1)! 2 So ignoring this orientation also we finally get distinct Hamiltonian cycles which is option (D). GATEICSIGATE Paper_2019-SolnPa.6 GATE PAPER_2019-Solutions 13. (C) x‘-81 0 lim —>——— = — form. So apply LH rule x0 2x? —5x-3 0 ply s 4x°_ 108 lim = wos Ax—5 7 B* tree non leaf node have pointer to data records is false statement. +B" tree non leaf node consists of only keys and tree pointers (node pointers). * Belowis the structure of B' tree non leaf node By K, |B) Ky By K, and K, are keys 1 hi hi Tree Tree Tree pointer pointer pointer 15. (D) L= {aor b'"""4 fork > 0 =a" (a) orb" (b") = {a’, a", a°.....,b™, b%, b™ .....} The pumping length is p, than for any string w ¢ L with |w|>p must have a repetition ie. such a string must be breakable into w = xyz such that |y|>Oand y can be pumped indefinitely, which is same as saying xyz < L => xy*z ¢ L. The minimum pumping length in this language is clearly 11, since b"® is a string which has no repetition number, so upto 10 no number can serve as a pumping length. Minimum pumping length is 11. Any number at or above minimum pumping length can serve as a pumping length. The only number at or above 11, in the choice given is 24. So correct answer is option (D). 16. (B) SMTP is push protocol and to send email and POPS is pull protocol i.e. to retrieve email 17. (31 to 31) 18. (26 to 26) 19, (31 to 31) S>Aa A>BD Bo ble Do dle Follow (B) = (4, a} Hence their index in descending order is 31. GATEICSIGATE Paper_2019-SoiniPg.7 Vidyalankar : GATE/CS 20. (0.08 to 0.08) 21. (2 to 2) By Fermat's theorem 22. (0.502 to 0.504) 23. (80 to 80) 24. (6 to 6) 25. (29 to 29) 26. (D) 27. (B) 28. (C) 100.10.5.2 M— 285.255.255.252 194.56.10.0 100.10.5.5 N—» 255.255.255.252 194.56.10.4 100.10.5.6 P 5 255.255.255.252 194.56.10.4 N and P belongs to same subnet. 29. (C) 30. (A) fy. f= Z(2, 8, 14) f =f, 0 (fy. ) = (7,8, 11) ny an 8 | B> |a[Be |o| 8 (3°)? 3° mod 5. 3° mod 5 00000010 11111100 00000000 00000101 11111100 00000100 00000110 11111100 00000100 GATEICSIGATE Paper_2019-SolniPg.8 GATE PAPER_2019-Solutions 31. 32. 33. 34, (Cc) (A) (ww"|we{a,b}*}isa CFL (B) {wa" b’w" |w{a,b}*,n20} is a CFL, since we can first push w, then a's, b's pop with a’s and w" pops with the w. So PDA can accept the language. (C) {wa'w" bw e{a,b}*,n20} is a not CFL Because after pushing w, we need to push a’s into stack which will stop the w from being matched with w*. If we don't push a’s after w, than later we cannot match with b”. So this language is not acceptable by a PDA and hence not a CFL. (D) {a" b' jie{n, 3n, Sn), n> 0} = a" b" Ua" b™ Ua" bis CFL since each of the three parts is a CFL and closure under union guarantees that result also is a CFL. (Cc) X(PQRS) {QR > S, R > P, S > Q} decomposed intoi Y(PR) Z(QRS) {RP} {QR > S,S > Q) Candidate key: R Candidate key : QR, RS Relation Y in BCNF Relation Zin 3NF but not BCNF Common attribute between Y and Z relations is R which is key for relation Y. So that given decomposition is lossless join decomposition R>PinY QRS + areinZ Sal And dependency preserving decomposition. (B) 1 word = 4 bytes Page size = 8 kB = 2°B 19 Number of words in 1 page = = 2 TLB can hold 128 valid entries so, at most 128 x 2'' memory address can be addressed without TLB miss. 128 x 2!" = 256 x 2"° So option (B) is correct. (B) S1:The set Lae is known to be countably infinite since it corresponds with set of turing machines. S»: Since syntactically valid C programs surely run on Turing machines, this set is also a subset of set of Turing machines, which is countable. Sq: Set of all languages = 2° which is known to be uncountable. ;* countably infinite > 2 is countable. S. : Set of all non-regular languages includes set Lyor ae which is uncountable infinite and hence is uncountable. So, Ss and S, are uncountable. GATEICSIGATE Paper_2019-Soin/Pg.9 Vidyalankar : GATE/CS 35. (C) vx{ vel ((z =x)v(z=1)) => w(w>x)a(vzz|w = ((w =2)v(z=1))| The predicate » simply says that if z is a prime number in the set then there exists another prime number is the set which is larger. Clearly 9 is true in Sp and S, since in set of all integers as well as all positive integers, there is a prime number greater than any given prime number. However, in S; : {1, 2, 3 100} 9 is false since for prime number 97 «< S; there exists no prime number in the set which is greater. 36. (A) SDT for inserting type information in the symbol table D TL {Liidtype = T.stype} T > int {T.stype T = float {T.stype L— Ly, id {L).type = L.itype} addltype (identry, L.itype) L - id addtype (id.entry, Litype) Replace these attribute information in the given SDT. So option (A) is the correct answer. 37. (C) 38. (C) If no two edges of G have same weight surely G will have unique spanning tree is true. So | is true Also if, for every cut of G, there is a unique minimum weight edge crossing the cut then G will have unique spanning tree is also true. So Il is true [Note: The converse of I! is not true, but that is not relevant to this question] so both | and Il are true. Option (C) is correct. 39. (A) 40. (A) 41, (2 to 2) Assume, z=2 PPA) P| P| Pal Py o 1234 69 ‘Arrival time | CPU time | Completion time| Waiting time By 0 3 4 1 Py 1 1 2 ° Py 3 3 9 3 Ps 4 z=2 6 ° Average waiting time (WT) = 1+9*3+0 _tmg Hence, Z=2 GATEICSIGATE Paper_2019-SolniPg.10 GATE PAPER_2019-Solutions 42. (3.7 to 3.8 OR 4.0 to 4.1) 43. (6 to 5) sos So Los sid Los So.0 (6Y)? - 4(3) (3Y +6) =0 Y-Y+220 Y € (-~, -1] 9 [2, ») =Y«([2,6) Since y is uniformly distributed in (1, 6) Probability distributed function "=z 1 am Le oi So 3 NOR gates is required. GATE/CS/GATE Paper_2019-SolniPg.13 Vidyalankar : GATE/CS 51. (6 to 5) Student Performance Roll_no. | Student_name Roll_no. | Student_code | Marks 1 Amit 1 A 86 2 Priya 1 B 95 3 Vinit x 1 c 90 4 Rohan 2 A 89 5 ‘Smita 2 c 92 3 c 80 In where condition no condition over Roll_no so query produces all groups. Total 5 different student names all 5 group records in result. 52. (5 to 5) 53. (10 to 10) 54. (97 to 97) n=pxq= 3007 4(n) = (p - 1) (q- 1) = 2880 Using RSA algorithm, n= 31 x 97 in which 97 is prime factor which greater than 50. So 97 is correct answer. 55. (1 to 1) e[x ¥ z] rly ov xo at “ow mow 2 ww 2 ue 2 we X24 ZA) 2 ve x PxR)|=> i venvanw-ve)(PXR)}= Fy5 () Qa| x Y T RY v et ov x 25 ve ve x 1% ve va eye 4 ve ve x Th (Sjay-avsars2) (QXR))> Fg (ii) x I-il> ‘one record in result. x2 gog0a GATEICSIGATE Paper_2019-SolniPg.14

You might also like