GATE / CS ARCHIVE

PAPER / ORIGINAL ORDER

GATE 2011

65 questions

Paper analysis: marks by subject, top topics and repeated questions →

03:00:00
1 mark · MCQ
Report issue

Meaning of inexplicable

Vocabulary & Verbal Analogies

Question 56, GATE 2011: Which option is closest in meaning to 'Inexplicable'?

(A) Incomprehensible
(B) Indelible
(C) Inextricable
(D) Infallible
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Inexplicable describes something that cannot be explained or understood. Incomprehensible is the closest supplied synonym, A; the other words concern permanence, entanglement or inability to err.

Break down the alternatives by meaning. 'Indelible' means impossible to remove or erase, 'inextricable' means impossible to disentangle or escape, and 'infallible' means incapable of error. 'Incomprehensible' means impossible to understand, so it is nearest to something that cannot be explained. The question asks for the closest supplied synonym, not an assertion that the words are interchangeable in every sentence; that is why a shared negative prefix alone is not enough.

Original paper, page 16 · Answer key

1 mark · MCQ
Report issue

Logarithmic proportionality

Algebra, Equations & Number Patterns

Question 57, GATE 2011: If log(P)=(1/2)log(Q)=(1/3)log(R), which relation is guaranteed? Use positive arguments and the same valid logarithm base.

(A) P²=Q³R²
(B) Q²=PR
(C) Q²=R³P
(D) R=P²Q²
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Put log P=t. Then log Q=2t and log R=3t. Thus log(Q²)=4t=log(PR), so Q²=PR, B, for positive arguments and a common valid logarithm base. This is the relation guaranteed for every allowed t; special values such as P=Q=R=1 may also satisfy other displayed equations.

Equivalently, the equalities imply Q=P² and R=P³. Substituting into each candidate gives A: P²=P12, B: P4=P4, C: P4=P10, and D: P³=P6. Only B is an identity for arbitrary positive P. Taking logarithms of products requires the common valid base and positive quantities. Accidental equalities at P=1 do not make the other options consequences for all values satisfying the premise.

Original paper, page 16 · Answer key

1 mark · MCQ
Report issue

Gerund after contemplate

English Grammar & Usage

Question 58, GATE 2011: Complete: 'I contemplated _____ Singapore for my vacation but decided against it.'

(A) to visit
(B) having to visit
(C) visiting
(D) for a visit
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Contemplate normally takes a noun or gerund complement. I contemplated visiting Singapore is the natural construction, C; having to visit changes the intended meaning to an obligation.

The missing phrase is the direct complement of 'contemplated', meaning considered doing something. The gerund 'visiting' serves as that complement and retains the idea of a possible vacation. 'To visit' is not the standard complement here; 'for a visit' lacks the normal construction connecting the destination. 'Having to visit' can be grammatical but introduces necessity or obligation, which is not the intended meaning of choosing a vacation and deciding against it.

Original paper, page 16 · Answer key

1 mark · MCQ
Report issue

Parallel descriptive adjectives

Vocabulary & Verbal Analogies

Question 59, GATE 2011: Complete: 'If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or _____. '

(A) hyperbolic
(B) restrained
(C) argumentative
(D) indifferent
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Restrained is closest in sense to understated and tentative, continuing the sentence’s contrast with making a strong impression. Hence B is the most appropriate choice in context.

The list gives subdued styles that work against a strong impression. 'Restrained' means controlled or held back and therefore fits with 'understated' and 'tentative'. 'Hyperbolic' means exaggerated and is nearly the opposite stylistic direction; 'argumentative' emphasizes disputation rather than reserve. 'Indifferent' refers to lack of interest, not specifically restrained presentation. The parallel meaning of the neighboring adjectives makes B the closest contextual completion.

Original paper, page 16 · Answer key

1 mark · MCQ
Report issue

Antonym of amalgamate

Vocabulary & Verbal Analogies

Question 60, GATE 2011: Which word is most nearly opposite in meaning to 'Amalgamate'?

(A) merge
(B) split
(C) collect
(D) separate
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: D, with overlapping alternative B

Amalgamate means combine or unite, so separate is a direct opposite, matching official D. However split also means divide into parts and can oppose amalgamate. Without further context the lexical distinction does not uniquely exclude B. Retain the official choice while disclosing this overlapping-antonym ambiguity.

Merge and collect point toward bringing things together, so they are poor opposites. Both splitting a whole and separating combined parts move in the opposite direction from amalgamation. The archived official key chooses D, and 'separate' provides a broad direct contrast with 'combine'. A sound explanation should preserve that official selection while acknowledging that ordinary usage also permits 'split' as an antonym; no additional context in this question decisively resolves that lexical overlap.

Original paper, page 16 · Answer key

2 marks · MCQ
Report issue

Scope of a bereavement unit

Reading Comprehension & Verbal Reasoning

Question 61, GATE 2011: Passage: 'Few school curricula include a unit on how to deal with bereavement and grief, and yet all students at some point in their lives suffer from losses through death and parting.' Which topic would NOT be included in such a unit?

(A) How to write a letter of condolence
(B) Emotional stages in the healing process
(C) The leading causes of death
(D) How to support a grieving friend
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Writing condolences, understanding emotional recovery and supporting a grieving friend all address responding to loss. Leading causes of death concerns mortality statistics or medicine rather than bereavement support. Thus C is the intended topic outside the unit.

Identify the passage's organizing purpose: helping students cope with the emotional and social consequences of loss. Condolence letters, emotional recovery and support for a friend all equip someone to respond to bereavement. A statistical or medical account of what causes death addresses a different question, even though death is related to grief. Topic-selection questions require relevance to the stated purpose, not just the occurrence of a related word in a possible lesson.

Original paper, page 16 · Answer key

2 marks · MCQ
Report issue

Microbe danger from dose and growth

Data Interpretation & Logical Reasoning

Question 62, GATE 2011: A plot compares dangerous microbes P,Q,R,S. Circle area represents 24-hour growth after surviving immunity. The x-axis is potency (probability of overcoming immunity); the y-axis is labeled toxicity and measures milligrams of microbe required to destroy half the body mass in kilograms. Data (potency,plotted dose,circle diameter in mm) are P=(0.4,800,50), Q=(0.5,600,40), R=(0.4,300,30), S=(0.8,200,20). Danger is said to vary proportionately with toxicity, potency and growth. Which microbe should be targeted first as most dangerous?

(A) P
(B) Q
(C) R
(D) S
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: D under inverse-dose toxicity model

Growth is proportional to circle area and hence diameter squared. The vertical axis is the dose needed to cause the stated harm, so greater toxicity corresponds to a smaller dose. Using danger proportional to potency×diameter²/dose gives P=.4×2500/800=1.25, Q=.5×1600/600=4/3, R=.4×900/300=1.2 and S=.8×400/200=1.6. S is largest, D. This requires treating the plotted dose as an inverse measure of toxicity, not multiplying by its numeric axis value. Direct multiplication would instead rank P first; the plot’s toxicity label and prose are imprecise about that distinction.

Use circle area πd²/4, not diameter d, for growth. The common π/4 factor cancels when comparing microbes, so it need not be calculated. Lower required harmful dose indicates greater toxicity, hence the inverse-dose interpretation produces scores 1.25,1.333...,1.2,1.6 and ranks S>Q>P>R. This is not simply choosing the largest bubble or the highest point. Because the source calls the vertical dose itself 'toxicity', the intended inverse interpretation must be disclosed rather than silently treated as a literal multiplication of all plotted coordinates.

Original paper, page 17 · Answer key

2 marks · MCQ
Report issue

Minimum variable-plus-fixed cost

Algebra, Equations & Number Patterns

Question 63, GATE 2011: For production quantity q, variable cost V=4q and the stated fixed cost F=100/q. How many units minimize V+F?

(A) 5
(B) 4
(C) 7
(D) 6
Tap to enlarge
Your answer
Answer & solution

Official answer: A

For q>0, total cost=4q+100/q≥2√400=40 by AM–GM. Equality holds when 4q=100/q, or q²=25. Thus q=5 minimizes the cost, A, and is also an allowed integer quantity.

A calculus check gives C'(q)=4-100/q², which is zero at the positive q=5. Also C''(q)=200/q³>0 for q>0, so the stationary point is a strict minimum. The objective tends to infinity as q approaches zero from above or grows without bound, confirming a global minimum. Directly, C(4)=41, C(5)=40, C(6)=40.666..., C(7)≈42.286, consistent with the chosen integer option. Use the supplied inverse-q formula despite the unusual 'fixed cost' terminology.

Original paper, page 17 · Answer key

2 marks · MCQ
Report issue

Trucks required to clear backlog

Time, Work, Speed & Distance

Question 64, GATE 2011: A transporter receives the same amount of new orders daily and starts with a backlog. Seven trucks clear everything by the end of day 4; three trucks clear everything by the end of day 10. What is the minimum whole number of trucks needed to clear everything by the end of day 5?

(A) 4
(B) 5
(C) 6
(D) 7
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Measure work in truck-days. Let backlog b and new daily demand d. Then b+4d=28 and b+10d=30, giving d=1/3 and b=80/3. Five days require b+5d=85/3 truck-days, or 17/3 trucks per day. The smallest integer fleet is 6, C.

One truck-day is the amount one truck can ship in a day; assume identical constant-capacity trucks. The two scenarios use 28 and 30 truck-days, and their difference of 2 represents six additional days of incoming orders. For a five-day deadline the required daily fleet size is 17/3≈5.667. Five trucks provide only 25 truck-days, below 85/3; six provide 30, enough. Rounding down would leave a backlog, so the ceiling is mandatory.

Original paper, page 17 · Answer key

2 marks · MCQ
Report issue

Repeated dilution

Arithmetic, Ratios & Percentages

Question 65, GATE 2011: A container initially holds 10 litres of pure spirit. Remove 1 litre and replace it with water. Then remove 1 litre of the well-mixed contents and replace it with water, and repeat that operation once more. How many litres of spirit remain?

(A) 7.58
(B) 7.84
(C) 7
(D) 7.29
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Each well-mixed replacement removes one tenth of the spirit currently present. There are three replacements in total, so the remaining spirit is 10(9/10)3=7.29 litres, D.

Track the spirit concentration after each replacement. First 9 litres remain out of 10. The next litre removed contains 0.9 litre spirit, leaving 8.1; after refilling, the third litre removed contains 0.81 litre spirit, leaving 7.29. Water restores total volume to 10 each time but does not restore spirit. Subtracting three litres of spirit would incorrectly assume all three withdrawals were pure spirit; the later withdrawals are diluted mixtures.

Original paper, page 17 · Answer key

1 mark · MCQ
Report issue

Compiler keyword recognition

Lexical Analysis

Question 1, GATE 2011: In a compiler, during which phase are language keywords recognized?

(A) Parsing the program
(B) Code generation
(C) Lexical analysis
(D) Dataflow analysis
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Lexical analysis groups source characters into tokens and recognizes reserved keywords, often by distinguishing them from identifier tokens using a keyword table. This precedes parsing, so C.

A scanner first isolates a lexeme such as 'while'. It then returns the reserved token WHILE rather than an ordinary identifier token. A parser consumes that token to determine grammatical structure. Code generation emits target instructions after the program has been analyzed, while dataflow analysis studies facts such as reaching definitions. These later tasks cannot be the first point at which the keyword token is recognized.

Original paper, page 2 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Layer-four firewall limitation

Network Security

Question 2, GATE 2011: A layer-4 firewall can inspect all protocol headers up to the transport layer. Which action can it NOT perform?

(A) Block all HTTP traffic between 9:00 PM and 5:00 AM
(B) Block all ICMP traffic
(C) Block incoming traffic from a specific IP address but allow outgoing traffic to that address
(D) Block TCP traffic from a specific user on a multi-user system between 9:00 PM and 5:00 AM
Tap to enlarge
Your answer
Answer & solution

Official answer: D

IP addresses, protocol numbers and transport ports are present in network/transport headers, allowing conventional address, protocol and port-based time rules. A particular logged-in user on a shared machine is not identified by these headers, so a layer-four firewall alone cannot implement D. The HTTP option assumes the conventional known service ports, rather than universal application identification on arbitrary ports.

Separate the information needed for each rule from the information available in a packet. A time rule can consult the firewall's clock; an IP rule can inspect the source/destination address; ICMP is identified by the network protocol field. A TCP segment identifies ports and endpoints, not which operating-system user owns its connection. Enforcing that last distinction needs additional identity information, such as a host agent or authenticated application proxy.

Original paper, page 2 · Answer key

1 mark · MCQ
Report issue

Two coins conditioned on a head

Probability & Random Variables

Question 3, GATE 2011: Two fair coins are flipped. Given that at least one outcome is a head, what is the probability that both outcomes are heads?

(A) 1/3
(B) 1/4
(C) 1/2
(D) 2/3
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Condition on the event at least one head. For independent fair coins the remaining equally likely outcomes are HH, HT, TH. Exactly one has two heads, so the conditional probability is 1/3, A. This is event conditioning, not a different reporting protocol that selects one coin to reveal.

Before conditioning, HH, HT, TH and TT each have probability 1/4. The given event removes TT, leaving event probability 3/4. The desired intersection is simply HH, of probability 1/4. Hence P(HH given at least one H)=(1/4)/(3/4). Do not collapse HT and TH into one equally weighted case: they are two different outcomes and together have twice the probability of HH.

Original paper, page 2 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Email application protocols

Application Protocols

Question 4, GATE 2011: Match email activities to application protocols: m1 sends email from a mail client to a mail server; m2 downloads email from a mailbox server to a mail client; m3 checks email using a web browser.

(A) m1 HTTP; m2 SMTP; m3 POP
(B) m1 SMTP; m2 FTP; m3 HTTP
(C) m1 SMTP; m2 POP; m3 HTTP
(D) m1 POP; m2 SMTP; m3 IMAP
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Mail submission uses SMTP; downloading from a mailbox in the listed mapping uses POP; browser-based access uses HTTP. Therefore C. IMAP is another mail-access protocol, but it is not the correct mapping of the supplied alternatives.

Follow the direction and interface of each operation rather than treating all email traffic as one protocol. SMTP transfers outgoing messages to the mail infrastructure. POP retrieves stored mailbox messages. In webmail, the browser communicates with a web server over HTTP, even though that server may use other mail protocols behind the scenes. In B, FTP is a file-transfer protocol, not the specified mailbox retrieval protocol; A and D reverse the submission/retrieval roles.

Original paper, page 2 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Equal development and maintenance costs

Software Engineering

Question 5, GATE 2011: Software can be developed in L1 or L2. L2 needs twice as many lines of code as L1. For either language development effort is LOC/10000 man-years. Development cost per man-year is Rs 1000000 for L1 and Rs 750000 for L2. Maintenance lasts five years, at Rs 100000 per year for L1 and Rs 50000 per year for L2. For what L1 LOC do total development plus maintenance costs agree?

(A) 4000
(B) 5000
(C) 4333
(D) 4667
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Let L1 require x lines and L2 require 2x. Their development costs are 100x and 150x rupees, respectively. Five-year maintenance costs are 500000 and 250000. Equating100x+500000=150x+250000 gives x=5000, B.

The LOC-to-effort conversion must be done separately for each language: x/10000 man-years for L1 versus 2x/10000 for L2. Multiplying by their respective annual development rates produces 100x and 150x. L2 is dearer to develop by 50x but cheaper to maintain by Rs 250000 over five years. Equality therefore occurs when that extra development cost exactly cancels the maintenance saving. At x=5000 both totals are Rs 1000000.

Original paper, page 2 · Answer key

1 mark · MCQ
Report issue

Mode-switch and process-switch overhead

Processes, Threads & System Calls

Question 6, GATE 2011: Let t1 be the time to switch between user and kernel execution modes, and t2 the time to switch between two processes. Which comparison is intended to hold?

(A) t1 > t2
(B) t1 = t2
(C) t1 < t2
(D) Nothing can be said about their relation
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C in the conventional OS model

A user/kernel mode switch changes privilege and performs the associated entry/exit bookkeeping without necessarily changing the current process. A process context switch additionally saves/restores execution context and changes scheduling/address-space state. In the conventional comparison this costs more, giving t1<t2, C. It is an architectural cost-model comparison, not a hardware-independent numerical law for arbitrary implementations.

A system call can enter the kernel, do work for the same process, and return without scheduling another process. In a full context switch, the OS must preserve enough state to resume one process later and load another process's state; address-space switching may also entail translation/cache overhead. Thus a mode switch is conceptually a smaller operation. The question supplies no timings from which a numerical ratio could be calculated, only this conventional ordering.

Original paper, page 2 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Basic COCOMO effort

Software Engineering

Question 7, GATE 2011: Digital-signal-processing software is expected to contain 40000 lines of code. In basic COCOMO, the multiplicative effort factor is 2.8 and the exponent is 1.20. Estimate development effort in person-months.

(A) 234.25
(B) 932.50
(C) 287.80
(D) 122.40
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The basic effort formula is a(KLOC)b. Here KLOC=40000/1000=40, so effort=2.8×401.20≈234.23 person-months, approximately the listed 234.25, A.

COCOMO uses thousands of lines, not raw LOC, as its size input. Substituting 40000 directly would overestimate effort by a factor 10001.2. With the correct input, 401.2=40×400.2≈83.65, and multiplying by 2.8 gives about 234.2. Person-months measure total labor effort, not elapsed calendar months: assigning several people does not make this a schedule estimate without an additional scheduling model.

Original paper, page 3 · Answer key

1 mark · MCQ
Report issue

Determinism and language expressive power

Other / Mixed Topics

Question 8, GATE 2011: Which pair of computational models has DIFFERENT expressive power?

(A) DFA and NFA
(B) Deterministic PDA and nondeterministic PDA
(C) Deterministic single-tape Turing machine and nondeterministic single-tape Turing machine
(D) Single-tape and multitape Turing machines
Tap to enlarge
Your answer
Answer & solution

Official answer: B

DFA and NFA recognize exactly the regular languages. Deterministic/nondeterministic and single/multitape Turing machines recognize the same class, though their efficiencies can differ. DPDAs recognize only deterministic CFLs, a proper subclass of the CFLs recognized by NPDAs. Hence B.

Expressive power asks which languages can be recognized, not how many states are needed or how fast a simulation runs. Subset construction turns an NFA into a DFA, possibly increasing its size. Turing machines can simulate nondeterministic branches by systematic exploration and can simulate extra tapes. A single stack plus deterministic choices is more restrictive: some context-free languages require the nondeterministic choice of how to parse or where to change phases.

Original paper, page 3 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Capabilities of pure HTML

Web Technologies

Question 9, GATE 2011: Which action is NOT supported by pure HTML pages, without server-side or client-side scripting?

(A) Embed web objects from different sites in one page
(B) Automatically refresh a page after a specified interval
(C) Automatically redirect to another page upon download
(D) Display the client's current time as part of the page
Tap to enlarge
Your answer
Answer & solution

Official answer: D

HTML can embed remote objects and use refresh metadata for timed refresh or redirection. It has no mechanism by itself to read and display the client’s current clock time. That normally requires scripting or another active component, so D.

A static timestamp written into HTML is not the client's current time. Remote image/object URLs satisfy A, and a refresh directive can reload a document or navigate to a specified URL, satisfying B and C in the intended browser model. Reading the local clock and inserting its live value requires computation beyond HTML markup, for example JavaScript Date and DOM updates. That distinction between document description and active computation selects D.

Original paper, page 3 · Answer key

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Requirements versus implementation design

Software Engineering

Question 10, GATE 2011: Which item is NOT desired in a good Software Requirements Specification document?

(A) Functional requirements
(B) Non-functional requirements
(C) Goals of implementation
(D) Algorithms for software implementation
Tap to enlarge
Your answer
Answer & solution

Official answer: D

An SRS specifies required behavior, quality constraints and goals. Particular algorithms for implementing those requirements belong to design/implementation, not the requirements specification itself. Thus D.

Functional requirements describe what services the system must provide. Non-functional requirements describe qualities or constraints, such as response time or reliability. Goals clarify the intended outcome. Choosing a sorting algorithm or a particular implementation procedure generally prescribes how to build the system, so it belongs in design rather than the requested requirements specification. This is the standard separation tested here, not a claim that a real contract can never impose an implementation constraint.

Original paper, page 3 · Answer key

1 mark · MCQ
Report issue

Priority of an overheating interrupt

Input/Output, DMA & Interrupts

Question 11, GATE 2011: A computer receives interrupts on excessive CPU temperature, mouse movement/button events, keyboard key press/release, and completed disk reads. Which should have the highest priority?

(A) Hard disk
(B) Mouse
(C) Keyboard
(D) CPU temperature sensor
Tap to enlarge
Your answer
Answer & solution

Official answer: D

An excessive CPU temperature can imminently damage hardware or invalidate operation, so the intended protective interrupt priority places it above routine disk, mouse and keyboard events. Thus D under the stated safety-oriented priority policy.

Priority is about the urgency and consequences of delaying service, not how frequently an event occurs. A mouse or keyboard event can ordinarily wait briefly without permanent harm; a completed disk read is also routine. An overtemperature condition needs immediate protective handling, such as throttling or shutting down, to prevent damage. Hence the temperature sensor is the intended highest-priority source, rather than whichever input device generates the most interrupts.

Original paper, page 3 · Answer key

1 mark · MCQ
Report issue

Candidate key with joint bank accounts

Functional Dependencies & Keys

Question 12, GATE 2011: A student table has one row per registered student: Registration_Num is unique per student; UID is nationally unique per citizen; BankAccount_Num stores a primary account, and students may have multiple or joint accounts; Name is the student's name; Hostel_Room is the room number. Which statement is INCORRECT?

(A) BankAccount_Num is a candidate key
(B) Registration_Num can be a primary key
(C) UID is a candidate key if all students are from the same country
(D) If S is a superkey and S intersect UID is NULL, S union UID is also a superkey
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Joint accounts allow two students to have the same primary BankAccount_Num, so it need not uniquely identify a student and is not guaranteed to be a candidate key. Registration numbers are unique; a national UID is unique under the stated same-country assumption; adding an attribute to a superkey preserves uniqueness. Therefore A is incorrect. NULL in the set expression is understood as empty intersection, not SQL NULL.

A candidate key must uniquely identify rows and be minimal for that purpose. A unique account number uniquely identifies a bank account, but the table stores students: joint holders can legitimately repeat the account number across student rows. Conversely, unique registration numbers identify students directly. In D, the extra UID attribute cannot create a collision between rows already distinguished by S; minimality may be lost, but superkey status is preserved.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Circuit not equivalent to XNOR

Boolean Algebra & Logic Gates

Question 13, GATE 2011: Which circuit is NOT equivalent to a two-input XNOR? Let the upper and lower inputs be x and y. The structural descriptions below replace the source gate drawings; NOT, AND, OR and XOR denote gates.

(A) XOR(x,y) followed by NOT
(B) NOT both inputs, feed them to XOR, then NOT its output
(C) NOT x, then XOR with y
(D) Invert y to y'; feed x and y' to an AND followed by NOT and also to an OR; AND those two outputs and then invert
Tap to enlarge
Your answer
Answer & solution

Official answer: D

A complements XOR. B complements both XOR inputs and then its output, also producing XNOR. C complements exactly one XOR input, again XNOR. In D, let top input be x and lower input y. The inner branches are (xy′)′ and x+y′; the final NAND gives [(xy′)′(x+y′)]′, which is the complement of XOR(x, y′), hence XOR(x, y). Thus D is not XNOR. The wire bridge was checked in the source.

A truth-table check makes the distinction explicit. XNOR has outputs 1,0,0,1 for inputs 00,01,10,11. Inverting both XOR inputs leaves XOR unchanged, whereas inverting exactly one input complements XOR, explaining A through C. For D, write u=x and v=y'. The product (uv)'(u+v) equals u XOR v. The final inversion yields NOT(x XOR y')=x XOR y, whose outputs are 0,1,1,0, the opposite of the target.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Simplifying product of sums

Logic Minimization & Karnaugh Maps

Question 14, GATE 2011: Find the simplified sum-of-products form of (P+Q'+R')(P+Q'+R)(P+Q+R'), where + is OR, juxtaposition is AND, and ' denotes complement.

(A) P'Q+R'
(B) P+Q'R'
(C) P'Q+R
(D) PQ+R
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (10 steps)

Using (P+A)(P+B)=P+AB, the product becomes P+(Q′+R′)(Q′+R)(Q+R′). The first two residual factors reduce to Q′. Then Q′(Q+R′)=Q′R′, yielding P+Q′R′, B.

First combine the first two factors by taking their common term X=P+Q': (X+R')(X+R)=X+R'R=X. The remaining product is (P+Q')(P+Q+R'). Apply the same common-term identity with common P to obtain P+Q'(Q+R')=P+Q'R'. This two-stage simplification avoids a long expansion of all eight products and makes the absorption of Q'Q=0 explicit.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Flip-flops for modulus258

Counters & Timing

Question 15, GATE 2011: What is the minimum number of D flip-flops needed for a modulo-258 counter?

(A) 9
(B) 8
(C) 512
(D) 258
Tap to enlarge
Your answer
Answer & solution

Official answer: A

k flip-flops provide at most 2k states. Since28=256<258≤512=29, at least 9 are needed; a 9-bit counter with suitable reset logic suffices. Hence A.

A modulo-m counter needs m distinct states before repeating. Each flip-flop stores one binary bit, so k of them encode at most 2k different combinations. Taking a ceiling gives k=ceil(log2 258)=9. The 9-bit device has extra possible combinations, but logic can reset or redirect the sequence after 258 states. Options 258 and 512 confuse the number of states with the number of storage bits.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Per-thread versus per-process state

Processes, Threads & System Calls

Question 16, GATE 2011: Threads are called lightweight processes because the OS maintains smaller structures for a thread than a process. Which statement is TRUE?

(A) Per thread, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) Per thread, the OS does not maintain virtual-memory state
(D) Per thread, the OS maintains only scheduling and accounting information
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Threads of one process share its virtual address space, so virtual-memory mappings are maintained at process level rather than separately for each thread. Each thread still needs its own register context, stack and scheduling information. Therefore C.

Independent execution requires each thread to remember its own instruction pointer and registers, and its own stack holds function calls and local execution state. The scheduler also tracks the thread's run/block status. Those facts refute A, B and D: none of the single listed items is the whole thread context, and stacks are not omitted. Virtual-memory mappings, however, describe the shared process address space, which is why C identifies the saving.

Original paper, page 4 · Answer key

1 mark · MCQ
Report issue

Planarity of tetrahedron and cube graphs

Graph Theory

Question 17, GATE 2011: K4 is the complete graph on four vertices (the source draws a square with both diagonals). Q3 is the eight-vertex cube graph, with vertices the binary triples and an edge when triples differ in one bit. Which statement is TRUE?

(A) K4 is planar but Q3 is not
(B) Both K4 and Q3 are planar
(C) Q3 is planar while K3 is not (the source prints K3 here)
(D) Neither K4 nor Q3 is planar
Tap to enlarge
Your answer
Answer & solution

Official answer: B

K4 has a planar embedding as a triangle with the fourth vertex inside joined to all three corners. Q3 has an embedding as nested squares joined at corresponding corners. Crossings in one drawing do not imply nonplanarity. Both graphs are planar, B.

Planarity is the existence of some drawing without edge crossings, not a property of one particular drawing. For K4, keep three vertices on an outer triangle and place the fourth inside; its three interior spokes do not cross. For Q3, draw one square inside another and join corresponding corners without crossings. These are explicit crossing-free embeddings. The source's K3 typo in C does not alter the correct B: K3 itself is also planar.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Nonnegative variance

Probability & Random Variables

Question 18, GATE 2011: For a random variable with finite second moment, write R=E[X²]-(E[X])². Which is always true?

(A) R=0
(B) R<0
(C) R≥0
(D) R>0
Tap to enlarge
Your answer
Answer & solution

Official answer: C

R=E[X²]−(E[X])²=E[(X−E[X])²]≥0 whenever the moments exist. A constant random variable attains 0, so strict positivity is not guaranteed. Thus C.

Expand the square: E[(X-μ)²]=E[X²]-2μE[X]+μ²=E[X²]-μ², using μ=E[X]. Every squared deviation is nonnegative, and an expectation preserves nonnegativity. If X is always 5, R=25-25=0; if X is equally likely 0 or 1, R=1/2-1/4=1/4. These examples exclude both the claim that R is always zero and the claim that it is always strictly positive.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Automaton model for lexical analysis

Lexical Analysis

Question 19, GATE 2011: Which machine model has the necessary and sufficient power for conventional lexical analysis of a modern language such as Java?

(A) Finite-state automaton
(B) Deterministic pushdown automaton
(C) Nondeterministic pushdown automaton
(D) Turing machine
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Conventional token categories such as identifiers, keywords and numeric literals are specified by regular patterns. Finite-state automata suffice to recognize them; pushdown or Turing power is unnecessary for this lexical task. Hence A, distinguished from parsing nested syntax.

A lexical analyzer needs only a finite summary of a token prefix: for example, whether it has begun an identifier, is inside a number, or has just seen an exponent sign. A regular expression for a token can be converted to an NFA and then a DFA. Nested grammatical structure, such as matching arbitrary levels of parentheses, is handled later by parsing. Stronger machines could perform lexical recognition too, but their extra power is not necessary.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Effective memory time with rare page faults

Virtual Memory & Paging

Question 20, GATE 2011: Memory access takes 20 ns on average, a page fault takes 10 ms to service, and one page fault occurs per 10^6 memory accesses. Find the effective access time.

(A) 21 ns
(B) 30 ns
(C) 23 ns
(D) 35 ns
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The fault probability is 10−6 and 10ms=107 ns. Average fault overhead contributes 10 ns per access, in addition to the 20 ns memory time, giving approximately 30 ns, B. If fault service is taken as a replacement rather than added time, the weighted result 29.99998 ns has the same rounded answer.

Convert all units before averaging: 1 ms=106 ns, so the fault penalty is ten million nanoseconds. Although the event is rare, multiplying that large penalty by 1/1000000 adds 10 ns to the average. This is half the normal access time, so ignoring faults because they are rare would be a large relative error. Conversely, adding the full 10 ms to every access would wrongly assume every reference faults.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Base-plus-displacement addressing

Instructions & Addressing Modes

Question 21, GATE 2011: The instruction LW R1,20(R2) loads a 32-bit memory word into R1. Its effective address is 20 plus the contents of R2. Which listed addressing mode best describes the memory operand?

(A) Immediate addressing
(B) Register addressing
(C) Register indirect scaled addressing
(D) Base indexed addressing
Tap to enlarge
Your answer
Answer & solution

Official answer: D

The effective address is the content of R2 plus the displacement 20. The memory operand is neither the literal 20 nor a register value, and no scale factor is applied. Among the options this is called base indexed addressing, D; base-plus-displacement is a more precise description.

The operation can be written R1←Memory[R2+20]. Immediate addressing would use 20 itself as data; register addressing would take the operand directly from a register. Scaled indexing would multiply an index by an element size, which is absent here. Thus the listed base-indexed choice is the closest match. The memory word being 32 bits affects the load size, not the formula used to locate that word.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Pointer arithmetic in string output

Pointers & Memory

Question 22, GATE 2011: What does this literal C fragment print? The initial capital in Char is as printed.
Char c[] = "GATE2011";
char *p = c;
printf("%s", p + p[3] - p[1]);

(A) GATE2011
(B) E2011
(C) 2011
(D) 011
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C only under intended offset arithmetic; literal C is not well-defined

Using ASCII arithmetic, E−A=4, so the intended pointer is c+4 and the intended suffix is 2011, C. But p+p[3]−p[1] associates as (p+p[3])−p[1]. Its first pointer operation forms p+69 in ASCII, far beyond the 9-byte array, causing undefined behavior before the subtraction returns to offset 4. The source also capitalizes Char, which is not the C keyword char unless separately defined. Replacing Char with char and writing p+(p[3]−p[1]) repairs the intended calculation, still with an explicit character-encoding assumption. The official result is not a guarantee of the literal fragment.

Index the intended string: c[0]='G', c[1]='A', c[2]='T', c[3]='E', c[4]='2', c[5]='0', c[6]='1', c[7]='1', c[8]='\0'. A valid pointer to c[4] makes %s print characters until c[8], producing 2011. This explains the examiner's arithmetic but must not erase the separate language-law issues in the literal source. Pointer arithmetic has validity requirements at every intermediate operation, not only at the final address.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

Recognizing a max-heap

Heaps & Priority Queues

Question 23, GATE 2011: Which drawn binary tree is a max-heap? Below each node is specified as value:(left child,right child), with '-' for a missing child.

(A) 10:(8,6), 8:(4,-), 6:(5,2), 5:(1,-); remaining nodes are leaves
(B) 10:(8,6), 8:(4,5), 6:(1,2); remaining nodes are leaves
(C) 10:(5,6), 5:(4,8), 6:(2,1); remaining nodes are leaves
(D) 5:(2,8), 2:(1,4), 8:(6,10); remaining nodes are leaves
Tap to enlarge
Your answer
Answer & solution

Official answer: B

A binary max-heap must have complete-tree shape as well as parent≥child values. B is complete and satisfies 10≥8, 6; 8≥4, 5; 6≥1, 2. A satisfies value order but not completeness. C has child8 greater than parent5; D also violates value order. Thus B.

Completeness requires every level except possibly the last to be full and the last level to be filled from left to right. In A, node 8 lacks a right child while positions to its right are occupied, and a deeper node exists despite that gap. In B every displayed level is full, and every parent dominates its two children. C fails at 5→8; D fails already at 5→8 and also at 2→4 and 8→10. Checking only the root maximum is insufficient.

Original paper, page 6 · Answer key

1 mark · MCQ
Report issue

Regular-language complement guarantee

Closure Properties & Language Hierarchy

Question 24, GATE 2011: P is regular and Q is context-free with Q a subset of P. For example, P=p*q* and Q={p^n q^n : n is natural}. Which language is ALWAYS regular, over alphabet Σ?

(A) P intersect Q
(B) P minus Q
(C) Σ* minus P
(D) Σ* minus Q
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Regular languages are closed under complement, so Σ*−P is always regular. P∩Q=Q may be nonregular. If P−Q were always regular, Q=P−(P−Q) would always be regular, a contradiction; likewise regularity of Σ*−Q would imply regularity of Q. Therefore only C is guaranteed.

A counterexample is permitted because the question asks what is guaranteed for all P,Q. Choose P=0*1* and Q={0n1n}. Then P∩Q=Q is nonregular. If P−Q were regular, subtracting it from regular P would recover nonregular Q, contradicting closure of regular languages under difference. If the complement of Q were regular, complementing again would make Q regular. In contrast, a complete DFA for P can always have its accepting and rejecting states swapped to recognize its complement.

Original paper, page 6 · Answer key

1 mark · MCQ
Report issue

Dynamic program for increasing contiguous runs

Dynamic Programming

Question 25, GATE 2011: An array algorithm initializes L[n-1]=1 and for 0≤i≤n-2 defines L[i]=1+L[i+1] when A[i]<A[i+1], otherwise L[i]=1. It returns max(L[0],...,L[n-1]). The source calls this the longest monotonically increasing sequence. Which statement is TRUE?

(A) It uses dynamic programming
(B) It has linear complexity and uses branch and bound
(C) It has nonlinear polynomial complexity and uses branch and bound
(D) It uses divide and conquer
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Compute the displayed Li from right to left, reusing the already-computed Li+1. This is a dynamic program with linear time and the maximum Li as output, so A. Its recurrence computes strictly increasing contiguous runs; it is not the general longest increasing subsequence algorithm when skipped elements are permitted. A suitable evaluation order is needed even though the source writes the index range without an order.

For the recurrence to run, process i=n-2,n-3,...,0. If adjacent entries increase, the run beginning at i is the current element followed by the already-solved run at i+1; otherwise it ends immediately. Each table entry takes constant work, and the final maximum takes linear work. For A=[1,3,2,4], every increasing contiguous run has length 2, although the noncontiguous subsequence [1,2,4] has length 3. This illustrates the important limitation of the displayed recurrence.

Original paper, page 6 · Answer key

2 marks · MCQ
Report issue

Equal three-block language is not context-free

Context-Free Grammars & Languages

Question 26, GATE 2011: Let L1={0^p1^q : p,q in N}, L2={0^p1^q : p=q in N}, and L3={0^p1^q0^r : p=q=r in N}. Which statement is NOT TRUE?

(A) A PDA can recognize L1 and L2
(B) L1 is regular
(C) All three languages are context-free
(D) Turing machines can recognize all three languages
Tap to enlarge
Your answer
Answer & solution

Official answer: C

L1=0*1* is regular and hence recognizable by a PDA; L2 matches two block lengths and is context-free. L3={0n1n0n} is not context-free: for pumping length p, choose 0p1p0p. A pumping window of length≤p cannot reach both outer zero blocks. Pumping a nonempty part therefore changes at most two blocks while leaving another unchanged, or destroys the block order, so equality of all three counts fails. All three are decidable by a Turing machine. Thus the claim that all three are context-free is false, C.

A PDA for L2 pushes one marker per initial 0 and pops one per following 1, rejecting if lengths differ or block order is wrong. L1 does not even need the stack. L3 requires coordinating three unbounded block lengths, and the pumping argument establishes the failure of context-freeness rather than merely asserting that a particular PDA design fails. A Turing machine can repeatedly mark one symbol in each block, so the failure is specific to context-free recognition, not computability.

Original paper, page 7 · Answer key

2 marks · MCQ
Report issue

Precedence and associativity parse tree

Parsing & Syntax Analysis

Question 27, GATE 2011: For binary operators ↑ and ↓, ↑ has higher precedence and is right-associative, whereas ↓ is left-associative. Which parse tree represents 7↓3↑4↑3↓2? Trees are encoded below as fully parenthesized expressions.

(A) 7↓(3↑(4↑(3↓2)))
(B) (7↓(3↑(4↑3)))↓2
(C) 7↓(((3↑4)↑3)↓2)
(D) (((7↓3)↑4)↑3)↓2
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Higher-precedence ↑ groups the middle chain, and its right associativity gives 3↑(4↑3). Lower-precedence ↓ then associates left, yielding(7↓(3↑(4↑3)))↓2. The displayed tree with that structure is B.

Associativity is applied only after precedence identifies which operators compete at the same level. First make the ↑ subtree with root ↑, left leaf 3 and right subtree (4↑3). The remaining expression has the form 7↓T↓2; left associativity makes its root the final ↓, with right child 2 and left child (7↓T). A gives ↓2 too high a binding priority; C and D left-group the ↑ chain or combine the initial ↓ too early.

Original paper, page 7 · Answer key

2 marks · MCQ
Report issue

DMA versus programmed interrupt transfer

Input/Output, DMA & Interrupts

Question 28, GATE 2011: On a non-pipelined sequential processor, transferring 500 bytes uses this interrupt-service program: initialize address register; initialize count=500; LOOP: load one byte from device; store it to the address register's memory location; increment address register; decrement count; if count != 0 go to LOOP. Each load/store takes 2 cycles and every other statement takes 1 cycle. DMA instead needs 20 cycles for initialization/overheads and 2 cycles per byte. What is the approximate DMA speedup over the program?

(A) 3.4
(B) 4.4
(C) 5.1
(D) 6.7
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The two initializations take 2 cycles. Each of 500 loop iterations uses 2 cycles for load, 2 for store and 1 each for increment, decrement and branch, totaling 7. Programmed transfer costs 3502 cycles. DMA costs 20+500×2=1020 cycles. Speedup3502/1020≈3.433, closest to 3.4, A.

Count the conditional branch even on its last, untaken execution: testing the condition is still an instruction. The loop therefore executes 500 loads, 500 stores and 1500 one-cycle bookkeeping instructions, in addition to the two initializations. DMA removes per-byte CPU loop bookkeeping but still pays its transfer cycles and setup. Speedup is old elapsed cycles divided by new elapsed cycles, not the reverse and not the difference between the two counts.

Original paper, page 8 · Answer key

2 marks · MCQ
Report issue

Unique BST labeling for a fixed shape

Binary Search & Balanced Trees

Question 29, GATE 2011: Given n distinct elements and a fixed unlabeled binary tree with n nodes, in how many ways can the elements populate that tree so it becomes a binary search tree?

(A) 0
(B) 1
(C) n!
(D) binomial(2n,n)/(n+1)
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Inorder traversal of a BST with distinct keys must list them in increasing order. The fixed ordered tree shape has a fixed inorder sequence of node positions, so assign the smallest key to the first position, and so on. This gives exactly one valid labeling, B; Catalan numbers count alternative shapes, not labelings of this supplied shape.

This assumes the usual ordered binary tree, in which left and right child positions are fixed. Inorder visits the entire left subtree, then the node, then the entire right subtree. At each node the BST condition requires every left key to be smaller and every right key larger. Therefore assigning sorted keys along inorder both constructs a valid solution and proves uniqueness. There is at least one solution for any such shape, which rules out zero as well.

Original paper, page 8 · Answer key

2 marks · MCQ
Report issue

Predicate characterizing primes

Proof Techniques & Number Theory

Question 30, GATE 2011: For positive integers x,y,z, let P(x)=NOT(x=1) AND ∀y((∃z(x=y*z)) ⇒ ((y=x) OR (y=1))). Which option correctly characterizes P(x)? The source says 'P(x) being true means' in A, B and D.

(A) x is prime
(B) x is a number other than 1
(C) P(x) is always true regardless of x
(D) x has exactly two factors other than 1 and x
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Our answer: A as exact characterization; B is also a necessary consequence

The predicate excludes 1 and requires every positive divisor y of x to be either 1 or x. Thus it is equivalent to x being prime, A. The wording P(x) being true means... is potentially only implication: under that reading B, x is a number other than 1, is also true because it is explicitly a conjunct. A is the exact characterization and the official choice; uniqueness requires reading means as a full characterization rather than any necessary consequence.

Read the inner existential as 'y divides x': there exists a positive integer z with x=yz. The universal implication then says that whenever y is a divisor it is either 1 or x. For x=7 only these divisors occur, whereas x=6 fails at y=2,z=3. The leading conjunct rejects x=1. D incorrectly requires additional factors, and C fails for composites. B is a necessary consequence but not a sufficient description, as 6 is not 1 yet does not satisfy P.

Original paper, page 8 · Answer key

2 marks · MCQ
Report issue

Complex-exponential integral

Calculus

Question 31, GATE 2011: For i=√(-1), evaluate the definite integral from 0 to π/2 of (cos x+i sin x)/(cos x-i sin x) dx.

(A) 0
(B) 2
(C) -i
(D) i
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Euler’s formula gives(cos x+i sin x)/(cos x−i sin x)=e2ix. Integrating from 0 toπ/2 gives[e2ix/(2i)]_0π/2=(−1−1)/(2i)=i, D.

The denominator e-ix is never zero for real x, so the quotient simplification is valid throughout the interval. An alternative real-imaginary check is to integrate cos(2x)+i sin(2x). The cosine integral is [sin(2x)/2] from 0 to π/2, hence zero; the sine integral is [-cos(2x)/2] over the same limits, hence one. The result therefore has real part zero and imaginary part one, confirming the sign of i.

Original paper, page 8 · Answer key

2 marks · MCQ
Report issue

Generated SQL table recurrence

SQL & Queries

Question 32, GATE 2011: Table T has integer columns X,Y and starts with (1,1). Let MX and MY be their current respective maxima. Perform 128 additional inserts of (MX+1,2*MY+1), recomputing maxima after each insert. What does SELECT Y FROM T WHERE X=7 return?

(A) 127
(B) 255
(C) 129
(D) 257
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Our answer: A under successful mathematical-integer insertions

The rows obey X=k and Y=2k−1 by induction from(1, 1): the next maximum Y is doubled and increased by 1. Hence the row X=7 has Y=127, A. Completing all 128 additional inserts would require representing 2129−1 in the final row, beyond common fixed-width SQL INTEGER types. The problem’s statement that all inserts occur therefore assumes sufficiently large integers or an abstract unbounded-integer model; the requested early row itself is representable.

The early rows make the indexing clear: (1,1),(2,3),(3,7),(4,15),(5,31),(6,63),(7,127). Since X increases strictly, there is exactly one row with X=7. For a formal recurrence, set Z=Y+1; then Z doubles at each step, with Z=2 initially, so at X=k it equals 2k. The query is not asking for the final maximum after all 128 inserts; that confusion produces inappropriate much larger powers.

Original paper, page 9 · Answer key

2 marks · MCQ
Report issue

Affine transformation of sample statistics

Probability & Random Variables

Question 33, GATE 2011: For X=[x1,...,xn] with mean μx and standard deviation σx, define yi=a*xi+b with positive constants a,b. Y has mean μy and standard deviation σy. Which statement is INCORRECT?

(A) The index position of the mode in X corresponds to that in Y
(B) The index position of the median in X corresponds to that in Y
(C) μy=aμx+b
(D) σy=aσx+b
Tap to enlarge
Your answer
Answer & solution

Official answer: D

For yi=ax_i+b with a>0, ordering and frequencies are preserved, so modal and median positions correspond under consistent tie conventions. Means transform as μ_y=aμ_x+b. Deviations satisfy yi−μ_y=a(xi−μ_x), so standard deviation is σ_y=aσ_x, without+b. Thus D is incorrect; the same scaling holds for either population or sample normalization.

Translation by b shifts the center but leaves every distance from the center unchanged. Scaling by a multiplies each distance by a, each squared distance by a², and therefore the standard deviation by a after taking a square root. A simple check is a constant sample: its original standard deviation is zero and remains zero after any translation, while option D would incorrectly give b>0. Mode/median statements rely on the same consistent conventions when values tie.

Original paper, page 9 · Answer key

2 marks · MCQ
Report issue

Consecutive values drawn without replacement

Probability & Random Variables

Question 34, GATE 2011: Shuffle five cards numbered 1 through 5, and draw two sequentially without replacement. What is the probability that the first number is exactly one greater than the second?

(A) 1/5
(B) 4/25
(C) 1/4
(D) 2/5
Tap to enlarge
Your answer
Answer & solution

Official answer: A

There are 5×4=20 equally likely ordered pairs of distinct cards. The first exceeds the second by exactly 1 for(2, 1),(3, 2),(4, 3),(5, 4), four cases. Probability4/20=1/5, A.

Ordered outcomes are the right sample space because the condition distinguishes the first and second cards. There are five choices initially and only four after the first removal. The favorable pairs exclude first card 1, because 0 is unavailable; each of first cards 2 through 5 permits exactly one second card. Using 25 as the denominator would incorrectly allow replacement, and counting both orders of each adjacent pair would answer the different absolute-difference question.

Original paper, page 9 · Answer key

2 marks · MCQ
Report issue

Preemptive shortest-remaining-time schedule

CPU Scheduling

Question 35, GATE 2011: Processes P0,P1,P2 have (arrival,burst) times in ms of (0,9),(1,4),(2,9). Use preemptive shortest-job-first scheduling, reconsidering at arrivals or completions. What is their average waiting time?

(A) 5.0 ms
(B) 4.33 ms
(C) 6.33 ms
(D) 7.33 ms
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (6 steps)

P0 runs 0–1, then P1 with its shorter remaining time runs 1–5 despite P2 arriving at 2. P0 finishes its remaining 8 units during 5–13; P2 then runs 13–22. Waiting times are 13−0−9=4, 5−1−4=0 and 22−2−9=11. Average(4+0+11)/3=5ms, A.

At time 1, P0 has 8 units remaining and P1 needs 4, so preemption is required. At time 2, P1 has only 3 remaining, less than P0's 8 and newly arrived P2's 9, so no further preemption occurs. Waiting time is turnaround minus burst, not completion time alone. P0 waits from 1 to 5, P1 never waits, and P2 waits from 2 to 13. These intervals independently reproduce the total 15 ms waiting time.

Original paper, page 9 · Answer key

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Registers for fixed expression-tree evaluation

Code Generation & Register Allocation

Question 36, GATE 2011: Evaluate the fixed expression tree (a-b)+(e-(c+d)) on a load-store machine. Leaves a,b,c,d,e start in memory. Binary operations require both operands in registers and leave their result in a register; no intermediate result may be stored in memory. What is the minimum number of registers needed? The tree must be evaluated as given.

(A) 2
(B) 9
(C) 5
(D) 3
Tap to enlarge
Your answer
Answer & solution

Official answer: D

A leaf needs 1 register; a binary node with equally demanding children needs one more than either, otherwise it needs the larger requirement when evaluated in the favorable order. Thus a−b needs 2; c+d needs 2; e−(c+d) also needs 2; the root combining two 2-register subtrees needs 3. Three suffice by retaining one subtree result while evaluating the other in two registers. Two cannot hold one completed child while evaluating the other fixed subtree. Hence D. This evaluates the supplied tree without algebraic reassociation; rewriting the arithmetic expression into a different tree changes the problem.

A concrete three-register schedule is: load c and d into R1,R2; replace R1 by c+d; load e into R2 and replace R2 by e-R1; then load a into R1 and b into R3, replace R1 by a-b, and add R1 to R2. The two main subtrees each need two registers to combine two operands. Whichever subtree finishes first leaves one live result while the second is evaluated, forcing a third register without spilling or reassociation.

Original paper, page 10 · Answer key

2 marks · MCQ
Report issue

Ordering polynomial quasipolynomial exponential growth

Asymptotic Analysis & Recurrences

Question 37, GATE 2011: Order these functions by increasing asymptotic growth: f1(n)=2^n; f2(n)=n^(3/2); f3(n)=n log2 n; f4(n)=n^(log2 n).

(A) f3,f2,f4,f1
(B) f3,f2,f1,f4
(C) f2,f3,f1,f4
(D) f2,f3,f4,f1
Tap to enlarge
Your answer
Answer & solution

Official answer: A

n log n grows slower than n3/2. The function nlog2 n=2^((log2 n)²) eventually exceeds every fixed power of n, but is smaller than 2n since(log2 n)²=o(n). Hence f3<f2<f4<f1 asymptotically, A.

Pairwise ratios justify the ordering beyond a few sample values. f3/f2=(log2 n)/√n tends to zero. Taking logarithms, log2(f4/f2)=(log2 n)²-(3/2)log2 n tends to infinity. Finally log2(f4/f1)=(log2 n)²-n tends to minus infinity. Thus the quasipolynomial sits above every fixed-degree polynomial but below the exponential. Finite small-n ties or reversals do not affect an asymptotic comparison.

Original paper, page 10 · Answer key

2 marks · MCQ
Report issue

Matrix-chain multiplication optimum

Dynamic Programming

Question 38, GATE 2011: Four matrices M1,M2,M3,M4 have dimensions 10×100,100×20,20×5,5×80. Multiplication of an a×b matrix by a b×c matrix costs abc scalar multiplications. What is the minimum total for their ordered product over all parenthesizations?

(A) 248000
(B) 44000
(C) 19000
(D) 25000
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (8 steps)

For dimensions 10, 100, 20, 5, 80, the five full parenthesizations have costs 25000 for(((AB)C)D), 19000 for((A(BC))D), 44000 for((AB)(CD)), 130000 for(A((BC)D)) and 248000 for(A(B(CD))). The minimum is 19000, attained by BC costing 100×20×5=10000, then A(BC) costing 10×100×5=5000, then the final product costing 10×5×80=4000. Thus C.

Label the matrices A,B,C,D. Dimensions of intermediate results matter: BC is 100×5, A(BC) is 10×5, and the final product is 10×80. Multiplying the dimensions of each operation yields the stated 10000+5000+4000 optimum. Checking all five full binary parenthesizations proves that this is a global minimum, not merely a good greedy choice. For example, doing AB first already costs 20000 before the remaining work, exceeding the optimum by itself.

Original paper, page 10 · Answer key

2 marks · MCQ
Report issue

Hash versus ordered index queries

Indexing, Storage & Query Processing

Question 39, GATE 2011: A sufficiently large relation r has attributes A1,...,An, with 1≤p≤n. Q1 projects A1,...,Ap after selection Ap=c. Q2 projects the same attributes after selection c1≤Ap≤c2. The database may use ordered indexing or hashing on Ap. Which statement is intended to be TRUE?

(A) Ordered indexing always outperforms hashing for both
(B) Hashing always outperforms ordered indexing for both
(C) Hashing outperforms ordered indexing on Q1, but not Q2
(D) Hashing outperforms ordered indexing on Q2, but not Q1
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C under the standard index cost model

Q1 is equality on the indexed attribute, where a well-distributed hash index normally locates its bucket in expected constant time and outperforms ordered search. Q2 is a range predicate, for which an ordered index finds the first qualifying entry and scans the interval; hashing lacks that order. Thus C is the conventional comparison. Actual performance also depends on collisions, selectivity, caching and index layout, so this is not a universal measured-time guarantee for every database.

Hashing sends equal keys to a bucket but does not put nearby numerical values in nearby buckets. Thus an equality predicate can use one hash lookup plus collision handling, whereas a range may require examining many buckets. A sorted index can locate the lower bound and walk adjacent entries until the upper bound. Projection of columns A1,...,Ap does not change this key distinction between the selection predicates. The source's absolute performance wording is stronger than what can be guaranteed without a storage cost model.

Original paper, page 10 · Answer key

2 marks · MCQ
Report issue

Eigenvalues of triangular matrix

Linear Algebra

Question 40, GATE 2011: Find the eigenvalues of the matrix with rows (1,2,3), (0,4,7), (0,0,3).

(A) 1,4,3
(B) 3,7,3
(C) 7,3,2
(D) 1,2,3
Tap to enlarge
Your answer
Answer & solution

Official answer: A

For an upper triangular matrix, det(A−λI) is the product of diagonal entries minus λ. Here it is(1−λ)(4−λ)(3−λ), so the eigenvalues are 1, 4, 3, A.

Subtracting λI preserves triangular form. Expanding the determinant along the first column gives (1-λ) times the determinant of the lower-right 2×2 triangular block, namely (4-λ)(3-λ). Eigenvalues make this characteristic determinant zero. Off-diagonal entries 2,3,7 can affect eigenvectors but not these diagonal roots. The trace check gives 1+4+3=8, equal to the sum of the diagonal entries, and the determinant check gives product 12.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Pipeline throughput with unequal stage delays

Pipelining & Hazards

Question 41, GATE 2011: An ideal four-stage instruction pipeline has combinational delays S1=5 ns, S2=6 ns, S3=11 ns, S4=8 ns. A 1 ns pipeline register follows every stage, including the last. Approximately what is its steady-state speedup over the corresponding non-pipelined implementation?

(A) 4.0
(B) 2.5
(C) 1.1
(D) 3.0
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The non-pipelined combinational delay is 5+6+11+8=30 ns. The pipelined clock period is determined by the slowest stage plus its pipeline-register delay: 11+1=12 ns. In ideal steady state one instruction completes every 12 ns, so the conventional throughput speedup is 30/12=2.5, option B. If the non-pipelined implementation also counts a final 1 ns output register, the ratio is 31/12≈2.58, still the same approximate option. This is steady-state throughput, not the latency speedup of one instruction.

After filling, different instructions occupy the four stages concurrently. The clock cannot advance every average-stage delay; the slowest stage must finish before its register captures the result. That sets 12 ns per output instruction despite three faster stages. One instruction still traverses four pipeline cycles, but the question asks steady-state throughput. Using the ideal stage-count speedup of four would require balanced stages with negligible register overhead, neither of which holds here.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Positive multiples of a fixed unary length

Finite Automata

Question 42, GATE 2011: Over alphabet {a}, let L={a^(nk): k>0}, where n is a fixed positive integer. What is the minimum number of states in a DFA recognizing L?

(A) k+1
(B) n+1
(C) 2^(n+1)
(D) 2^(k+1)
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The language is {ank: k>0}, where n is a fixed positive integer; epsilon is excluded. Use a separate nonaccepting start state, then an n-state cycle that records the positive input length modulo n, accepting the residue-zero state. This uses n+1 states. For minimality, the n positive residue classes are pairwise distinguishable by an extension that makes exactly one length divisible by n. The empty prefix is distinguished from a positive multiple of n by the empty suffix, and from each other positive residue by a suffix that completes that residue to a multiple of n. Thus all n+1 classes are necessary, option B.

An explicit construction uses start z and cycle states r0,...,r(n-1). The first a moves z to r(1 mod n); each subsequent a advances the residue by one modulo n; only r0 is accepting. z must reject epsilon whereas r0 accepts it, so the usual n-state modulo counter cannot merge these two states. For n=1 the result is two states, recognizing a+ rather than a*, which also checks the boundary case.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Write-back direct-mapped cache metadata

Cache Memory

Question 43, GATE 2011: An 8 KB direct-mapped write-back cache has 32-byte blocks and 32-bit byte addresses. Metadata per cache block contains one valid bit, one modified bit, and the minimum tag bits needed to identify the mapped memory block. How many metadata bits are needed in total?

(A) 4864
(B) 6144
(C) 6656
(D) 5376
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (8 steps)

There are 8192/32=256 cache lines, requiring 8 index bits. A 32-byte block requires 5 byte-offset bits, leaving 32−8−5=19 address-tag bits. Add one valid bit and one modified (dirty) bit per line: 21 bits per line. The metadata memory is therefore 256×21=5376 bits, option D. Data storage itself is not included.

Interpret 8 KB as 8×1024 bytes in the conventional cache model. The address splits into [19 tag bits][8 line-index bits][5 block-offset bits]. The index chooses one of the 256 lines, and the offset selects a byte within its 32-byte block. Only the tag must be stored as an address identifier; index and offset are implicit in placement. Write-back additionally needs the dirty bit to decide whether eviction must write data to memory, while valid distinguishes populated from unused entries.

Original paper, page 11 · Answer key

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Random library loads and disk latency

I/O & Disk Scheduling

Question 44, GATE 2011: An application loads 100 libraries at startup. Each takes one disk access to a random location. Average seek time is 10 ms and rotational speed is 6000 rpm. Neglect data-transfer time once positioned at the block. What is the expected total load time?

(A) 0.50 s
(B) 1.50 s
(C) 1.25 s
(D) 1.00 s
Tap to enlarge
Your answer
Answer & solution

Official answer: B

At 6000 rpm the disk makes 100 revolutions per second, so one revolution lasts 10 ms. Random angular position gives an average rotational latency of 5 ms. Each library requires one access with 10 ms seek time plus 5 ms average rotational latency; transfer time is neglected. The total expected loading time is 100×15 ms=1500 ms=1.50 s, option B. The random-location wording calls for average rotational latency, not a full revolution per access.

Convert rpm to revolutions per second before computing time: 6000/60=100. Uniform random angular placement means the desired sector can be anywhere from just under the head to nearly a full revolution away, averaging half a turn. Seek and rotational wait occur for each of the 100 distinct accesses, so both contributions must be counted 100 times. The expected seek total is 1 second and expected rotation total is 0.5 second; ignoring either would select an incorrect smaller answer.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Minimizing a five-state DFA

Finite Automata

Question 45, GATE 2011: DFA D has alphabet {a,b}, start p, accepting states s,t, and transitions p:a→s,b→q; q:a→t,b→r; r:a,b→r; s:a,b→s; t:a,b→t. Which supplied machine is an equivalent minimal DFA? Unlisted states in the alternatives are nonaccepting.

(A) Start p; final s; p:a→s,b→q; q:a→s,b→r; r:a,b→r; s:a,b→s
(B) Start p; finals q,r; p:a,b→q; q:a→r,b→s; r:a,b→r; s:a,b→s
(C) Start p; final q; p:a,b→q; q:a,b→q and also q:b→r; r:a,b→r
(D) Start p; final s; p:a→s,b→q; q:a→s,b→q; s:a,b→s
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The accepting states s and t both loop on a and b, so their right languages are identical and they merge. The other states p, q and r remain distinct: p versus q is distinguished by suffix ba, since p accepts ba while q reaches the dead state; q versus r is distinguished by a; p versus r is also distinguished by a. Any accepting state differs from these nonaccepting states on epsilon. All four resulting classes are reachable. The minimal DFA has classes {p}, {q}, {r}, {s, t}, with p --b--> q --b--> r, r a/b-loops, and a-transitions from p and q to the accepting sink. This is option A.

All five original states are reachable: epsilon reaches p, b reaches q, bb reaches r, a reaches s, and ba reaches t. Initially separate accepting {s,t} from rejecting {p,q,r}; r differs because its a-transition stays rejecting, and then p differs from q because their b-transitions lead to different classes. Alternative B wrongly accepts b, C has two b-transitions from q and is not deterministic, and D accepts bba although the original reaches r on bb and must reject every continuation.

Original paper, page 12 · Answer key

2 marks · MCQ
Report issue

Counting a natural join on a shared manager

SQL & Queries

Question 46, GATE 2011: Loan_Records has columns Borrower,Bank_Manager,Loan_Amount and rows (Ramesh,Sunderajan,10000.00), (Suresh,Ramgopal,5000.00), (Mahesh,Sunderajan,7000.00). Evaluate SELECT count(*) FROM ((SELECT Borrower,Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager,Loan_Amount FROM Loan_Records) AS T).

(A) 3
(B) 9
(C) 5
(D) 6
Tap to enlarge
Your answer
Answer & solution

Official answer: C

The common column of the two projections is Bank_Manager. Sunderajan appears in two rows of each projection, so the natural join yields 2×2=4 combinations for that manager. Ramgopal appears once in each projection, yielding 1×1=1 combination. COUNT(*) returns 4+1=5, option C. The join does not pair rows by their original borrower, since Borrower is absent from the second projection.

The projected left rows are (Ramesh,Sunderajan),(Suresh,Ramgopal),(Mahesh,Sunderajan). The right rows are (Sunderajan,10000),(Ramgopal,5000),(Sunderajan,7000). Each of Ramesh and Mahesh joins with both Sunderajan amounts, yielding four rows; Suresh joins with the single Ramgopal amount. COUNT(*) counts those joined rows, including combinations that were not in the original table. Joining projections can create extra combinations whenever their common attribute is not a key.

Original paper, page 12 · Answer key

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Equivalence partitioning for quadratic-root tests

Software Engineering

Question 47, GATE 2011: A quadratic-root function for ax²+bx+c=0 specifies four cases: a=0 (regardless of discriminant); otherwise discriminant positive, zero or negative. Only positive/zero cases yield valid real roots, ordered root1≥root2, and return 0; invalid cases store two zeros and return -1. Test rows list (a,b,c;root1,root2;return): T1=(0,0,7;0,0;-1), T2=(0,1,3;0,0;-1), T3=(1,2,1;-1,-1;0), T4=(4,-12,9;1.5,1.5;0), T5=(1,-2,-3;3,-1;0), T6=(1,1,4;0,0;-1). Which set is nonredundant and covers the input equivalence classes?

(A) T1,T2,T3,T6
(B) T1,T3,T4,T5
(C) T2,T4,T5,T6
(D) T2,T3,T4,T5
Tap to enlarge
Your answer
Answer & solution

Official answer: C

The specification defines four input equivalence classes: a=0 regardless of discriminant, and, for a≠0, discriminant positive, zero or negative. T1 and T2 cover the first class. T3 and T4 both have zero discriminant. T5 has discriminant 16>0, and T6 has discriminant −15<0. A nonredundant representative set must choose one of {T1, T2}, one of {T3, T4}, and both T5 and T6. Among the supplied choices, only {T2, T4, T5, T6} does so, option C.

Compute discriminants b²-4ac only after recognizing the special a=0 class. T3 gives 4-4=0 and T4 gives 144-144=0, so they are redundant for this partition despite different numerical roots. T5 gives 4+12=16; T6 gives 1-16=-15. A repeats the a=0 class and omits positive discriminant. B and D repeat the zero-discriminant class and omit negative discriminant. C contains exactly one representative of each stated category.

Original paper, page 13 · Answer key

2 marks · MCQ
Report issue

Recursive sum of decimal digits

Recursion

Question 48, GATE 2011: Consider unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r)+foo(n/r,r)); else return 0; }. What does foo(345,10) return?

(A) 345
(B) 12
(C) 5
(D) 3
Question 48, GATE 2011: Consider unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r)+foo(n/r,r)); else return 0; }. What does foo(345,10) return?

(A) 345
(B) 12
(C) 5
(D) 3
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (9 steps)

For positive n and base r>1, n%r is the final base-r digit and integer division n/r removes it. The recursive calls therefore sum the digits. With n=345 and r=10, the return is 5+4+3+0=12, option B.

Unroll the calls: foo(345,10)=5+foo(34,10); foo(34,10)=4+foo(3,10); foo(3,10)=3+foo(0,10); the last call returns 0. The call stack then returns 3,7,12 in reverse order. It does not reconstruct the original number because no place-value multiplications are used, and it does not stop after the first remainder. The base case is essential to terminate after all digits have been consumed.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Recursive sum of binary digits

Recursion

Question 49, GATE 2011: Consider unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r)+foo(n/r,r)); else return 0; }. What does foo(513,2) return?

(A) 9
(B) 8
(C) 5
(D) 2
Question 49, GATE 2011: Consider unsigned int foo(unsigned int n, unsigned int r) { if (n>0) return ((n%r)+foo(n/r,r)); else return 0; }. What does foo(513,2) return?

(A) 9
(B) 8
(C) 5
(D) 2
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (23 steps)

The function sums the base-r digits of n. Since 513=512+1=29+1, its binary representation is 1000000001 and has two 1 bits. Consequently foo(513, 2)=2, option D. All intermediate recursive divisions are unsigned integer divisions and terminate at zero.

The successive n values are 513,256,128,64,32,16,8,4,2,1,0. Remainders modulo 2 are 1 at n=513 and n=1 and zero at every other positive step. Summing them produces 2. The exponent 9 tells where the highest bit lies, not how many set bits there are; similarly, the number of recursive positive calls is 10, not the return value. The function counts ones for base 2 because binary digits can only be zero or one.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Next state of a three-flip-flop counter

Flip-Flops, Registers & Sequential Circuits

Question 50, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R. The source circuit connects R directly to D_P, a NOR of P and R to D_Q, and an AND of Q and the complemented R output to D_R. All sample simultaneously at a clock edge. If PQR=010 immediately before the edge, what is PQR afterward?

(A) 000
(B) 001
(C) 010
(D) 011
Question 50, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R. The source circuit connects R directly to D_P, a NOR of P and R to D_Q, and an AND of Q and the complemented R output to D_R. All sample simultaneously at a clock edge. If PQR=010 immediately before the edge, what is PQR afterward?

(A) 000
(B) 001
(C) 010
(D) 011
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Tracing the wires, including the bridge crossings, gives next-state equations P_next=R, Q_next=NOT(P OR R), and R_next=Q AND NOT R. The upper two gate inputs are P and R; the lower AND gate uses Q and the complemented output of R. All D flip-flops update simultaneously from the pre-edge values. For PQR=010 this gives P_next=0, Q_next=1, R_next=1, so the next state is 011, option D.

For a D flip-flop, the output after the edge equals its D input just before the edge. Substitute the old values P=0,Q=1,R=0 into all three equations: D_P=0; D_Q=NOT(0 OR 0)=1; D_R=1 AND NOT 0=1. Assemble the new values in P,Q,R order as 011. Do not feed the newly computed R back into P in this same step; that would model sequential assignments rather than simultaneous hardware sampling.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Reachable cycle of a three-flip-flop counter

Counters & Timing

Question 51, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R and connections D_P=R, D_Q=NOR(P,R), D_R=AND(Q,NOT R). All sample simultaneously. Starting with all flip-flops reset to zero, how many distinct output states occur?

(A) 3
(B) 4
(C) 5
(D) 6
Question 51, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R and connections D_P=R, D_Q=NOR(P,R), D_R=AND(Q,NOT R). All sample simultaneously. Starting with all flip-flops reset to zero, how many distinct output states occur?

(A) 3
(B) 4
(C) 5
(D) 6
Tap to enlarge
Your answer
Answer & solution

Official answer: B

From the figure the synchronous next-state equations are P_next=R, Q_next=NOT(P OR R), and R_next=Q AND NOT R. Starting from the power-on reset 000 gives 000→010→011→100→000. These four states are distinct, and the return to 000 repeats the same deterministic cycle. Thus the number of reachable states from reset is 4, option B; the question does not ask for all eight possible register patterns.

Evaluate every transition with the same pre-edge rule. At 000 the next bits are 0,1,0. At 010 they are 0,1,1. At 011 they are 1,0,0. At 100 they are 0,0,0. The reset state is included in the count, so there are four distinct states before repetition, not three transitions away from reset. A three-bit register can represent eight states, but its next-state logic and initialization restrict the reachable sequence.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Distance-vector update after a reduced link cost

Routing Algorithms

Question 52, GATE 2011: A symmetric distance-vector network has edges N1-N2:1, N2-N3:6, N3-N4:2, N4-N5:4, N5-N2:3. Stabilized vectors in destination order N1,...,N5 are N1=(0,1,7,8,4), N2=(1,0,6,7,3), N3=(7,6,0,2,6), N4=(8,7,2,0,4), N5=(4,3,6,4,0). Each round all nodes first exchange current vectors, then update. Between rounds a link-cost change modifies only the directly incident entry at each endpoint. If N2-N3 decreases to 2, what is N3's vector after the next round?

(A) 3,2,0,2,5
(B) 3,2,0,2,6
(C) 7,2,0,2,5
(D) 7,2,0,2,6
Question 52, GATE 2011: A symmetric distance-vector network has edges N1-N2:1, N2-N3:6, N3-N4:2, N4-N5:4, N5-N2:3. Stabilized vectors in destination order N1,...,N5 are N1=(0,1,7,8,4), N2=(1,0,6,7,3), N3=(7,6,0,2,6), N4=(8,7,2,0,4), N5=(4,3,6,4,0). Each round all nodes first exchange current vectors, then update. Between rounds a link-cost change modifies only the directly incident entry at each endpoint. If N2-N3 decreases to 2, what is N3's vector after the next round?

(A) 3,2,0,2,5
(B) 3,2,0,2,6
(C) 7,2,0,2,5
(D) 7,2,0,2,6
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Before the next exchange, only the incident entries change: N2 sets its distance to N3 to 2, and N3 sets its distance to N2 to 2. In particular N2 still advertises distances 1 to N1 and 3 to N5; N4 advertises 8 to N1 and 4 to N5. N3 recomputes through neighbors N2 (link cost 2) and N4 (link cost 2): to N1, min(2+1, 2+8)=3; to N2, min(2+0, 2+7)=2; to itself, 0; to N4, min(2+7, 2+0)=2; to N5, min(2+3, 2+4)=5. Its vector becomes (3, 2, 0, 2, 5), option A.

The distance-vector recurrence is D3(j)=min over neighbors k of [cost(3,k)+Dk(j)], with D3(3)=0. The exchange occurs before recomputation, so N3 cannot use routes N2 or N4 will discover later in this same round. In particular, destination N5 improves via N2 from 6 to 2+3=5, while N1 improves to 2+1=3. Mixing updated and old advertisements would model an asynchronous cascade rather than the specified one-round calculation.

Original paper, page 15 · Answer key

2 marks · MCQ
Report issue

One synchronous round after a routing link failure

Routing Algorithms

Question 53, GATE 2011: Use the symmetric network edges N1-N2:1,N2-N3:6,N3-N4:2,N4-N5:4,N5-N2:3 and stabilized vectors N1=(0,1,7,8,4),N2=(1,0,6,7,3),N3=(7,6,0,2,6),N4=(8,7,2,0,4),N5=(4,3,6,4,0). Nodes exchange current vectors synchronously, then update; between rounds only incident entries change. First reduce N2-N3 to 2 and perform exactly one round as in the preceding question. Then N1-N2 fails; N2 immediately changes its N1 entry to infinity. After the NEXT round, what cost to N1 does N3 record?

(A) 3
(B) 9
(C) 10
(D) Infinity
Question 53, GATE 2011: Use the symmetric network edges N1-N2:1,N2-N3:6,N3-N4:2,N4-N5:4,N5-N2:3 and stabilized vectors N1=(0,1,7,8,4),N2=(1,0,6,7,3),N3=(7,6,0,2,6),N4=(8,7,2,0,4),N5=(4,3,6,4,0). Nodes exchange current vectors synchronously, then update; between rounds only incident entries change. First reduce N2-N3 to 2 and perform exactly one round as in the preceding question. Then N1-N2 fails; N2 immediately changes its N1 entry to infinity. After the NEXT round, what cost to N1 does N3 record?

(A) 3
(B) 9
(C) 10
(D) Infinity
Question 53, GATE 2011: Use the symmetric network edges N1-N2:1,N2-N3:6,N3-N4:2,N4-N5:4,N5-N2:3 and stabilized vectors N1=(0,1,7,8,4),N2=(1,0,6,7,3),N3=(7,6,0,2,6),N4=(8,7,2,0,4),N5=(4,3,6,4,0). Nodes exchange current vectors synchronously, then update; between rounds only incident entries change. First reduce N2-N3 to 2 and perform exactly one round as in the preceding question. Then N1-N2 fails; N2 immediately changes its N1 entry to infinity. After the NEXT round, what cost to N1 does N3 record?

(A) 3
(B) 9
(C) 10
(D) Infinity
Tap to enlarge
Your answer
Answer & solution

Official answer: C

This is the round immediately after the update in printed question 52, not a converged routing table. In that previous round N4 retained distance 8 to N1: via N3 it saw the old advertised distance 7, giving 2+7=9, while via N5 it obtained 4+4=8. When link N1–N2 fails, N2 immediately changes its N1 entry to infinity. In the next exchange N3 therefore sees N2 advertise infinity and N4 advertise 8 to N1. Its new distance to N1 is min(2+infinity, 2+8)=10, option C. Ordinary distance-vector updating uses neighbors’ current advertisements; it does not retain its obsolete distance 3 as an independent route.

The crucial neighbor advertisement is N4's, so reconstruct it from the previous round: to N1, via N3 costs 2+7=9 using the old N3 vector, while via N5 costs 4+4=8; thus N4 advertises 8. Following failure, N3 hears no usable N1 route from N2 but still hears N4's stale value. Its update to 10 illustrates distance-vector count-to-infinity behavior: a finite advertised route can temporarily survive even though N1 is physically disconnected.

Original paper, page 15 · Answer key

2 marks · MCQ
Report issue

Minimum spanning tree of a banded weighted graph

Graph Algorithms

Question 54, GATE 2011: An undirected graph has vertices v1,...,vn for n>2. Vertices vi and vj are adjacent exactly when 0<abs(i-j)≤2, and that edge has weight i+j. (For n=4 the edges are 12:3,13:4,23:5,24:6,34:7.) What is its minimum spanning-tree weight?

(A) (11n²-5n)/12
(B) n²-n+1
(C) 6n-11
(D) 2n+1
Question 54, GATE 2011: An undirected graph has vertices v1,...,vn for n>2. Vertices vi and vj are adjacent exactly when 0<abs(i-j)≤2, and that edge has weight i+j. (For n=4 the edges are 12:3,13:4,23:5,24:6,34:7.) What is its minimum spanning-tree weight?

(A) (11n²-5n)/12
(B) n²-n+1
(C) 6n-11
(D) 2n+1
Tap to enlarge
Your answer
Answer & solution

Official answer: B

For each vertex vi with i≥3, its lightest incident edge is (vi−2, vi), with weight 2i−2. The edge (v1, v2), of weight 3, is likewise the unique lightest edge incident to v1 and to v2. By the cut property all these edges must belong to an MST. They form two parity chains joined by (v1, v2), so they are connected and contain exactly n−1 edges, hence already form a spanning tree. Its weight is 3+sum from i=3 to n of (2i−2)=3+2[(n−1)n/2−1]=n²−n+1, option B.

For vertex vi with i≥3, possible smaller neighbors are v(i-2) and v(i-1), of weights 2i-2 and 2i-1; larger neighbors have still greater weights. Thus its distance-two backward edge uniquely minimizes the cut separating vi from all other vertices. The cut property forces every such edge, and also v1-v2. The odd-index chain and even-index chain are internally connected and joined by that last edge, showing the forced edges are sufficient, not merely a lower bound on the optimum.

Original paper, page 15 · Answer key

2 marks · MCQ
Report issue

Weighted path within the prescribed minimum spanning tree

Graph Algorithms

Question 55, GATE 2011: An undirected graph has vertices v1,...,vn, edges precisely when 0<abs(i-j)≤2, and edge weight i+j. For n=10, what is the weighted length of the path from v5 to v6 in the minimum spanning tree of this graph?

(A) 11
(B) 25
(C) 31
(D) 41
Question 55, GATE 2011: An undirected graph has vertices v1,...,vn, edges precisely when 0<abs(i-j)≤2, and edge weight i+j. For n=10, what is the weighted length of the path from v5 to v6 in the minimum spanning tree of this graph?

(A) 11
(B) 25
(C) 31
(D) 41
Question 55, GATE 2011: An undirected graph has vertices v1,...,vn, edges precisely when 0<abs(i-j)≤2, and edge weight i+j. For n=10, what is the weighted length of the path from v5 to v6 in the minimum spanning tree of this graph?

(A) 11
(B) 25
(C) 31
(D) 41
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (19 steps)

The MST consists of (v1, v2) and (vi−2, vi) for i=3,..., 10. Its unique path from v5 to v6 is v5→v3→v1→v2→v4→v6. The edge weights are 8, 4, 3, 6 and 10, respectively, so its weighted length is 8+4+3+6+10=31, option C. The direct graph edge (v5, v6) has weight 11 but is not in the MST.

Write the two chains explicitly for n=10: odd vertices 1-3-5-7-9 and even vertices 2-4-6-8-10, joined by 1-2. Any route inside this tree from an odd to an even vertex must pass through that bridge. The requested route therefore goes downward in the odd chain to 1, crosses to 2, and climbs the even chain to 6. 'Length' here is total edge weight, not the number of edges; the path uses five edges but has weight 31.

Original paper, page 15 · Answer key