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

    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 3: Exam Standard
    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 3: Exam Standard

    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
    Level 3: Exam Standard
    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
    Level 3: Exam Standard

    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
    Level 3: Exam Standard
    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
    Level 3: Exam Standard

    Which of the following statements is/are TRUE?

    Question 15
    2022 PYQ
    Level 3: Exam Standard

    Which of the following is/are undecidable?

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

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

    Question 18
    2022 PYQ
    Level 4: Challenger

    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
    Level 3: Exam Standard

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

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

    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
    Level 3: Exam Standard

    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
    Level 3: Exam Standard
    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
    Level 3: Exam Standard
    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
    Level 3: Exam Standard

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

    Question 36
    2022 PYQ
    Level 3: Exam Standard

    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.

    Explore complete test series, official past papers, and chapter-wise study tools.

    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:

    .

    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

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Each point-to-point link between routers, and each link connecting a router to a LAN or host, constitutes a separate subnet (broadcast domain).

    Exam route: Count the distinct links: (1) Firewall-Router1, (2) Router1-Router2, (3) Router1-Router3, (4) Router1-WebServer, (5) Router2-Ethernet1, (6) Router3-Ethernet2. Total = 6.

    Learning route:

    1. Understand that a subnet is a broadcast domain, and routers do not forward broadcast traffic. Therefore, every interface on a router belongs to a different subnet.
    2. Analyze the diagram to identify all distinct network segments (links):
    • Link 1: Between the Firewall and the middle Router.
    • Link 2: Between the middle Router and the left Router.
    • Link 3: Between the middle Router and the right Router.
    • Link 4: Between the middle Router and the Web Server.
    • Link 5: Between the left Router and the left Ethernet segment.
    • Link 6: Between the right Router and the right Ethernet segment.
    1. Sum the segments: subnets.
    2. Note: The link to the "Internet" is outside the enterprise network, and the question specifically asks for subnets "inside the enterprise network".

    Answer: Option C (6).

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

    Correct Answer:

    4.00

    Step-by-Step Solution

    Insight: Count the exact number of query-response pairs generated by the stub resolver and the recursive resolver traversing the hierarchy.

    Exam route: The host's stub resolver queries the Local DNS server (1 pair). The Local DNS server then iteratively queries the Root server (1 pair), the TLD server for .in (1 pair), and the Authoritative server for gate.org.in (1 pair). Total = 1 + 3 = 4 pairs.

    Learning route: Let us trace the message flow step-by-step for an empty cache using iterative queries.

    1. <b>Host Local DNS Server:</b> The stub resolver on the host sends a query to its configured Local DNS server. The server responds. (Pair 1)
    2. <b>Local DNS Root Server:</b> The Local DNS server queries a root server. The root server replies with a referral to the .in TLD servers. (Pair 2)
    3. <b>Local DNS TLD Server:</b> The Local DNS server queries a .in TLD server. The TLD server replies with a referral to the authoritative servers for .org.in or gate.org.in. (Pair 3)
    4. <b>Local DNS Authoritative Server:</b> The Local DNS server queries the authoritative server for gate.org.in. The authoritative server replies with the final IP address for www.gate.org.in. (Pair 4)

    The Local DNS server then returns this IP to the host (completing the response for Pair 1).

    Total query-response pairs involved in completely resolving the name = 4.

    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

    Correct Answer:

    ["B","D"]

    Step-by-Step Solution

    Insight: This is a route aggregation (supernetting) question, recognizable because it asks to "collectively aggregate" multiple subnets.

    Exam route: Convert each subnet to its IP range, then find the minimal set of valid CIDR blocks from the options that cover all these ranges without gaps.

    Learning route:

    Step 1: Analyze the given subnets.

    • 12.20.164.0 / 255.255.252.0 is a /22. Range: 12.20.164.0 to 12.20.167.255.
    • 12.20.170.0 / 255.255.254.0 is a /23. Range: 12.20.170.0 to 12.20.171.255.
    • 12.20.168.0 / 255.255.254.0 is a /23. Range: 12.20.168.0 to 12.20.169.255.
    • 12.20.166.0 / 255.255.254.0 is a /23. Range: 12.20.166.0 to 12.20.167.255.

    Step 2: Check the options for valid CIDR blocks that cover these ranges.

    • Option A (12.20.164.0/20): Invalid network address. A /20 block must start at a multiple of 16 in the third octet (e.g., 160.0), not 164.0.
    • Option B (12.20.164.0/22): Valid /22 block. Range: 12.20.164.0 to 12.20.167.255. This perfectly covers the first and fourth subnets.
    • Option C (12.20.164.0/21): Invalid network address. A /21 block must start at a multiple of 8 (e.g., 160.0 or 168.0), not 164.0.
    • Option D (12.20.168.0/22): Valid /22 block. Range: 12.20.168.0 to 12.20.171.255. This perfectly covers the second and third subnets (168-169 and 170-171).

    Step 3: Combine the valid options.

    Using Option B and Option D collectively covers all four subnets (164-167 and 168-171).

    Verification: 12.20.164.0/22 covers 164, 165, 166, 167. 12.20.168.0/22 covers 168, 169, 170, 171. Together they cover 164 through 171, which matches all given subnets.

    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.

    Correct Answer:

    ["B","C","D"]

    Step-by-Step Solution

    Insight: This is a multi-statement classification question testing the language hierarchy, closure properties, and the bidirectional theorem.

    Exam route: Evaluate each option using the hierarchy Regular DCFL CFL Recursive RE and known closure properties.

    Learning route:

    • Option A: The language is recursively enumerable (RE). Every RE language is a subset of . Since there are RE languages that are not recursive, not every subset of an RE language is recursive. This statement is FALSE.
    • Option B: This is the Bidirectional Theorem. If both and are RE, we can run their recognizers in parallel on the same input. Since every string is in or , one recognizer is guaranteed to halt and accept. This parallel execution creates a decider for , proving is recursive. This statement is TRUE.
    • Option C: Context-free languages (CFL) are a proper subset of Recursive languages. The class of Recursive languages is closed under complement. Therefore, the complement of any CFL is guaranteed to be Recursive. This statement is TRUE.
    • Option D: Regular languages are closed under intersection, so is Regular. Since every Regular language is also a Deterministic Context-Free Language (DCFL), the intersection must be DCFL. This statement is TRUE.
    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.

    Correct Answer:

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

    Step-by-Step Solution

    Insight: Rice's theorem makes non-trivial language properties of TMs undecidable. Bounded step properties are decidable because the TM's behavior is confined to a finite prefix of the input.

    Exam route: Options A, B, and C are non-trivial language properties of TMs, hence undecidable by Rice's theorem. Option D is bounded by a constant (1073 steps), making it decidable via finite simulation.

    Learning route:

    • Option A: Equivalence of TM languages () is a non-trivial property, undecidable.
    • Option B: Regularity of a TM language ( is regular) is a non-trivial property, undecidable by Rice's theorem.
    • Option C: Accepting all strings () is a non-trivial property, undecidable.
    • Option D: Since 1073 is a constant, a TM can read at most 1073 symbols in 1073 steps. We can simulate the TM on all inputs of length up to 1073 for 1073 steps. This finite simulation decides whether it 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

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: This is a semaphore ordering question. The desired output sequence strictly dictates which thread must execute first, which in turn determines the initial values of the semaphores.

    Exam route:

    1. The target sequence starts with 'B'. Therefore, T2 must be the first thread to successfully pass its wait() operation.
    2. T2 waits on S1. For T2 to proceed immediately, S1 must be initialized to 1.
    3. After printing 'B', T2 executes signal(S3). This increments S3 to 1, enabling T1 (which waits on S3) to run next and print 'C'.
    4. After printing 'C', T1 executes signal(S2). This increments S2 to 1, enabling T3 (which waits on S2) to run next and print 'A'.
    5. After printing 'A', T3 executes signal(S1), restoring S1 to 1 and resetting the system to its initial state for the next cycle.
    6. Thus, the required initialization is S1 = 1, S2 = 0, S3 = 0.

    Learning route:

    Step 1: Analyze the dependency chain from the desired output. Output "B C A" means T2 T1 T3.

    Step 2: Map this to semaphore signals. T2 must signal T1, so T2 signals the semaphore T1 waits on (S3). T1 must signal T3, so T1 signals the semaphore T3 waits on (S2). T3 must signal T2, so T3 signals the semaphore T2 waits on (S1).

    Step 3: Set initial values. The thread that starts the cycle (T2) must have its waiting semaphore (S1) initialized to 1. All other semaphores (S2, S3) must be 0 to prevent out-of-order execution.

    Step 4: Verify the cycle. T2 (S1=1 0) prints B, signals S3 (0 1). T1 (S3=1 0) prints C, signals S2 (0 1). T3 (S2=1 0) prints A, signals S1 (0 1). The cycle repeats perfectly.

    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.

    Correct Answer:

    ["A","D"]

    Step-by-Step Solution

    Insight: This is a conceptual deadlock properties question. It tests the precise definitions of Coffman conditions, RAG cycles, and safe/unsafe states.

    Exam route:

    1. Option A: Circular wait is one of the 4 necessary Coffman conditions. (TRUE)
    2. Option B: In a multi-instance system, a cycle in the Resource Allocation Graph (RAG) is necessary but NOT sufficient for deadlock. The option mentions "wait-for graph". A wait-for graph is typically only used for single-instance resources. If applied to multi-instance, a cycle does not guarantee deadlock. (FALSE)
    3. Option C: An unsafe state means deadlock is possible, not necessary. (FALSE)
    4. Option D: If every edge is an assignment edge, no process is waiting for any resource. Thus, no circular wait can exist. (TRUE)

    Learning route:

    Step 1: Evaluate Option A. The 4 Coffman conditions (Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait) must all hold for deadlock. Thus, circular wait is necessary.

    Step 2: Evaluate Option B. For multi-instance resources, a cycle in the RAG only indicates a possibility of deadlock. Wait-for graphs are generally defined for single-instance systems where cycle = deadlock.

    Step 3: Evaluate Option C. Safe state no deadlock. Unsafe state deadlock is possible, but not guaranteed (processes might not request their maximum).

    Step 4: Evaluate Option D. Assignment edges mean resources are held. If there are no request edges, no process is waiting, so deadlock is impossible.

    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

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is a reverse-engineering question. Given constraints on context switch sequences, deduce which burst time assignment is impossible. The key is to trace the Round Robin execution for each option and count the switches.

    Exam route: For each option, trace the Gantt chart with quantum=4. Count the number of each type of switch (S→Q, R→Q, Q→R, S→P). Check which option violates the constraints.

    Learning route:

    Step 1: Understand the constraints.

    • Exactly one S→Q switch.
    • Exactly one R→Q switch.
    • Exactly two Q→R switches.
    • No S→P switch.
    • Termination switches count.

    Step 2: Trace Option A: P=4, Q=10, R=6, S=2.

    • t=0-4: P runs 4. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=4-8: Q runs 4. Q rem=6. Queue: R,S,Q. Switch: Q→R.
    • t=8-12: R runs 4. R rem=2. Queue: S,Q,R. Switch: R→S.
    • t=12-14: S runs 2. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=14-18: Q runs 4. Q rem=2. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=18-20: R runs 2. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=20-22: Q runs 2. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 3: Trace Option B: P=2, Q=9, R=5, S=1.

    • t=0-2: P runs 2. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=2-6: Q runs 4. Q rem=5. Queue: R,S,Q. Switch: Q→R.
    • t=6-10: R runs 4. R rem=1. Queue: S,Q,R. Switch: R→S.
    • t=10-11: S runs 1. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=11-15: Q runs 4. Q rem=1. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=15-16: R runs 1. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=16-17: Q runs 1. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 4: Trace Option C: P=4, Q=12, R=5, S=4.

    • t=0-4: P runs 4. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=4-8: Q runs 4. Q rem=8. Queue: R,S,Q. Switch: Q→R.
    • t=8-12: R runs 4. R rem=1. Queue: S,Q,R. Switch: R→S.
    • t=12-16: S runs 4. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=16-20: Q runs 4. Q rem=4. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=20-21: R runs 1. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=21-25: Q runs 4. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 5: Trace Option D: P=3, Q=7, R=7, S=3.

    • t=0-3: P runs 3. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=3-7: Q runs 4. Q rem=3. Queue: R,S,Q. Switch: Q→R.
    • t=7-11: R runs 4. R rem=3. Queue: S,Q,R. Switch: R→S.
    • t=11-14: S runs 3. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=14-17: Q runs 3. Q finishes. Queue: R. Switch: Q→R. (2 Q→R)
    • t=17-20: R runs 3. R finishes. Queue: empty. Switch: R→end.
    • Counts: S→Q=1 ✓, R→Q=0 ✗ (need 1), Q→R=2 ✓, S→P=0 ✓.
    • R→Q is 0, but the constraint requires exactly 1. This is NOT possible.

    Final answer: D.

    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.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: A 2-attribute relation has so few possible non-trivial FDs that BCNF is guaranteed, because any single-attribute determinant that determines the other is automatically a superkey.

    Exam route: Enumerate all possible non-trivial FDs for R(A, B) and verify that the determinant is always a superkey.

    Learning route:

    Step 1: Recall BCNF definition. A relation is in BCNF if for every non-trivial FD X -> Y, X is a superkey.

    Step 2: Consider R(A, B) with only two attributes. The only possible non-trivial FDs are A -> B, B -> A, or both.

    Step 3: If A -> B holds, then A+ = AB, so A is a superkey. The FD satisfies BCNF.

    Step 4: If B -> A holds, then B+ = AB, so B is a superkey. BCNF holds.

    Step 5: If both hold, both A and B are superkeys. BCNF holds.

    Step 6: If neither holds, BCNF holds vacuously.

    Step 7: In all cases, BCNF holds. Option (A) is TRUE.

    Step 8: Check other options: (B) is FALSE (counterexample: R(A,B,C) with keys AB, BC and FD C->A; all prime, but C is not a superkey). (C) is FALSE (R(A,B) with A->B and B->A has no non-prime attributes). (D) is FALSE (BCNF decomposition may lose dependency preservation).

    Verification: The exhaustive case analysis for 2-attribute relations confirms that BCNF always holds.

    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.

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Insight: This is a relational division question, recognizable by the phrase "own all the brands", which is the classic "for-all" universal quantification pattern.

    Exam route: Identify the standard division operator form and its equivalent expansion using basic operators (Cartesian product and set difference).

    Learning route:

    Step 1: The goal is to find who own every present in the relation. This is exactly .

    Step 2: Option A is the direct division expression: . This is syntactically and logically correct.

    Step 3: Option B is the standard expansion of division using basic operators: Candidates Failures.

    • Candidates: (all employees who own at least one brand).
    • All possible pairs: .
    • Missing pairs: (All possible pairs) .
    • Failures (employees with missing pairs): (Missing pairs).
    • Result: Candidates Failures. This matches Option B exactly.

    Step 4: Option C divides by , which only contains brands that are actually owned by someone. If a brand exists in but is owned by no one, Option C would incorrectly ignore it, failing the "all brands" requirement.

    Step 5: Option D creates a Cartesian product of and , which generates spurious pairs not present in the actual relation, corrupting the division logic.

    Final Answer: Options A and B are correct.

    Question 21 · Databases · 2022 NAT

    Consider a relation with the following three functional dependencies.

    The number of superkeys in the relation is ____________.

    Correct Answer:

    8.00

    Step-by-Step Solution

    Insight: This is a superkey counting question. The fastest route is to find the single candidate key using the L-R-LR-N heuristic, then apply the formula .

    Exam route: Classify attributes, find the mandatory core, verify it's the only key, and compute .

    Learning route:

    Step 1: Identify the attributes and FDs. , FDs: , , .

    Step 2: Classify attributes using the L-R-LR-N heuristic.

    • L (Left only): A, B
    • R (Right only): D, E
    • LR (Both): C
    • N (Neither): None

    Step 3: The mandatory core for any candidate key is .

    Step 4: Compute the closure of the mandatory core: .

    • Start:
    • Apply :
    • Apply :
    • Apply :

    Since , is a candidate key.

    Step 5: Since the mandatory core already determines all attributes, there are no other candidate keys. (Any other key would have to contain , making it a superkey, not a minimal candidate key).

    Step 6: Count the superkeys. There is exactly 1 candidate key of size in a relation of size .

    Formula: Total Superkeys = .

    Verification: The 8 superkeys are all supersets of : , , , , , , , . The count is exactly 8.

    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.

    Correct Answer:

    5.00

    Step-by-Step Solution

    Insight: The closure of a set of items where no dot is immediately before a non-terminal is just the set itself. The GOTO operation then shifts the dot past the specified terminal and expands the closure.

    Exam route: Recognize that closure(I0) = I0. Filter for the '+' terminal, shift the dot, and count the resulting closure items.

    Learning route:

    1. Given I0 = {[S' -> S.], [S -> S.+R]}. Neither item has a dot immediately before a non-terminal, so CLOSURE(I0) = I0.
    2. We need GOTO(I0, +). Filter items in I0 with the dot before '+':
    • Only [S -> S . + R] matches.
    1. Shift the dot past '+':
    • [S -> S + . R]
    1. Compute CLOSURE of {[S -> S + . R]}. The dot is immediately before the non-terminal R, so we add all productions of R with the dot at the beginning:
    • [R -> . R * P]
    • [R -> . P]
    1. Now the dot is before P in [R -> . P], so we add all productions of P:
    • [P -> . (S)]
    • [P -> . id]
    1. The dot is before '(' in [P -> . (S)], which is a terminal. So we do NOT add productions of S.
    2. Total items:
    3. S -> S + . R
    4. R -> . R * P
    5. R -> . P
    6. P -> . (S)
    7. P -> . id

    Total = 5 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_____________.
    Correct Answer:

    80.00

    Step-by-Step Solution

    Insight: This is a synthesized attribute evaluation question with left-recursive grammar. The key is to build the unique parse tree dictated by the grammar and evaluate bottom-up.

    Exam route: Parse the string using the grammar's associativity rules, then compute values from leaves to root.

    Learning route:

    Grammar:

    • {S.val = S1.val * T.val} (Left-associative for #)
    • {S.val = T.val}
    • {T.val = T1.val / R.val} (Left-associative for %)
    • {T.val = R.val}
    • {R.val = id.val}

    Input: 20 # 10 % 5 # 8 % 2 % 2

    Since # is only produced by , and % is only produced by , the # operators must be at higher levels in the parse tree than % operators. The string is uniquely parsed as:

    Where derives "20 # 10 % 5" and derives "8 % 2 % 2".

    Further parsing of :

    (val = 20)

    (val = 10 / 5 = 2)

    .

    Further parsing of (right side):

    (val = 8 / 2 = 4)

    (val = 2)

    .

    Final computation:

    .

    Verification: The grammar enforces left associativity for both # and %. The parse tree is unique. The arithmetic is straightforward: ((20 (10/5)) ((8/2)/2)) = (20 2) (4/2) = 40 * 2 = 80.

    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
    Correct Answer:

    B

    Step-by-Step Solution

    Insight: A 5-letter palindrome requires exactly one letter to appear an odd number of times (the middle letter) and all other letters to appear an even number of times (as symmetric pairs).

    Exam route: Count the frequency of each letter in the combined set (given plates + option plates).

    • Given: A, D.
    • Option A adds D, D, J Total: A(1), D(3), J(1). Three odd counts. Invalid.
    • Option B adds R, A, R Total: A(2), D(1), R(2). Exactly one odd count (D). Valid (forms RADAR).
    • Option C adds Z, E, D Total: A(1), D(2), Z(1), E(1). Three odd counts. Invalid.
    • Option D adds I, L, Y Total: A(1), D(1), I(1), L(1), Y(1). Five odd counts. Invalid.

    Learning route:

    1. Understand the palindrome constraint: For a word of odd length , the character frequencies must consist of exactly one character with an odd count, and characters with even counts.
    2. Tally the given plates: We start with one 'A' and one 'D'.
    3. Evaluate Option B: Adding 'R', 'A', 'R' gives us two 'A's, two 'R's, and one 'D'.
    4. Construct the word: Place the odd-count letter 'D' in the center (position 3). Place the pairs 'A' and 'R' symmetrically at positions (1,5) and (2,4). This yields "RADAR", which reads the same forwards and backwards. The spatial rotation mentioned in the prompt is a permissible transformation that does not change the letter's identity, only its physical orientation on the table.
    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.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is an asymptotic verification question. To determine if a statement holds for "all positive functions", we must test it against different function classes: polynomials, exponentials, and decreasing functions.

    Exam route:

    1. Test Option A: Let (a polynomial). Then and . The ratio is exactly 1, so . This holds for all positive polynomials.
    2. Test Option B: Let . Then and . The ratio is 1, not 0. Thus, .
    3. Test Option C: Let (an exponential). Then and . The ratio is . Thus, .
    4. Test Option D: Let (a positive decreasing function). Then and . The ratio is . Thus, .

    Learning route:

    The statement must be universally true for the specified class of functions.

    For Option A, any positive polynomial (with ) has the property that is dominated by and is dominated by . Since both are , their ratio approaches a non-zero constant (), proving .

    Options B, C, and D fail because they make universal claims that are easily broken by choosing a specific counterexample from a different function class.

    Answer: A

    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

    Insight: Distinct edge weights guarantee a unique MST, and Kruskal's algorithm rejects an edge only if it forms a cycle with strictly lighter edges.

    Exam route: Since weights are distinct, the MST is unique (D is false). e1 and e2 can form at most one cycle, rejecting at most one of e3 or e4, so at least one must be in the MST (B is true). e2 cannot form a cycle with e1 alone (A is true). The minimum weight edge crossing any cut is always in the MST (C is true). Select A, B, C.

    Learning route:

    Step 1: Analyze the distinct weights condition. Since all edge weights are distinct, the Minimum Spanning Tree (MST) of the graph is strictly unique. There are no ties to break. This immediately makes statement D ("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 accepted into the MST. The only edges lighter than and 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 (the one closing the triangle).

    Step 5: Since and can only cause the rejection of at most one edge, 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. Statement C describes exactly the Cut Property: the minimum weight edge crossing any cut is always safe and belongs to the MST. Statement C is TRUE.

    Tempting wrong path: Assuming that because and are in the MST, they might somehow block both and . This fails because two edges can only close one specific cycle, leaving the other edge free to be added.

    Verification: If and , they form a path . Only the edge can form a cycle with them. If , it is rejected, but will be accepted. If , both and are accepted. In all cases, at least one is accepted.

    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