The PYQ practice room

GATE CS 2022 Set 1

All 65 solved GATE CS 2022 Set 1 questions in exam order. Open a question, commit to an answer, and learn from the step-by-step solution. One question at a time.

Attempt before revealInstant answer feedbackExplore questions
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.

Questions

65

Paper marks

100

Question formats

3

MCQ · NAT · MSQ

Revision mode

Self-paced

No timer. Focus on understanding.

Difficulty mixEasy 13Medium 40Hard 12

Explore the questions

65 of 65 questions

General Aptitude (GA)

10
  1. Think it through. Then check your answer.

    Question

    The _______ is too high for it to be considered _______.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    A function y(x)y(x) is defined in the interval [0,1][0, 1] on the xx-axis asy(x)={2if 0x<133if 13x<341if 34x1y(x) = \begin{cases} 2 & \text{if } 0 \le x < \frac{1}{3} \\ 3 & \text{if } \frac{1}{3} \le x < \frac{3}{4} \\ 1 & \text{if } \frac{3}{4} \le x \le 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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    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
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

    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.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters.
    Two square plates with letters A and D
    From the additional plates given in the options, which one of the combinations of additional plates would allow the player to construct a five-letter palindrome. The player should use all the five plates exactly once. The plates can be rotated in their plane.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    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.
    Grid of dots representing the plot of land with existing ropes R1 and R2
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page

Computer Science and Information Technology (CS)

55
  1. Think it through. Then check your answer.

    Question

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

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    Which one of the following regular expressions correctly represents the language of the finite automaton given below?
    Finite automaton with a start state and two accepting states
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    Which one of the following statements is TRUE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

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

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    Consider the problem of reversing a singly linked list. To take an example, given the linked list below,
    Original Linked List
    the reversed linked list should look like
    Reversed Linked List
    Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1)O(1) space?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

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

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    Consider the following threads, T1,T2T_1, T_2, and T3T_3 executing on a single processor, synchronized using three binary semaphore variables, S1,S2S_1, S_2, and S3S_3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time.
    T1T_1T2T_2T3T_3
    while(true){while(true){while(true){
    wait(S3); wait(S1); wait(S2);
    print("C"); print("B"); print("A");
    signal(S2); } signal(S3); } signal(S1); }
    Which initialization of the semaphores would print the sequence BCABCABCA....?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    Consider the following two statements with respect to the matrices Am×n,Bn×m,Cn×nA_{m \times n}, B_{n \times m}, C_{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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  11. Think it through. Then check your answer.

    Question

    What is printed by the following ANSI C program?
    #include<stdio.h>
    int main(int argc, char *argv[])
    {
     int x = 1, z[2] = {10, 11};
     int *p = NULL;
     p = &x;
     *p = 10;
     p = &z[1];
     *(&z[0] + 1) += 3;
     printf("%d, %d, %d\n", x, z[0], z[1]);
     return 0;
    }
    
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  12. Think it through. Then check your answer.

    Question

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

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  13. Think it through. Then check your answer.

    Question

    Which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  14. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  15. Think it through. Then check your answer.

    Question

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

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  16. Think it through. Then check your answer.

    Question

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

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  17. Think it through. Then check your answer.

    Question

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

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  18. Think it through. Then check your answer.

    Question

    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^{\text{rd}} largest element of the tree is stored at index_____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  19. Think it through. Then check your answer.

    Question

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

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  20. Think it through. Then check your answer.

    Question

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

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  21. Think it through. Then check your answer.

    Question

    Consider a relation R(A, B, C, D, E) with the following three functional dependencies.
    AB → C; BC → D; C → E;
    The number of superkeys in the relation RR is _____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  22. Think it through. Then check your answer.

    Question

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

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  23. Think it through. Then check your answer.

    Question

    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 _____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  24. Think it through. Then check your answer.

    Question

    The value of the following limit is ___________

    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  25. Think it through. Then check your answer.

    Question

    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_____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  26. Think it through. Then check your answer.

    Question

    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}
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  27. Think it through. Then check your answer.

    Question

    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
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  28. Think it through. Then check your answer.

    Question

    Which one of the following statements is FALSE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  29. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  30. Think it through. Then check your answer.

    Question

    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?
    Block diagram showing Code Word split into M, S-address, R-address. S-address feeds P which feeds S. R-address feeds Q which feeds R. S and R feed T. M controls T. T feeds X which feeds DDS.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  31. Think it through. Then check your answer.

    Question

    Consider three floating point numbers AA, BB and CC stored in registers RA\text{R}_\text{A}, RB\text{R}_\text{B} and RC\text{R}_\text{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=0xC1400000RB=0x42100000RC=0x41400000\text{R}_\text{A} = \text{0xC1400000} \quad \text{R}_\text{B} = \text{0x42100000} \quad \text{R}_\text{C} = \text{0x41400000}Which one of the following is FALSE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  32. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  33. Think it through. Then check your answer.

    Question

    What is printed by the following ANSI C program?
    #include<stdio.h> 
    int main(int argc, char *argv[]) 
    { 
              int a[3][3][3] = 
              {{1, 2, 3, 4, 5, 6, 7, 8, 9}, 
               {10, 11, 12, 13, 14, 15, 16, 17, 18}, 
               {19, 20, 21, 22, 23, 24, 25, 26, 27}}; 
        int i = 0, j = 0, k = 0; 
        for( i = 0; i < 3; i++ ){ 
             for(k = 0; k < 3; k++ ) 
                  printf("%d ", a[i][j][k]); 
             printf("\n"); 
        } 
        return 0; 
    }
    
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  34. Think it through. Then check your answer.

    Question

    What is printed by the following ANSI C program?
    #include<stdio.h> 
    int main(int argc, char *argv[]){ 
     char a = 'P'; 
     char b = 'x'; 
     char c = (a & b) + '*'; 
     char d = (a | b) - '-'; 
     char e = (a ^ b) + '+'; 
     printf("%c %c %c\n", c, d, e); 
     return 0; 
    } 
    

    ASCII encoding for relevant characters is given below
    ABC...Z
    656667...90
    abc...z
    979899...122
    *+-
    424345
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  35. Think it through. Then check your answer.

    Question

    Consider solving the following system of simultaneous equations using LU decomposition.x1+x22x3=4x_1 + x_2 - 2x_3 = 4x1+3x2x3=7x_1 + 3x_2 - x_3 = 72x1+x25x3=72x_1 + x_2 - 5x_3 = 7where LL and UU are denoted asL=(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?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  36. Think it through. Then check your answer.

    Question

    Which of the following is/are undecidable?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  37. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  38. Think it through. Then check your answer.

    Question

    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 \ge 0\}L3={ambncnm,n0}L_3 = \{a^m b^n c^n \mid m, n \ge 0\}Which of the following statements is/are FALSE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  39. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  40. Think it through. Then check your answer.

    Question

    The following simple undirected graph is referred to as the Peterson graph.
    Peterson graph

    Which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  41. Think it through. Then check your answer.

    Question

    Consider the following recurrence:f(1)=1;f(2n)=2f(n)1,for n1;f(2n+1)=2f(n)+1,for n1.\begin{aligned} f(1) &= 1; \\ f(2n) &= 2f(n) - 1, & \text{for } n \ge 1; \\ f(2n + 1) &= 2f(n) + 1, & \text{for } n \ge 1. \end{aligned}Then, which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  42. Think it through. Then check your answer.

    Question

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

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  43. Think it through. Then check your answer.

    Question

    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}
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  44. Think it through. Then check your answer.

    Question

    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?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  45. Think it through. Then check your answer.

    Question

    Consider routing table of an organization’s router shown below:
    Subnet NumberSubnet MaskNext Hop
    12.20.164.0255.255.252.0R1
    12.20.170.0255.255.254.0R2
    12.20.168.0255.255.254.0Interface 0
    12.20.166.0255.255.254.0Interface 1
    defaultR3
    Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  46. Think it through. Then check your answer.

    Question

    Consider the relational database with the following four schemas and their respective instances.
    Student(sNo, sName, dNo) Dept(dNo, dName)
    Course(cNo, cName, dNo) Register(sNo, cNo)
    Student
    sNosNamedNo
    S01JamesD01
    S02RockyD01
    S03JacksonD02
    S04JaneD01
    S05MilliD02
    Dept
    dNodName
    D01CSE
    D02EEE
    Course
    cNocNamedNo
    C11DSD01
    C12OSD01
    C21DED02
    C22PTD02
    C23CVD03
    Register
    sNocNo
    S01C11
    S01C12
    S02C11
    S03C21
    S03C22
    S03C23
    S04C11
    S04C12
    S05C11
    S05C21
    SQL Query:
    SELECT * FROM Student AS S WHERE NOT EXIST
     (SELECT cNo FROM Course WHERE dNo = "D01"
      EXCEPT
      SELECT cNo FROM Register WHERE sNo = S.sNo)
    
    The number of rows returned by the above SQL query is___________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  47. Think it through. Then check your answer.

    Question

    Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.
    Network diagram showing routers P, Q, and R connected in a line: 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___________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  48. Think it through. Then check your answer.

    Question

    Let 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 \le j \le i \le 5 \\ 0, & 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 _____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  49. Think it through. Then check your answer.

    Question

    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 3x10⁸ 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 __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  50. Think it through. Then check your answer.

    Question

    Consider the data transfer using TCP over a 1 Gbps1\text{ Gbps} link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds60\text{ 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____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  51. Think it through. Then check your answer.

    Question

    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 PP 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 PP is____________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  52. Think it through. Then check your answer.

    Question

    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) and Dequeue(Q) . The minimum number of 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 ___________.
    Diagram showing Initial State with Q1 having 1,2,3,4 and Q2 empty, and Final State with Q1 empty and Q2 having 4,3,2,1
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  53. Think it through. Then check your answer.

    Question

    Consider two files systems AA and BB, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider inserting a new block in the middle of the file (between 50th50^{\text{th}} and 51st51^{\text{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 _________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  54. Think it through. Then check your answer.

    Question

    Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string7,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, 1the 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 _________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  55. Think it through. Then check your answer.

    Question

    Consider the following grammar along with translation rules.
    Here # and % are operators and id is a token that represents an integer and id.val represents the corresponding integer value. The set of non-terminals is {S,T,R,P}\{S, T, R, P\} and a subscripted non-terminal indicates an instance of the non-terminal.
    Using this translation scheme, the computed value of S.val for root of the parse tree for the expression 20#10%5#8%2%2 is __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page