GATE CS
    Previous Year Papers
    Verified Solutions Included
    GATE CS 2022 Question Paper with Solutions: 65 Questions, Answer Key & Section-wise Analysis

    GATE CS 2022 previous year paper: 65 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    65 Qs

    Total Questions

    100 Marks

    Total Marks

    0 Mins

    Duration

    +3 / -1 / 0

    Marking Scheme

    Section-wise Paper Structure

    Engineering Mathematics

    14 Qs

    22% of total marks

    Programming and Data Structures

    7 Qs

    11% of total marks

    Computer Organization and Architecture

    7 Qs

    11% of total marks

    Computer Networks

    6 Qs

    9% of total marks

    Theory of Computation

    5 Qs

    8% of total marks

    Operating System

    5 Qs

    8% of total marks

    Databases

    5 Qs

    8% of total marks

    Quantitative Aptitude

    3 Qs

    5% of total marks

    Compiler Design

    3 Qs

    5% of total marks

    Analytical Aptitude

    3 Qs

    5% of total marks

    Spatial Aptitude

    2 Qs

    3% of total marks

    Digital Logic

    2 Qs

    3% of total marks

    Algorithms

    2 Qs

    3% of total marks

    Verbal Aptitude

    1 Qs

    2% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2022 PYQ
    Level 3: Exam Standard
    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?
    Question 2
    2022 PYQ
    Level 2: Moderate
    Consider the following two statements with respect to the matrices , , and .

    Statement 1:
    Statement 2:

    where represents the trace of a matrix. Which one of the following holds?
    Question 3
    2022 PYQ
    Level 3: Exam Standard

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

    Question 4
    2022 PYQ
    Level 4: Challenger
    Consider the problem of reversing a singly linked list. To take an example, given the linked list below,

    headabcde
    the reversed linked list should look like

    headedcba

    Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in space?
    Question 5
    2022 PYQ
    Level 4: Challenger

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

    Question 6
    2022 PYQ
    Level 3: Exam Standard
    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;

    }
    Question 7
    2022 PYQ
    Level 3: Exam Standard

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

    Question 8
    2022 PYQ
    Level 3: Exam Standard

    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?

    Question 9
    2022 PYQ
    Level 3: Exam Standard

    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 (<i>rounded off to two decimal places</i>) needed after the optimization such that it should not increase the average memory access time is _____________.

    Question 10
    2022 PYQ
    Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.

    To InternetFirewallRouterRouterRouterWeb ServerEthernetEthernet- - -- - -

    What is the number of subnets inside the enterprise network?
    Question 11
    2022 PYQ

    Consider the resolution of the domain name <code>www.gate.org.in</code> 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_____________.

    Question 12
    2022 PYQ
    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?
    Question 13
    2022 PYQ
    Level 3: Exam Standard
    Which one of the following regular expressions correctly represents the language of the finite automaton given below?

    abbaba
    Question 14
    2022 PYQ

    Which of the following statements is/are TRUE?

    Question 15
    2022 PYQ

    Which of the following is/are undecidable?

    Question 16
    2022 PYQ
    Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time.

    T1T2T3
    while(true){
       wait(S3);
       print(“C”);
       signal(S2); }
    while(true){
       wait(S1);
       print(“B”);
       signal(S3); }
    while(true){
       wait(S2);
       print(“A”);
       signal(S1); }


    Which initialization of the semaphores would print the sequence BCABCABCA….?
    Question 17
    2022 PYQ

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

    Question 18
    2022 PYQ

    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 . 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 <b>NOT</b> possible as CPU burst time (in time units) of these processes?

    Question 19
    2022 PYQ

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

    Question 20
    2022 PYQ
    Consider the following three relations in a relational database.



    Which of the following relational algebra expressions return the set of who own all the brands?
    Question 21
    2022 PYQ

    Consider a relation with the following three functional dependencies.

    The number of superkeys in the relation is ____________.

    Question 22
    2022 PYQ
    Level 3: Exam Standard

    A function is defined in the interval on the -axis as

    Which one of the following is the area under the curve for the interval on the -axis?

    Question 23
    2022 PYQ
    Level 3: Exam Standard
    Let be a root of the equation .

    Then the value of the expression is
    Question 24
    2022 PYQ
    Level 3: Exam Standard
    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?
    Question 25
    2022 PYQ
    Level 3: Exam Standard

    Which one of the following statements is TRUE?

    Question 26
    2022 PYQ

    Consider the augmented grammar with as the set of terminals.

    If is the set of two items , then contains exactly __________ items.

    Question 27
    2022 PYQ
    Consider the following grammar along with translation rules. Here # and % are operators and is a token that represents an integer and represents the corresponding integer value. The set of non-terminals is and a subscripted non-terminal indicates an instance of the non-terminal.

    Using this translation scheme, the computed value of for root of the parse tree for the expression is_____________.
    Question 28
    2022 PYQ
    Level 3: Exam Standard
    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.
    Question 29
    2022 PYQ
    Level 3: Exam Standard
    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?
    Question 30
    2022 PYQ
    Level 3: Exam Standard
    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?
    Question 31
    2022 PYQ
    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.

    AD

    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.
    Question 32
    2022 PYQ
    Level 3: Exam Standard
    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.

    R1R2
    Question 33
    2022 PYQ
    Level 3: Exam Standard

    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?

    Question 34
    2022 PYQ
    Level 3: Exam Standard
    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?

    Code WordMS-addressR-addressPQSRTXDDS
    Question 35
    2022 PYQ

    Which one of the following statements is TRUE for all positive functions ?

    Question 36
    2022 PYQ
    Level 4: Challenger

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

    Question 37
    2022 PYQ
    Level 3: Exam Standard

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

    Unlock All 65 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More GATE CS Previous Year Papers

    Free preview ends here

    Login to view the complete paper and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    GATE CS 2022 Question Paper with Solutions: 65 Questions, Answer Key & Section-wise Analysis

    GATE CS 2022 previous year paper: 65 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    Paper breakdown

    65 questions · 100 marks. Engineering Mathematics: 14 · Programming and Data Structures: 7 · Computer Organization and Architecture: 7 · Computer Networks: 6 · Theory of Computation: 5 · Operating System: 5 · Databases: 5 · Quantitative Aptitude: 3 · Compiler Design: 3 · Analytical Aptitude: 3 · Spatial Aptitude: 2 · Digital Logic: 2 · Algorithms: 2 · Verbal Aptitude: 1

    Free sample questions from GATE CS 2022 Question Paper

    Question 1 · Engineering Mathematics · 2022 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?
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is an asymmetric replacement problem requiring the Law of Total Probability over the unknown first draw.

    Exam route: Branch into two paths: 1st is Green (prob 3/5, new state 2G, 2O) and 1st is Orange (prob 2/5, new state 3G, 2O). Multiply and sum the path probabilities.

    Learning route:

    Step 1: Identify initial state: 3 Green (G), 2 Orange (O). Total = 5.

    Step 2: Define the two mutually exclusive paths for the first draw.

    Path A: First ball is Green.

    • Probability of Path A: P(1st G) = 3/5.
    • Rule: Green is not replaced. New state: 2 G, 2 O. Total = 4.
    • Probability of 2nd Orange given Path A: P(2nd O | 1st G) = 2/4 = 1/2.
    • Joint probability of Path A: (3/5) * (1/2) = 3/10 = 15/50.

    Path B: First ball is Orange.

    • Probability of Path B: P(1st O) = 2/5.
    • Rule: Orange is replaced with another Orange. The drawn orange is removed, but another is added, so the count of Orange remains 2, and total remains 5. New state: 3 G, 2 O. Total = 5.
    • Probability of 2nd Orange given Path B: P(2nd O | 1st O) = 2/5.
    • Joint probability of Path B: (2/5) * (2/5) = 4/25 = 8/50.

    Step 3: Apply the Law of Total Probability.

    P(2nd O) = P(Path A) + P(Path B) = 15/50 + 8/50 = 23/50.

    Verification: The sum of all path probabilities for the second draw must equal 1. P(2nd G) = (3/5 2/4) + (2/5 3/5) = 15/50 + 12/50 = 27/50. Total = 23/50 + 27/50 = 1. The math is perfectly consistent.

    Question 2 · Engineering Mathematics · 2022 MCQ
    Consider the following two statements with respect to the matrices , , and .

    Statement 1:
    Statement 2:

    where represents the trace of a matrix. Which one of the following holds?
    1. A.

      Statement 1 is correct and Statement 2 is wrong.

    2. B.

      Statement 1 is wrong and Statement 2 is correct.

    3. C.

      Both Statement 1 and Statement 2 are correct.

    4. D.

      Both Statement 1 and Statement 2 are wrong.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a trace identity question, recognizable because it tests the cyclic property of the trace operator for matrix products. The trigger is the presence of and for matrices of compatible dimensions.

    Step 1: Analyze Statement 1. Let be an matrix and be an matrix. The product is an matrix, and is an matrix. Both traces are well-defined.

    Step 2: By definition, .

    Step 3: Similarly, .

    Step 4: Since scalar multiplication is commutative () and finite sums can be swapped, . Statement 1 is correct.

    Step 5: Analyze Statement 2. and are both matrices. This is a special case of Statement 1 where . Thus, is also correct.

    Step 6: Both statements are universally true for matrices of compatible dimensions.

    Answer: Both Statement 1 and Statement 2 are correct. (Option C)

    Question 3 · Engineering Mathematics · 2022 MSQ

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

    1. A.

      If for all , , then is commutative.

    2. B.

      If for all , , then is commutative. Here, is the identity element of .

    3. C.

      If the order of is , then is commutative.

    4. D.

      If is commutative, then a subgroup of need not be commutative.

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Insight: Test each algebraic identity by expanding and cancelling. For small orders, use group classification.

    Exam route:

    Option A: . Left-multiply by and right-multiply by to get . True.

    Option B: . Then . But since , . Thus . True.

    Option C: . The only products are , all of which commute. True.

    Option D: Subgroups of Abelian groups are always Abelian. The statement "need not be" is False.

    Learning route:

    1. For A, expand . Cancel on the left: . Cancel on the right: .
    2. For B, the condition means every element is its own inverse. The inverse of is . But is also its own inverse, so .
    3. For C, a group of order 2 is isomorphic to , which is Abelian.
    4. For D, if for all , then for any , still holds.
    Question 4 · Programming and Data Structures · 2022 MCQ
    Consider the problem of reversing a singly linked list. To take an example, given the linked list below,

    headabcde
    the reversed linked list should look like

    headedcba

    Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in space?
    1. A.

      The best algorithm for the problem takes time in the worst case.

    2. B.

      The best algorithm for the problem takes time in the worst case.

    3. C.

      The best algorithm for the problem takes time in the worst case.

    4. D.

      It is not possible to reverse a singly linked list in space.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a linked list reversal complexity question, recognizable because it asks for the time complexity of reversing a singly linked list under a strict space constraint.

    Exam route: Iterative reversal uses 3 pointers and visits each node exactly once, yielding time and space.

    Learning route:

    Step 1: Understand the constraints. We must reverse a singly linked list of nodes using only extra space (i.e., a constant number of pointers, no recursion stack, no auxiliary arrays).

    Step 2: Recall the standard iterative reversal algorithm. We maintain three pointers: prev (initially NULL), curr (initially head), and next_temp (initially NULL).

    Step 3: Traverse the list. In each iteration, we store curr->next in next_temp, reverse the link by setting curr->next = prev, and then advance prev and curr by one step.

    Step 4: Analyze the complexity. The algorithm visits each of the nodes exactly once, performing a constant number of pointer assignments per node. Therefore, the time complexity is strictly . The space complexity is because only three pointers are used.

    Question 5 · Programming and Data Structures · 2022 MCQ

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

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: Simple uniform hashing guarantees that every key independently has a probability of landing in any specific slot, regardless of the deterministic rule used to pick the hash function.

    Exam route: Recognize that any simple uniform hash function distributes keys evenly in expectation. The expected load is simply total keys divided by total slots.

    Learning route:

    Let be an indicator random variable that is 1 if key hashes to slot , and 0 otherwise.

    Because both and are simple uniform hash functions, for any key , the probability that it maps to slot is exactly , whether it uses or .

    Thus, for all .

    The total number of keys in slot is .

    By linearity of expectation:

    .

    Tempting wrong path: Assuming the parity split halves the keys per slot, leading to . While half the keys use and half use , both functions map to the same slots with probability , so the total expectation remains .

    Generalization: Linearity of expectation holds regardless of dependencies or deterministic routing rules, as long as the marginal probability for each item remains uniform.

    Verification: If , expected keys per slot is 1. Formula gives . Matches intuition.

    Question 6 · Programming and Data Structures · 2022 MCQ
    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;

    }
    1. A.

      1, 10, 11

    2. B.

      1, 10, 14

    3. C.

      10, 14, 11

    4. D.

      10, 10, 14

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is a pointer tracing question with array indexing, recognizable by mixed pointer assignments and arithmetic on array base addresses.

    Exam route: Track x, z[0], and z[1]. p = 10 changes x to 10. (&z[0] + 1) is equivalent to z[1], so z[1] becomes 11 + 3 = 14. z[0] remains 10.

    Learning route:

    1. Initial state: x = 1, z[0] = 10, z[1] = 11.
    2. p = &x: p points to x.
    3. *p = 10: The value at p (which is x) is updated to 10.
    4. p = &z[1]: p is redirected to point to z[1]. (This line does not change z[1]'s value, only p's target).
    5. *(&z[0] + 1) += 3:
    • &z[0] is the address of the first element.
    • Adding 1 scales by the size of int, yielding the address of the next element, &z[1].
    • Dereferencing this gives z[1].
    • z[1] += 3 updates z[1] from 11 to 14.
    1. Final values: x = 10, z[0] = 10, z[1] = 14.
    2. Output matches option D.
    Question 7 · Computer Organization and Architecture · 2022 MCQ

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

    1. A.

      DMA based I/O transfer

    2. B.

      Interrupt driven I/O transfer

    3. C.

      Polling based I/O transfer

    4. D.

      Programmed I/O transfer

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a conceptual comparison question about I/O transfer mechanisms, recognisable because it asks for the "highest throughput" for "bulk data" among standard I/O techniques.

    Step 1: Evaluate Programmed I/O. The CPU must execute a sequence of instructions for every single byte or word transferred. This keeps the CPU 100% occupied with the transfer, resulting in the lowest throughput.

    Step 2: Evaluate Polling. Similar to programmed I/O, the CPU continuously checks the device status in a loop, wasting even more cycles when the device is not ready. Throughput remains very low.

    Step 3: Evaluate Interrupt-driven I/O. The CPU can do other work while waiting for the device. However, when the device is ready, the CPU still must execute instructions to move each byte from the device interface to memory.

    Step 4: Evaluate DMA (Direct Memory Access). The DMA controller takes over the system bus and transfers entire blocks of data directly between the device and main memory without CPU intervention. The CPU is only involved at the start and end. This minimizes overhead and maximizes data transfer rate.

    Answer: A

    Question 8 · Computer Organization and Architecture · 2022 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?

    1. A.

      Each cache block in WB and WT has a dirty bit.

    2. B.

      Every write hit in WB leads to a data transfer from cache to main memory.

    3. C.

      Eviction of a block from WT will not lead to data transfer from cache to main memory.

    4. D.

      A read miss in WB will never lead to eviction of a dirty block from WB.

    Correct Answer:

    ["A","B","D"]

    Step-by-Step Solution

    Insight: This is a multi-statement write-policy comparison. Evaluate each statement against the fundamental rules of WB and WT.

    Exam route:

    • A: WT does not use dirty bits → FALSE.
    • B: WB write hit updates cache only, not memory → FALSE.
    • C: WT eviction needs no writeback (memory already current) → TRUE.
    • D: A read miss in WB can evict a dirty block if the set is full → FALSE.

    Answer: A, B, D

    Learning route:

    This is a multi-statement true/false question about write policies, recognisable by the WB vs WT comparison and the "which is/are FALSE" phrasing.

    Recall the fundamental rules:

    • <b>Write-Through (WT):</b> Write hit → update cache AND memory. No dirty bit needed. Eviction → discard (memory is already current).
    • <b>Write-Back (WB):</b> Write hit → update cache only, set dirty bit. Eviction → writeback to memory if dirty bit = 1.

    Now evaluate each statement:

    <b>A.</b> "Each cache block in WB and WT has a dirty bit." — WB needs dirty bits, but WT does not (cache and memory are always in sync). <b>FALSE.</b>

    <b>B.</b> "Every write hit in WB leads to a data transfer from cache to main memory." — In WB, a write hit updates only the cache and sets the dirty bit. Memory is updated only on eviction. <b>FALSE.</b>

    <b>C.</b> "Eviction of a block from WT will not lead to data transfer from cache to main memory." — In WT, memory is always current, so eviction simply discards the line. No writeback. <b>TRUE.</b>

    <b>D.</b> "A read miss in WB will never lead to eviction of a dirty block from WB." — A read miss loads a new block. If the target set is full, a replacement occurs. The evicted block may be dirty (if it was previously written). <b>FALSE.</b>

    The question asks for FALSE statements: A, B, D.

    Question 9 · Computer Organization and Architecture · 2022 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 (<i>rounded off to two decimal places</i>) needed after the optimization such that it should not increase the average memory access time is _____________.

    Correct Answer:

    0.85

    Step-by-Step Solution

    Key idea: This is a cache optimization AMAT comparison problem. We must calculate the original AMAT, set up an inequality for the new AMAT, and solve for the minimum required hit rate.

    Step 1: Calculate the original AMAT.

    • Original hit rate () = 0.8 miss rate () = 0.2
    • Original access latency () = 10 ns
    • Miss penalty () = 100 ns
    • ns.

    Step 2: Set up the equation for the optimized cache.

    • New access latency () = 15 ns
    • Miss penalty () = 100 ns (unaffected)
    • Let the new hit rate be . Then the new miss rate is .

    Step 3: Apply the optimization constraint.

    The optimization should not increase the AMAT, so .

    Step 4: Format the answer.

    The minimum hit rate needed is 0.85. Rounded to two decimal places, this is 0.85.

    Answer: 0.85

    Question 10 · Computer Networks · 2022 MCQ
    Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.

    To InternetFirewallRouterRouterRouterWeb ServerEthernetEthernet- - -- - -

    What is the number of subnets inside the enterprise network?
    1. A.

      3

    2. B.

      12

    3. C.

      6

    4. D.

      8

    Question 11 · Computer Networks · 2022 NAT

    Consider the resolution of the domain name <code>www.gate.org.in</code> 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_____________.

    Question 12 · Computer Networks · 2022 MSQ
    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?
    1. A.

      12.20.164.0/20

    2. B.

      12.20.164.0/22

    3. C.

      12.20.164.0/21

    4. D.

      12.20.168.0/22

    Question 13 · Theory of Computation · 2022 MCQ
    Which one of the following regular expressions correctly represents the language of the finite automaton given below?

    abbaba
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a DFA-to-Regex conversion problem. We can use Arden's Theorem or State Elimination.

    Step 1: Write state equations.

    Let be start, be finals.

    (Wait, diagram: . ? No, ?

    Let's trace P3 diagram carefully.

    Start -> Left Circle ().

    (Top Right, Final).

    (Bottom Right, Final).

    .

    ? No, loop on is labeled 'b'?

    Diagram:

    • Left () to Top (): 'a'.
    • Left () to Bottom (): 'b'.
    • Top () to Left (): 'b'.
    • Top () loop: 'a'? No, arrow from to ?

    The SVG shows:

    • Path from (300,55) curving back to itself? No.
    • Path from to ? No.
    • Path from to : 'b'.
    • Path from to : 'a'.
    • Loop on : 'b'? The text 'b' is at (363, 48). The path is a loop on .
    • Loop on : 'a'? The text 'a' is at (363, 170). The path is a loop on .

    So:

    Step 2: Solve for and using Arden's.

    Step 3: Substitute into .

    Let .

    Step 4: Find Language ().

    Compare with Option B: ? No.

    Option B: . This looks like two separate parts.

    Let's check Option D: .

    My result: .

    This matches Option D exactly (order of union doesn't matter).

    Answer: D

    Question 14 · Theory of Computation · 2022 MSQ

    Which of the following statements is/are TRUE?

    1. A.

      Every subset of a recursively enumerable language is recursive.

    2. B.

      If a language and its complement are both recursively enumerable, then must be recursive.

    3. C.

      Complement of a context-free language must be recursive.

    4. D.

      If and are regular, then must be deterministic context-free.

    Question 15 · Theory of Computation · 2022 MSQ

    Which of the following is/are undecidable?

    1. A.

      Given two Turing machines and , decide if .

    2. B.

      Given a Turing machine , decide if is regular.

    3. C.

      Given a Turing machine , decide if accepts all strings.

    4. D.

      Given a Turing machine , decide if takes more than 1073 steps on every string.

    Question 16 · Operating System · 2022 MCQ
    Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time.

    T1T2T3
    while(true){
       wait(S3);
       print(“C”);
       signal(S2); }
    while(true){
       wait(S1);
       print(“B”);
       signal(S3); }
    while(true){
       wait(S2);
       print(“A”);
       signal(S1); }


    Which initialization of the semaphores would print the sequence BCABCABCA….?
    1. A.

      S1 = 1; S2 = 1; S3 = 1

    2. B.

      S1 = 1; S2 = 1; S3 = 0

    3. C.

      S1 = 1; S2 = 0; S3 = 0

    4. D.

      S1 = 0; S2 = 1; S3 = 1

    Question 17 · Operating System · 2022 MSQ

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

    1. A.

      Circular wait is a necessary condition for the formation of deadlock.

    2. B.

      In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock.

    3. C.

      If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur.

    4. D.

      In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.

    Question 18 · Operating System · 2022 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 . 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 <b>NOT</b> possible as CPU burst time (in time units) of these processes?

    1. A.

      P = 4, Q = 10, R = 6, S = 2

    2. B.

      P = 2, Q = 9, R = 5, S = 1

    3. C.

      P = 4, Q = 12, R = 5, S = 4

    4. D.

      P = 3, Q = 7, R = 7, S = 3

    Question 19 · Databases · 2022 MCQ

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

    1. A.

      A relation with only two attributes is always in BCNF.

    2. B.

      If all attributes of a relation are prime attributes, then the relation is in BCNF.

    3. C.

      Every relation has at least one non-prime attribute.

    4. D.

      BCNF decompositions preserve functional dependencies.

    Question 20 · Databases · 2022 MSQ
    Consider the following three relations in a relational database.



    Which of the following relational algebra expressions return the set of who own all the brands?
    1. A.

    2. B.

    3. C.

    4. D.

    Question 21 · Databases · 2022 NAT

    Consider a relation with the following three functional dependencies.

    The number of superkeys in the relation is ____________.

    Question 22 · Quantitative Aptitude · 2022 MCQ

    A function is defined in the interval on the -axis as

    Which one of the following is the area under the curve for the interval on the -axis?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: The area under a piecewise constant (step) function is simply the sum of the areas of the rectangular blocks it forms.

    Exam route: Area = .

    Learning route:

    1. The function is constant on three sub-intervals. The area under the curve is the sum of the areas of three rectangles.
    2. Rectangle 1: Interval . Width = . Height = 2. Area = .
    3. Rectangle 2: Interval . Width = . Height = 3. Area = .
    4. Rectangle 3: Interval . Width = . Height = 1. Area = .
    5. Total Area = .
    6. Combine the fractions with denominator 4: .
    7. Add to the first term: . The common denominator is 6.
    8. Total Area = .

    Wrong path: Miscalculating the width of the second interval (e.g., due to bad fraction subtraction), or adding the heights instead of multiplying by width, or confusing the interval bounds. Option A (5/6) might come from missing the middle term entirely.

    Question 23 · Quantitative Aptitude · 2022 MCQ
    Let be a root of the equation .

    Then the value of the expression is
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: If is a root of , then . We can group the factors of the target expression to form this known polynomial.

    Exam route: Group . Group . Multiply them: .

    Learning route:

    Step 1: Write the given equation as .

    Step 2: Expand pairs of the target expression to reveal the polynomial .

    Step 3: . Since , this simplifies to .

    Step 4: . Since , this simplifies to .

    Step 5: Multiply the simplified parts: .

    Step 6: Substitute to get .

    Question 24 · Quantitative Aptitude · 2022 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?
    1. A.

      Equal number of boys and girls qualified

    2. B.

      Equal number of boys and girls appeared for the test

    3. C.

      The number of boys who appeared for the test is less than the number of girls who appeared

    4. D.

      The number of boys who qualified the test is less than the number of girls who qualified

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: Percentages of the qualified pool tell us the boys-vs-girls split among qualifiers directly — no need to know the pass rates.

    Exam route: Girls are of qualified boys are of qualified. So fewer boys qualified than girls. Option D.

    Learning route:

    Step 1: Let total appeared . Boys appeared , girls appeared .

    Step 2: Girls account for of qualified candidates. Therefore boys account for the remaining of qualified candidates.

    Step 3: Compare the options:

    • A: "Equal number of boys and girls qualified" — false, since .
    • B: "Equal number of boys and girls appeared" — false, .
    • C: "Boys who appeared girls who appeared" — false, .
    • D: "Boys who qualified girls who qualified" — true, since of the same qualified pool.

    Trap warning: Students often try to compute actual numbers of qualifiers, but the pass rates are not given. The inference must come purely from the qualified-pool split.

    Verification: Whatever the total qualified count is, boys qualified and girls qualified , so boys girls always holds.

    Question 25 · Compiler Design · 2022 MCQ

    Which one of the following statements is TRUE?

    1. A.

      The parser for a grammar cannot have reduce-reduce conflict if the parser for does not have reduce-reduce conflict.

    2. B.

      Symbol table is accessed only during the lexical analysis phase.

    3. C.

      Data flow analysis is necessary for run-time memory management.

    4. D.

      parsing is sufficient for deterministic context-free languages.

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: Evaluate each statement based on formal language theory and compiler design principles.

    Step 1: Analyze Option A. LALR(1) parsers are formed by merging states of LR(1) parsers. This merging can introduce reduce-reduce conflicts that were not present in the original LR(1) parser. Thus, Option A is FALSE.

    Step 2: Analyze Option B. The symbol table is a central data structure accessed by almost all compiler phases (lexical, syntax, semantic, intermediate code generation, optimization, and code generation), not just lexical analysis. Thus, Option B is FALSE.

    Step 3: Analyze Option C. Data flow analysis is a technique used for code optimization (e.g., constant propagation, dead code elimination), not for run-time memory management. Run-time memory management is handled by the run-time system. Thus, Option C is FALSE.

    Step 4: Analyze Option D. Deterministic Context-Free Languages (DCFLs) are exactly the class of languages that can be recognized by a Deterministic Pushdown Automaton (DPDA). LR(1) parsing is a deterministic parsing technique that can parse all DCFLs. Thus, Option D is TRUE.

    Answer: D

    Question 26 · Compiler Design · 2022 NAT

    Consider the augmented grammar with as the set of terminals.

    If is the set of two items , then contains exactly __________ items.

    Question 27 · Compiler Design · 2022 NAT
    Consider the following grammar along with translation rules. Here # and % are operators and is a token that represents an integer and represents the corresponding integer value. The set of non-terminals is and a subscripted non-terminal indicates an instance of the non-terminal.

    Using this translation scheme, the computed value of for root of the parse tree for the expression is_____________.
    Question 28 · Analytical Aptitude · 2022 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.
    1. A.

      Statement 1 and Statement 3

    2. B.

      Statement 1 and Statement 2

    3. C.

      Statement 2 and Statement 4

    4. D.

      Statement 3 and Statement 4

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: "All S are P" and "No S is P" are mutually exclusive; they cannot both be true for a non-empty set.

    Exam route: Statement 1 is Type A (All), Statement 3 is Type E (No). A and E are contraries. Select Option A.

    Learning route: In categorical logic, assuming the subject class is not empty, the universal affirmative (All students are inquisitive) and the universal negative (No student is inquisitive) cannot both be true. If all are inquisitive, it is false that none are. Statement 2 (Some are) and Statement 4 (Some are not) can both be true simultaneously if only a portion are inquisitive. Therefore, Statements 1 and 3 are the pair that cannot be true simultaneously.

    Wrong path: A student might think "Some" means "Some but not all" (everyday language trap), leading them to believe Statements 2 and 4 cannot both be true (Option C). This breaks because in formal logic, "Some" means "at least one" and does not exclude "All". If all are inquisitive, both "Some are" and "Some are not" (wait, if all are, "Some are not" is false. But if some are, then some are not can also be true. The pair 2 and 4 can both be true if the set is partially inquisitive). Generalization: Never assume "Some S are P" implies "Some S are not P" in formal logic. Verification: Statements 1 and 3 directly contradict each other for any non-empty set.

    Question 29 · Analytical Aptitude · 2022 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?
    1. A.

      Metrics are useful in organizations with poor work culture

    2. B.

      Metrics are useful in organizations with good work culture

    3. C.

      Metrics are always counterproductive in organizations with good work culture

    4. D.

      Metrics are never useful in organizations with good work culture

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: The passage explicitly states the effect of metrics in good work cultures. Deductive inference requires selecting what must be true based strictly on the text.

    Exam route: Scan for "good work culture". The text says "metrics help improve outcomes". This directly means metrics are useful. Match with Option B.

    Learning route:

    1. Analyze the passage: The text states, "In organizations with good work culture, metrics help improve outcomes."
    2. Apply the Golden Rule of Deductive Inference: Accept the passage as absolute truth and look for what must be true without adding outside assumptions.
    3. Evaluate options:
    • Option A claims metrics are useful in poor work culture, but the text says they are "counterproductive".
    • Option B claims metrics are useful in good work culture, which perfectly matches "help improve outcomes".
    • Options C and D claim metrics are counterproductive or never useful in good work culture, directly contradicting the text.

    Answer is B.

    Question 30 · Analytical Aptitude · 2022 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?
    1. A.

      P cannot be placed at a corner

    2. B.

      S cannot be placed at a corner

    3. C.

      U cannot be placed at a mid-point

    4. D.

      R cannot be placed at a corner

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: In a triangle, the only way two lines formed by {corners, midpoints} are parallel is if one is a mid-segment (connecting two midpoints) and the other is the side parallel to it (connecting two corners).

    Exam route:

    Step 1: PR || QS. This means either {P, R} are midpoints and {Q, S} are corners, OR {P, R} are corners and {Q, S} are midpoints.

    Step 2: "P is placed on the side opposite to the corner T." This implies T is a corner, and the side containing P is opposite to T.

    Step 3: Test Case A: {P, R} are midpoints. Then PR is a mid-segment. It is parallel to the side connecting the two corners not on the sides of P and R. For QS to be parallel to PR, Q and S must be those two corners. Thus, corners = {Q, S, T}. This leaves {P, R, U} as midpoints. But S is a corner, so it belongs to two sides. U is a midpoint, so it must lie on one of those two sides, violating "S and U cannot be placed on the same side". Contradiction.

    Step 4: Test Case B: {P, R} are corners. Then PR is a side. For QS to be parallel to PR, QS must be the mid-segment. Thus, {Q, S} are midpoints. This perfectly satisfies all clues: T is the third corner, and S (a midpoint) and U (the remaining midpoint) are on different sides.

    Step 5: Conclusion: S must be a midpoint. Therefore, "S cannot be placed at a corner" is definitively true.

    Learning route:

    Step 1: Recall the geometric constraint: Parallel lines in this context require one mid-segment and one side.

    Step 2: Set up the two mutually exclusive cases for {P, R} and {Q, S}.

    Step 3: Use the "opposite to corner T" clue to anchor T as a corner and link P to a specific side.

    Step 4: Apply the negative constraint "S and U not on same side" to eliminate the case where S is a corner (as it would force U onto a side touching S).

    Step 5: Deduce that S must be a midpoint, making the statement "S cannot be placed at a corner" the correct answer.

    Question 31 · Spatial Aptitude · 2022 MCQ
    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.

    AD

    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.
    1. A. DDJ
    2. B. RAR
    3. C. ZED
    4. D. ILY
    Question 32 · Spatial Aptitude · 2022 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.

    R1R2
    1. A.

      2

    2. B.

      4

    3. C.

      5

    4. D.

      3

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: This is a geometric partitioning problem where we must divide an irregular polygon into 4 similar shapes using the minimum number of additional straight lines (ropes).

    Step 1: Analyze the given shape and existing ropes.

    The land is a hexagon with equally spaced poles. R1 is a horizontal rope of length 2 units. R2 is a vertical rope of length 2 units.

    Step 2: Understand the goal.

    We need 4 similar plots. Similarity means they must have the same shape and angles, though their areas can differ.

    Step 3: Visualize the partition.

    To create 4 similar shapes from this specific hexagon, we need to extend the existing boundaries and create proportional divisions. By adding 3 strategic ropes (e.g., extending R1, extending R2, and adding one diagonal or connecting rope), we can divide the land into 4 regions that are scaled versions of each other.

    Step 4: Verify the minimum number.

    With 2 additional ropes, we can at most create 3 or 4 regions, but they will not maintain the required similarity in shape. With exactly 3 additional ropes, we can achieve the required 4 similar plots by completing the internal grid that mirrors the outer boundary's proportions.

    Answer: D

    Question 33 · Digital Logic · 2022 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?

    1. A.

      R1 = 1011 and R2 = 1110

    2. B.

      R1 = 1100 and R2 = 1010

    3. C.

      R1 = 0011 and R2 = 0100

    4. D.

      R1 = 1001 and R2 = 1111

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: Overflow in 2's complement only occurs when adding two numbers of the same sign yields a result with a different sign.

    Exam route:

    Check the sign bits (MSB) of R1 and R2.

    A) 1011 (-), 1110 (-). Same sign. Sum = 11001 1001 (-). No overflow.

    B) 1100 (-), 1010 (-). Same sign. Sum = 10110 0110 (+). OVERFLOW.

    C) 0011 (+), 0100 (+). Same sign. Sum = 0111 (+). No overflow.

    D) 1001 (-), 1111 (-). Same sign. Sum = 11000 1000 (-). No overflow.

    Learning route:

    In a 4-bit 2's complement system, the range is -8 to +7. Overflow happens if the true mathematical sum exceeds this range.

    The golden rule for detection: Overflow can ONLY happen when adding two numbers of the same sign. If the operands have the same sign, but the result's sign bit is different, overflow has occurred.

    Let's evaluate the options:

    A) R1 = 1011 (-5), R2 = 1110 (-2). Both negative. Sum = -7. Binary: 1011 + 1110 = 11001. Discard carry 1001 (-7). Sign matches. Valid.

    B) R1 = 1100 (-4), R2 = 1010 (-6). Both negative. True sum = -10 (out of range). Binary: 1100 + 1010 = 10110. Discard carry 0110 (+6). Two negatives gave a positive. OVERFLOW.

    C) R1 = 0011 (+3), R2 = 0100 (+4). Both positive. Sum = +7. Binary: 0011 + 0100 = 0111 (+7). Sign matches. Valid.

    D) R1 = 1001 (-7), R2 = 1111 (-1). Both negative. Sum = -8. Binary: 1001 + 1111 = 11000. Discard carry 1000 (-8). Sign matches. Valid.

    Question 34 · Digital Logic · 2022 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?

    Code WordMS-addressR-addressPQSRTXDDS
    1. A.

      P is 10:1 multiplexer; Q is 5:1 multiplexer; T is 2:1 multiplexer

    2. B.

      P is 10: decoder; Q is 5: decoder; T is 2:1 encoder

    3. C.

      P is 10: decoder; Q is 5: decoder; T is 2:1 multiplexer

    4. D.

      P is 1:10 de-multiplexer; Q is 1:5 de-multiplexer; T is 2:1 multiplexer

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: The system routes a 16-bit word from either a 1024-word memory (S) or a 32-word register file (R) based on a mode bit M, requiring specific address decoding and data selection hardware.

    Exam route:

    1. S requires 10 address bits (), so P must be a 10-to- decoder.
    2. R requires 5 address bits (), so Q must be a 5-to- decoder.
    3. T selects between the two 16-bit outputs based on M, making it a 2:1 multiplexer.
    4. Option C matches this hardware configuration perfectly.

    Learning route:

    1. Identify address requirements: 1024 words need 10 bits, 32 words need 5 bits.
    2. Decoders convert -bit addresses to selection lines. Thus, P is 10: and Q is 5:.
    3. A multiplexer selects one of multiple data inputs. T chooses between S and R, so it is a 2:1 MUX.
    4. Option C perfectly matches this hardware configuration.
    Question 35 · Algorithms · 2022 MCQ

    Which one of the following statements is TRUE for all positive functions ?

    1. A.

      , when is a polynomial

    2. B.

    3. C.

      , when is an exponential function

    4. D.

    Question 36 · Algorithms · 2022 MSQ

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

    1. A.

      The edge with the second smallest weight is always part of any minimum spanning tree of .

    2. B.

      One or both of the edges with the third smallest and the fourth smallest weights are part of any minimum spanning tree of .

    3. C.

      Suppose be such that and . Consider the edge with the minimum weight such that one of its vertices is in and the other in . Such an edge will always be part of any minimum spanning tree of .

    4. D.

      can have multiple minimum spanning trees.

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Key idea: Apply the Cut Property and Kruskal's algorithm logic to a graph with strictly distinct edge weights.

    Step 1: Analyze the distinct weights condition. Since all edge weights are distinct, the Minimum Spanning Tree (MST) of the graph is strictly unique. This immediately makes the statement "G can have multiple minimum spanning trees" FALSE.

    Step 2: Evaluate the smallest edges. Let the edges sorted by weight be

    By Kruskal's algorithm, is always included.

    Step 3: Evaluate . Can form a cycle with ? No, because a cycle requires at least 3 edges in a simple graph. Thus, will never be rejected by Kruskal's and is always in the MST. Statement A is TRUE.

    Step 4: Evaluate and . For an edge to be rejected by Kruskal's, it must form a cycle with edges already in the MST. The only edges smaller than are and . These two edges can form at most one path of length 2 (if they share a vertex). Therefore, they can form a cycle with at most ONE additional edge (which would be ).

    Step 5: Since and can only cause the rejection of at most one edge (the one closing their cycle), they cannot cause the rejection of BOTH and . Thus, at least one of or must be accepted into the MST. Statement B is TRUE.

    Step 6: Evaluate the cut property. The statement describes exactly the Cut Property: the minimum weight edge crossing any cut is always part of the MST. Since weights are distinct, this minimum is unique. Statement C is TRUE.

    Answer: A, B, C

    Question 37 · Verbal Aptitude · 2022 MCQ

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

    1. A.

      fair / fare

    2. B.

      faer / fair

    3. C.

      fare / fare

    4. D.

      fare / fair

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is a classic homophone and commonly confused words question, testing the distinction between "fare" (price) and "fair" (just/reasonable).

    Exam route: The sentence needs a noun for the first blank (something that can be "too high") and an adjective for the second blank (a judgment of that thing). "Fare" is the price charged for a journey. "Fair" means just or reasonable. "The fare is too high for it to be considered fair."

    Learning route:

    Step 1: Analyze the grammatical and logical requirements of the blanks. The first blank is the subject, requiring a noun representing a cost or value. The second blank follows "considered", requiring an adjective describing a judgment of that cost.

    Step 2: Define the candidate words. "Fare" (noun): The money a passenger on public transportation has to pay. "Fair" (adjective): Treating people equally without favouritism; just or reasonable.

    Step 3: Test the combinations. "fair / fare" places an adjective in the noun slot. "faer" is not a standard English word. "fare / fare" makes no logical sense. "fare / fair" creates a logically sound sentence: "The fare (price) is too high for it to be considered fair (reasonable)."

    Other GATE CS papers