GATE 2017 SET-2 CS Computer Science and information technology
[Q1 – Q18 Multiple choice Question(MCQ),carry ONE mark each (for each wrong answer: – 1/3) ]
Q1➡| Compiler Design Which of the following statements about parser is/are CORRECT? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III. SLR is more powerful than Canonical LR.
Q3➡| Theory of Computation Let L1, L2 be any two context-free languages and R be any regular language. Then which of the following is/are CORRECT? I. L1 U L2 is context Free. II. III. L1 – R is context Free. IV.
Q6➡| Digital Logic Design The representation of the value of a 16-bit unsigned integer X in hexadecimal number system is BCA9. The representation of the value of X in octal number system is:
Q7➡| Digital Logic Design Given the following binary number in 32-bit (single precision) IEEE-754 format: 00111110011011010000000000000000 The decimal value closest to this floating-point number is
Q8➡|Engineering Mathematics Let p, q, r denote the statements “It is raining”, “It is cold”, and “It is pleasant”, respectively. Then the statement “It is not raining and it is pleasant, and it is not pleasant only if it is raining and it is cold” is represented by
Q10➡|Computer Network Consider the following statements about the routing protocols, Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) in an IPv4 network. • I: RIP uses distance vector routing • II: RIP packets are sent using UDP • III: OSPF packets are sent using TCP • IV: OSPF operation is based on link-state routing Which of the statements above are CORRECT?
Q11➡| Operating Systems In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed? I. Contiguous II. Linked III. Indexed
Q12➡| Operating Systems Which of the following is/are shared by all the threads in a process? I. Program counter II. Stack III. Address space IV. Registers
Q13➡| Computer Network Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statement is/are CORRECT? I. A connected UDP socket can be used to communicate with multiple peers simultaneously. II. A process can successfully call connect function again for an already connected UDP socket.
Q14➡| Database Management System An ER model of a database consists of entity types A and B. These are connected by a relationship R which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?
i ➥ Relationship R is one-to-many and the participation of A in R is partial.
ii ➥ Relationship R is many-to-one and the participation of A in R is total.
iii ➥ Relationship R is one-to-many and the participation of A in R is partial.
iv ➥ Relationship R is one-to-many and the participation of A in R is total.
Q16➡| Data Structure The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph below?
Q18➡| Data Structure A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of the following statements is/are CORRECT for such a circular queue, so that insertion and deletion operations can be performed in O(1) time? I: Next pointer of front node points to the rear node. II: Next pointer of rear node points to the front node.
[Q19 – Q25 Multiple choice Question(MCQ),carry ONE mark each (no negative marks) ]
Q19➡| Digital Logic Design Consider a quadratic equation x2 – 13x + 36 = 0 with coefficients in a base b. The solutions of this equation in the same base b are x = 5 and x = 6. Then b=_________.
Q20➡| Engineering Mathematics G is an undirected graph with n vertices and 25 edges such that each vertex of G has degree at least 3. Then the maximum possible value of n is __________.
Q22➡| Engineering Mathematics Consider the set X = {a,b,c,d e} under the partial ordering R = {(a,a),(a,b),(a,c),(a,d),(a,e),(b,b),(b,c),(b,e),(c,c),(c,e),(d,d),(d,e),(e,e)}. The Hasse diagram of the partial order (X,R) is shown below:
The minimum number of ordered pairs that need to be added to R to make (X,R) a lattice is ___________.
Q23➡| Computer Network The maximum number of IPv4 router addresses that can be listed in the record route (RR) option field of an IPv4 header is ________.
Q24➡| Database Management System Consider the following tables T1 and T2.
In table T1, P is the primary key and Q is the foreign key referencing R in table T2 with on-delete cascade and on-update cascade. In table T2, R is the primary key and S is the foreign key referencing P in table T1 with on-delete set NULL and on-update cascade. In order to delete record 〈3,8〉 from table T1, the number of additional records that need to be deleted from table T1 is ______.
Q25➡| Theory of Computation The minimum possible number of a deterministic finite automation that accepts the regular language L = {w1aw2 | w1, w2 ∈ {a,b}*, |w1| = 2,|w2| ≥ 3} is ___________.
[Q26 – Q42 Multiple choice Question(MCQ),carry TWO mark each (for each wrong answer: – 2/3) ]
Q26➡|Engineering Mathematics For any discrete random variable X, with probability mass function P(X=j)=pj, pj≥0, j∈{0, …, N} and , define the polynomial function
. For a certain discrete random variable Y, there exists a scalar β∈[0,1] such that gy(Z)=(1-β+βz)N. The expectation of Y is
Q28➡| Computer Organization In a two-level cache system, the access times of L1 and L2 caches are 1 and 8 clock cycles, respectively. The miss penalty from the L2 cache to main memory is 18 clock cycles. The miss rate of L1 cache is twice that of L2. The average memory access time (AMAT) of this cache system is 2 cycles. The miss rates of L1 and L2 respectively are:
Q29➡| Digital Logic Design Given f(w,x,y,z) = Σm(0,1,2,3,7,8,10) + Σd(5,6,11,15), where d represents the don’t-care condition in Karnaugh maps. Which of the following is a minimum product-of-sums (POS) form of f(w,x,y,z)?
Q31➡| Engineering Mathematics P and Q are considering to apply for job. The probability that p applies for job is 1/4. The probability that P applies for job given that Q applies for the job 1/2 and The probability that Q applies for job given that P applies for the job 1/3.The probability that P does not apply for job given that Q does not apply for the job
Q32➡| Programming Consider the C program fragment below which is meant to divide x and y using repeated subtractions. The variables x, y, q and r are all unsigned int.
Which of the following conditions on the variables x, y, q and r before the execution of the fragment will ensure that the loop terminates in a state satisfying the condition x == (y*q + r)?
Q33➡| Data Structure The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is:
Q34➡| Computer Network Consider two hosts X and Y, connected by a single direct link of rate 106bits/sec. The distance between the two hosts is 10,000 km and the propagation speed along the link is 2×108m/sec. Host X sends a file of 50,000 bytes as one large message to host Y continuously. Let the transmission and propagation delays be p milliseconds and q milliseconds, respectively. Then the values of p and q are
i ➥ p=400 and q=50
ii ➥ p=100 and q=50
iii ➥ p=50 and q=400
iv ➥ p=50 and q=100
Show Answer With Best Explanation
Answer: I Explanation: Given, Data rate (or Bandwidth) = 106 bits/sec Distance = 10,000 km Speed = 2×108 m/sec Data Length = 50,000 Bytes
Q35➡| Digital Logic Design Consider a binary code that consists of only four valid code words as given below: 00000, 01011, 10101, 11110 Let the minimum Hamming distance of the code be p and the maximum number of erroneous bits that can be corrected by the code be q. Then the values of p and q are
Q36➡| Operating System A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:
Which of the following best describe current state of the system?
Q37➡| Compiler Design Consider the following expression grammar G: E → E – T | T T → T + F | F F → (E) | id Which of the following grammars is not left recursive, but is equivalent to G?
Q38➡| Digital Logic Design The next state table of a 2-bit saturating up-counter is given below. The counter is built as a synchronous sequential circuit using T flip-flops. The expressions for T1 and T0 are
Q39➡| Theory of Computation Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L(M) be the language accepted by a Turing machine M.
Which of the following decision problems are undecidable? • I. Given a regular expression R and a string w, is w ∈ L(R)? • II. Given a context-free grammar G, is L(G) = ∅? • III. Given a context-free grammar G, is L(G) = Σ* for some alphabet Σ? • IV. Given a Turing machine M and a string w, is w ∈ L(M)?
Q40➡| Theory of Computation Consider the following languages: L1 = {ap│p is a prime number} L2 = {an bmc2m | n ≥ 0, m ≥ 0} L3 = {an bn c2n │ n ≥ 0} L4 = {an bn │ n ≥ 1} Which of the following are CORRECT? I. L1 is context-free but not regular. II. L2 is not context-free. III. L3 is not context-free but recursive. IV. L4 is deterministic context-free.
Q41➡| Theory of Computation Let δ denote the transition function and denote the extended transition function of the ε-NFA whose transition table is given below:
Q46➡|Computer Organization The read access times and the hit ratios for different caches in a memory hierarchy are as given below:
The read access time of main memory is 90 nanoseconds. Assume that the caches use the referred-word-first read policy and the write back policy. Assume that all the caches are direct mapped caches. Assume that the dirty bit is always 0 for all the blocks in the caches. In execution of a program, 60% of memory reads are for instruction fetch and 40% are for memory operand fetch. The average read access time in nanoseconds (up to 2 decimal places) is _________.
Q47➡|Database Management System Two transactions T1 and T2 are given as • T1: r1(X) w1(X) r1(Y) w1(Y) • T2: r2(Y) w2(Y) r2(Z) w2(Z) where ri(V) denotes a read operation by transaction Ti on a variable V and wi(V) denotes a write operation by transaction Ti on a variable V. The total number of conflict serializable schedules that can be formed by T1 and T2 is _______.
Q50➡|Computer Organization Consider a machine with a byte addressable main memory of 232 bytes divided into blocks of size 32 bytes. Assume that a direct mapped cache having 512 cache lines is used with this machine. The size of the tag field in bits is _______.
Q51➡|Engineering Mathematics If the characteristic polynomial of a 3 × 3 matrix M over ℝ (the set of real numbers) is λ3 – 4λ2 + aλ + 30, a ∈ ℝ, and one eigenvalue of M is 2, then the largest among the absolute values of the eigenvalues of M is __.
Q52➡|Operating Systems Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time.
The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm is ________.
Q53➡|Algorithms A message is made up entirely of characters from the set X = {P, Q, R, S, T}. The table of probabilities for each of the characters is shown below:
If a message of 100 characters over X is encoded using Huffman coding, then the expected length of the encoded message in bits is _______.
Q54➡|Database Management System In a B+ tree, if the search-key value is 8 bytes long, the block size is 512 bytes and the block pointer size is 2 bytes, then the maximum order of the B+ tree is ________.