GATE · Computer Science and Information Technology · 2022 Set 1Practice Mode
Score:0/100(0 attempted)

General Aptitude

Q1General Aptitude · 1 mark · MCQ

The _________ is too high for it to be considered _________.

Q2General Aptitude · 1 mark · MCQ

A function y(x)y(x) is defined in the interval [0,1][0, 1] on the xx-axis as
y(x)={2if 0x<133if 13x<341if 34x1y(x) = \begin{cases} 2 & \text{if } 0 \leq x < \frac{1}{3} \\ 3 & \text{if } \frac{1}{3} \leq x < \frac{3}{4} \\ 1 & \text{if } \frac{3}{4} \leq x \leq 1 \end{cases}
Which one of the following is the area under the curve for the interval [0,1][0, 1] on the xx-axis?

Q3General Aptitude · 1 mark · MCQ

Let rr be a root of the equation x2+2x+6=0x^2 + 2x + 6 = 0. Then the value of the expression (r+2)(r+3)(r+4)(r+5)(r + 2)(r + 3)(r + 4)(r + 5) is

Q4General Aptitude · 1 mark · MCQ

Given below are four statements.
Statement 1: All students are inquisitive.
Statement 2: Some students are inquisitive.
Statement 3: No student is inquisitive.
Statement 4: Some students are not inquisitive.
From the given four statements, find the two statements that CANNOT BE TRUE simultaneously, assuming that there is at least one student in the class.

Q5General Aptitude · 1 mark · MCQ
Question 5
Q6General Aptitude · 2 marks · MCQ

Some people believe that "what gets measured, improves". Some others believe that "what gets measured, gets gamed". One possible reason for the difference in the beliefs is the work culture in organizations. In organizations with good work culture, metrics help improve outcomes. However, the same metrics are counterproductive in organizations with poor work culture.
Which one of the following is the CORRECT logical inference based on the information in the above passage?

Q7General Aptitude · 2 marks · MCQ

In a recently conducted national entrance test, boys constituted 65% of those who appeared for the test. Girls constituted the remaining candidates and they accounted for 60% of the qualified candidates.
Which one of the following is the correct logical inference based on the information provided in the above passage?

Q8General Aptitude · 2 marks · MCQ

A box contains five balls of same size and shape. Three of them are green coloured balls and two of them are orange coloured balls. Balls are drawn from the box one at a time. If a green ball is drawn, it is not replaced. If an orange ball is drawn, it is replaced with another orange ball.
First ball is drawn. What is the probability of getting an orange ball in the next draw?

Q9General Aptitude · 2 marks · MCQ

The corners and mid-points of the sides of a triangle are named using the distinct letters P, Q, R, S, T and U, but not necessarily in the same order. Consider the following statements:\

  • The line joining P and R is parallel to the line joining Q and S.\
  • P is placed on the side opposite to the corner T.\
  • S and U cannot be placed on the same side.
    Which one of the following statements is correct based on the above information?
Q10General Aptitude · 2 marks · MCQ

A plot of land must be divided between four families. They want their individual plots to be similar in shape, not necessarily equal in area. The land has equally spaced poles, marked as dots in the below figure. Two ropes, R1 and R2, are already present and cannot be moved.
What is the least number of additional straight ropes needed to create the desired plots? A single rope can pass through three poles that are aligned in a straight line.

Question 10

Computer Science and Information Technology

Q11Computer Science and Information Technology · 1 mark · MCQ

Which one of the following statements is TRUE for all positive functions f(n)f(n)?

Q12Computer Science and Information Technology · 1 mark · MCQ

Which one of the following regular expressions correctly represents the language of the finite automaton given below?

Question 12
Q13Computer Science and Information Technology · 1 mark · MCQ

Which one of the following statements is TRUE?

Q14Computer Science and Information Technology · 1 mark · MCQ

In a relational data model, which one of the following statements is TRUE?

Q15Computer Science and Information Technology · 1 mark · MCQ
Question 15
Q16Computer Science and Information Technology · 1 mark · MCQ

Suppose we are given nn keys, mm hash table slots, and two simple uniform hash functions h1h_1 and h2h_2. Further suppose our hashing scheme uses h1h_1 for the odd keys and h2h_2 for the even keys. What is the expected number of keys in a slot?

Q17Computer Science and Information Technology · 1 mark · MCQ

Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?

Q18Computer Science and Information Technology · 1 mark · MCQ

Let R1 and R2 be two 4-bit registers that store numbers in 2's complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?

Q19Computer Science and Information Technology · 1 mark · MCQ

Consider the following threads, T1T_1, T2T_2, and T3T_3 executing on a single processor, synchronized using three binary semaphore variables, S1S_1, S2S_2, and S3S_3, operated upon using standard wait()\text{wait()} and signal()\text{signal()}. The threads can be context switched in any order and at any time.

Question 19
Q20Computer Science and Information Technology · 1 mark · MCQ

Consider the following two statements with respect to the matrices Am×nA_{m \times n}, Bn×mB_{n \times m}, Cn×nC_{n \times n} and Dn×nD_{n \times n}.
Statement 1: tr(AB)=tr(BA)tr(AB) = tr(BA)
Statement 2: tr(CD)=tr(DC)tr(CD) = tr(DC)
where tr()tr() represents the trace of a matrix. Which one of the following holds?

Q21Computer Science and Information Technology · 1 mark · MCQ

What is printed by the following ANSI C program?

Question 21
Q22Computer Science and Information Technology · 1 mark · MCQ

Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below. What is the number of subnets inside the enterprise network?

Question 22
Q23Computer Science and Information Technology · 1 mark · MSQ

Which of the following statements is/are TRUE?

Q24Computer Science and Information Technology · 1 mark · MSQ

Let WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement. WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?

Q25Computer Science and Information Technology · 1 mark · MSQ

Consider the following three relations in a relational database.
Employee(eId,Name)Employee(\underline{eId}, Name), Brand(bId,bName)Brand(\underline{bId}, bName), Own(eId,bId)Own(\underline{eId}, \underline{bId})
Which of the following relational algebra expressions return the set of eIdeIds who own all the brands?

Q26Computer Science and Information Technology · 1 mark · MSQ

Which of the following statements is/are TRUE with respect to deadlocks?

Q27Computer Science and Information Technology · 1 mark · MSQ

Which of the following statements is/are TRUE for a group GG?

Q28Computer Science and Information Technology · 1 mark · NAT

Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0, the 3rd3^{rd} largest element of the tree is stored at index_____________.

Q29Computer Science and Information Technology · 1 mark · NAT

Consider the augmented grammar with {+,,(,),id}\{+, *, (, ), id\} as the set of terminals.
SSS' \to S
SS+RRS \to S + R \mid R
RRPPR \to R * P \mid P
P(S)idP \to (S) \mid id
If I0I_0 is the set of two LR(0)LR(0) items {[SS.],[SS.+R]}\{[S' \to S.], [S \to S. + R]\}, then goto(closure(I0),+)goto(closure(I_0), +) contains exactly __________ items.

Q30Computer Science and Information Technology · 1 mark · NAT

Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________.

Q31Computer Science and Information Technology · 1 mark · NAT

Consider a relation R(A,B,C,D,E)R(A, B, C, D, E) with the following three functional dependencies.
ABC;  BCD;  CE;AB \to C;\; BC \to D;\; C \to E;
The number of superkeys in the relation R is _____________.

Q32Computer Science and Information Technology · 1 mark · NAT

The number of arrangements of six identical balls in three identical bins is______.

Q33Computer Science and Information Technology · 1 mark · NAT

A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is _____________.

Q34Computer Science and Information Technology · 1 mark · NAT

The value of the following limit is _____________.
limx0+x1e2x\lim_{x \to 0^+} \frac{\sqrt{x}}{1 - e^{2\sqrt{x}}}

Q35Computer Science and Information Technology · 1 mark · NAT

Consider the resolution of the domain name www.gate.org.in by a DNS resolver. Assume that no resource records are cached anywhere across the DNS servers and that iterative query mechanism is used in the resolution. The number of DNS query-response pairs involved in completely resolving the domain name is_____________.

Q36Computer Science and Information Technology · 2 marks · MCQ

Which one of the following is the closed form for the generating function of the sequence {an}n0\{a_n\}_{n \geq 0} defined below?
an={n+1,n is odd1,otherwisea_n = \begin{cases} n+1, & n \text{ is odd} \\ 1, & \text{otherwise} \end{cases}

Q37Computer Science and Information Technology · 2 marks · MCQ

Consider a simple undirected unweighted graph with at least three vertices. If AA is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of

Q38Computer Science and Information Technology · 2 marks · MCQ

Which one of the following statements is FALSE?

Q39Computer Science and Information Technology · 2 marks · MCQ

Let Ri(z)R_i(z) and Wi(z)W_i(z) denote read and write operations on a data element zz by a transaction TiT_i, respectively. Consider the schedule SS with four transactions.
S:R4(x)R2(x)R3(x)R1(y)W1(y)W2(x)W3(y)R4(y)S: R_4(x) R_2(x) R_3(x) R_1(y) W_1(y) W_2(x) W_3(y) R_4(y)
Which one of the following serial schedules is conflict equivalent to SS?

Q40Computer Science and Information Technology · 2 marks · MCQ

Consider a digital display system (DDS) shown in the figure that displays the contents of register X. A 16-bit code word is used to load a word in X, either from S or from R. S is a 1024-word memory segment and R is a 32-word register file. Based on the value of mode bit M, T selects an input word to load in X. P and Q interface with the corresponding bits in the code word to choose the addressed word.
Which one of the following represents the functionality of P, Q, and T?

Question 40
Q41Computer Science and Information Technology · 2 marks · MCQ

Consider three floating point numbers AA, BB and CC stored in registers RAR_A, RBR_B and RCR_C, respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows.
RA=0xC1400000R_A = \text{0xC1400000}, RB=0x42100000R_B = \text{0x42100000}, RC=0x41400000R_C = \text{0x41400000}
Which one of the following is FALSE?

Q42Computer Science and Information Technology · 2 marks · MCQ

Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t=0t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?

Q43Computer Science and Information Technology · 2 marks · MCQ

What is printed by the following ANSI C program?

Question 43
Q44Computer Science and Information Technology · 2 marks · MCQ

What is printed by the following ANSI C program?

Question 44
Q45Computer Science and Information Technology · 2 marks · MCQ

Consider solving the following system of simultaneous equations using LU decomposition.
x1+x22x3=4x_1 + x_2 - 2x_3 = 4
x1+3x2x3=7x_1 + 3x_2 - x_3 = 7
2x1+x25x3=72x_1 + x_2 - 5x_3 = 7
where LL and UU are denoted as
L=(L1100L21L220L31L32L33),U=(U11U12U130U22U2300U33)L = \begin{pmatrix} L_{11} & 0 & 0 \\ L_{21} & L_{22} & 0 \\ L_{31} & L_{32} & L_{33} \end{pmatrix},\quad U = \begin{pmatrix} U_{11} & U_{12} & U_{13} \\ 0 & U_{22} & U_{23} \\ 0 & 0 & U_{33} \end{pmatrix}
Which one of the following is the correct combination of values for L32L_{32}, U33U_{33}, and x1x_1?

Q46Computer Science and Information Technology · 2 marks · MSQ

Which of the following is/are undecidable?

Q47Computer Science and Information Technology · 2 marks · MSQ

Consider the following languages:
L1={anwanw{a,b}}L_1 = \{a^n w a^n \mid w \in \{a,b\}^*\}
L2={wxwRw,x{a,b},w,x>0}L_2 = \{w x w^R \mid w, x \in \{a,b\}^*,\, |w|, |x| > 0\}
Note that wRw^R is the reversal of the string ww. Which of the following is/are TRUE?

Q48Computer Science and Information Technology · 2 marks · MSQ

Consider the following languages:
L1={www{a,b}}L_1 = \{ww \mid w \in \{a,b\}^*\}
L2={anbncmm,n0}L_2 = \{a^n b^n c^m \mid m, n \geq 0\}
L3={ambncnm,n0}L_3 = \{a^m b^n c^n \mid m, n \geq 0\}
Which of the following statements is/are FALSE?

Q49Computer Science and Information Technology · 2 marks · MSQ

Consider a simple undirected weighted graph GG, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of GG is/are TRUE?

Q50Computer Science and Information Technology · 2 marks · MSQ

The following simple undirected graph is referred to as the Peterson graph. Which of the following statements is/are TRUE?

Question 50
Q51Computer Science and Information Technology · 2 marks · MSQ

Consider the following recurrence:
f(1)=1f(1) = 1;
f(2n)=2f(n)1f(2n) = 2f(n) - 1, for n1n \geq 1;
f(2n+1)=2f(n)+1f(2n+1) = 2f(n) + 1, for n1n \geq 1.
Then, which of the following statements is/are TRUE?

Q52Computer Science and Information Technology · 2 marks · MSQ

Which of the properties hold for the adjacency matrix AA of a simple undirected unweighted graph having nn vertices?

Q53Computer Science and Information Technology · 2 marks · MSQ

Which of the following is/are the eigenvector(s) for the matrix given below?
(962486312015853221712)\begin{pmatrix} -9 & -6 & -2 & -4 \\ -8 & -6 & -3 & -1 \\ 20 & 15 & 8 & 5 \\ 32 & 21 & 7 & 12 \end{pmatrix}

Q54Computer Science and Information Technology · 2 marks · MSQ

Consider a system with 2 KB direct mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length of 16 bits. During the execution of a program, four data words P, Q, R, and S are accessed in that order 10 times (i.e., PQRSPQRS...). Hence, there are 40 accesses to data cache altogether. Assume that the data cache is initially empty and no other data words are accessed by the program. The addresses of the first bytes of P, Q, R, and S are 0xA248, 0xC28A, 0xCA8A, and 0xA262, respectively. For the execution of the above program, which of the following statements is/are TRUE with respect to the data cache?

Q55Computer Science and Information Technology · 2 marks · MSQ

Consider routing table of an organization's router shown below:

Question 55
Q56Computer Science and Information Technology · 2 marks · NAT
Question 56
Q57Computer Science and Information Technology · 2 marks · NAT

Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.
P — Q — R
The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q−R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is___________.

Q58Computer Science and Information Technology · 2 marks · NAT

Let G(V,E)G(V, E) be a directed graph, where V={1,2,3,4,5}V = \{1, 2, 3, 4, 5\} is the set of vertices and EE is the set of directed edges, as defined by the following adjacency matrix AA.
A[i][j]={1,1ji50,otherwiseA[i][j] = \begin{cases} 1, & 1 \leq j \leq i \leq 5 \\ 0, & \text{otherwise} \end{cases}
A[i][j]=1A[i][j] = 1 indicates a directed edge from node ii to node jj. A directed spanning tree of GG, rooted at rVr \in V, is defined as a subgraph TT of GG such that the undirected version of TT is a tree, and TT contains a directed path from rr to every other vertex in VV. The number of such directed spanning trees rooted at vertex 5 is_____________.

Q59Computer Science and Information Technology · 2 marks · NAT

Consider a 100 Mbps link between an earth station (sender) and a satellite (receiver) at an altitude of 2100 km. The signal propagates at a speed of 3×1083 \times 10^8 m/s. The time taken (in milliseconds, rounded off to two decimal places) for the receiver to completely receive a packet of 1000 bytes transmitted by the sender is_________.

Q60Computer Science and Information Technology · 2 marks · NAT

Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is____________.

Q61Computer Science and Information Technology · 2 marks · NAT

A processor X1X_1 operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version of the processor X2X_2 operating at same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural hazards and data hazards for X1X_1 and X2X_2. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X2X_2 over X1X_1 in executing P is____________.

Q62Computer Science and Information Technology · 2 marks · NAT

Consider the queues Q1Q_1 containing four elements and Q2Q_2 containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(Q,element)\text{Enqueue}(Q, element) and Dequeue(Q)\text{Dequeue}(Q). The minimum number of Enqueue\text{Enqueue} operations on Q1Q_1 required to place the elements of Q1Q_1 in Q2Q_2 in reverse order (shown as the Final State in the figure) without using any additional storage is___________.

Question 62
Q63Computer Science and Information Technology · 2 marks · NAT

Consider two file systems AA and BB, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in AA and also in BB. Now, consider inserting a new block in the middle of the file (between 50th50^{th} and 51st51^{st} block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in AA and BB are nAn_A and nBn_B, respectively, then the value of nA+nBn_A + n_B is_________.

Q64Computer Science and Information Technology · 2 marks · NAT

Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string
7,2,7,3,2,5,3,4,6,7,7,1,5,6,17, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1
the page fault rate, defined as the ratio of number of page faults to the number of memory accesses (rounded off to one decimal place) is_________.

Q65Computer Science and Information Technology · 2 marks · NAT

Consider the following grammar along with translation rules.
SS1#T{Sval=S1valTval}S \to S_1 \# T \quad \{S_{\cdot val} = S_{1 \cdot val} * T_{\cdot val}\}
ST{Sval=Tval}S \to T \quad \{S_{\cdot val} = T_{\cdot val}\}
TT1%R{Tval=T1val÷Rval}T \to T_1 \% R \quad \{T_{\cdot val} = T_{1 \cdot val} \div R_{\cdot val}\}
TR{Tval=Rval}T \to R \quad \{T_{\cdot val} = R_{\cdot val}\}
Rid{Rval=idval}R \to id \quad \{R_{\cdot val} = id_{\cdot val}\}
Here #\# and %\% are operators and idid is a token that represents an integer and idvalid_{\cdot val} represents the corresponding integer value. Using this translation scheme, the computed value of SvalS_{\cdot val} for root of the parse tree for the expression 20#10%5#8%2%220 \# 10 \% 5 \# 8 \% 2 \% 2 is _____________.