GATE / CS ARCHIVE

PAPER / ORIGINAL ORDER

GATE 2009

60 questions

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

03:00:00
1 mark · MCQ
Report issue

Group axiom not required

Algebraic Structures

Question 1, GATE 2009: Which property is not required of a group? A commutativity; B associativity; C an inverse for each element; D an identity element.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Associativity, an identity and inverses are group axioms. Commutativity is an additional property of abelian groups, not all groups; for example permutations of three objects need not commute. Thus A.

A group requires closure, associativity, an identity and an inverse for every element. Commutativity is an extra condition defining an abelian group. For a counterexample to its necessity, permutations of three objects form a group under composition, but swapping 1/2 then 2/3 differs from doing those swaps in reverse order. Thus A is not a required axiom; B, C, D are.

Original paper, page 2

1 mark · MCQ
Report issue

Chromatic number without odd cycles

Graph Theory

Question 2, GATE 2009: A simple connected graph on n≥2 vertices has no odd cycle. Find its chromatic number: A 2; B 3; C n−1; D n.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

An undirected graph with no odd cycle is bipartite, so two colors suffice. Connectedness and n≥2 ensure at least one edge, so one color cannot suffice. The chromatic number is exactly 2, A.

A graph has a two-colouring exactly when it has no odd cycle. One construction assigns colours by even or odd distance from a chosen root. If an edge joined equal-parity vertices, the corresponding paths would create an odd closed walk and hence an odd cycle. The given connected graph with at least two vertices has an edge, so one colour is insufficient. Therefore its chromatic number is exactly 2, not merely at most 2.

Original paper, page 2

1 mark · MCQ
Report issue

Repeated degree in a connected graph

Graph Theory

Question 3, GATE 2009: Which statement holds for every simple connected undirected graph with more than two vertices? A all degrees distinct; B at least two equal degrees; C at least three equal degrees; D all degrees equal.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

For n vertices in a simple connected graph with n>2, each degree lies in{1, ..., n−1}. There are n vertices but only n−1 possible degrees. By the pigeonhole principle at least two share a degree, B. Three equal degrees are not necessary, as a path on four vertices shows.

Connectivity excludes degree 0, and simplicity excludes degree above n−1. Thus n vertices must be assigned one of only n−1 possible degree values. The pigeonhole principle forces a repeated degree, proving B. A three-vertex path has degrees 1, 2, 1, so neither three equal degrees nor all equal degrees is necessary. This example also makes clear why the claim is about at least two, not a particular pair.

Original paper, page 2

1 mark · MCQ
Report issue

Symmetry and antisymmetry of a relation

Sets, Relations & Functions

Question 4, GATE 2009: On {x, y, z}, R={(x, y), (x, z), (z, x), (z, y)}. Classify R: A symmetric but not antisymmetric; B antisymmetric but not symmetric; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The pair(x, y) is present but(y, x) is absent, so the relation is not symmetric. Both(x, z) and(z, x) are present with x≠z, so it is not antisymmetric either. Therefore D.

Symmetry would require (y, x) whenever (x, y) belongs, but (y, x) is missing. Antisymmetry would forbid distinct elements relating both ways; here (x, z) and (z, x) are both present with x≠z. Hence each property fails by a concrete witness, giving D. Antisymmetry does not mean the logical negation of symmetry; it is a separate condition.

Original paper, page 2

1 mark · MCQ
Report issue

Octal to hexadecimal conversion

Number Systems & Computer Arithmetic

Question 5, GATE 2009: Convert octal 1217 to the equivalent choice: A hexadecimal 1217; B hexadecimal 028F; C decimal 2297; D hexadecimal 0B17.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (10 steps)

Octal 1217 expands to binary 001 010 001 111. Grouping in fours gives 0010 1000 1111, hexadecimal 28F, or 028F with a leading zero. Hence B. Its decimal value is 512+128+8+7=655.

Using place values, octal 1217 equals 1·8³+2·8²+1·8+7=512+128+8+7=655. Divide into hexadecimal place values:655=2·256+8·16+15, so it is 028F hexadecimal. The same conversion follows by octal digit triples 001010001111, regrouped into binary quartets 0010 1000 1111.

Original paper, page 2

1 mark · MCQ
Report issue

Minimum two-input NOR realization

Boolean Algebra & Logic Gates

Question 6, GATE 2009: Implement F=AB+C using only two-input NOR gates. Find the minimum gate count: A 2; B 3; C 4; D 5.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Factor AB+C=(A+C)(B+C). Compute u=NOR(A, C), v=NOR(B, C), then NOR(u, v)=(A+C)(B+C), using three gates. Two do not suffice: with at most two gates, the final NOR receives only primary inputs and the output of one preceding NOR; exhaustive truth-table enumeration of all such input choices finds no realization. Thus 3, B. The accompanying check script verifies the lower bound without assuming complementary inputs are supplied.

Use the product-of-sums identity AB+C=(A+C)(B+C). Gate 1 gives ¬(A+C); gate 2 gives ¬(B+C); their NOR yields ¬[¬(A+C)+¬(B+C)]=(A+C)(B+C). Thus three gates suffice. With only two NOR gates, the last gate can take raw inputs and at most one derived NOR signal; checking these structural possibilities cannot produce this three-variable function. The accompanying exhaustive small-circuit checker supplies the lower-bound check, so three is minimal.

Original paper, page 2

1 mark · MCQ
Report issue

RAM-chip capacity count

Memory Organization & Address Translation

Question 7, GATE 2009: How many 32K×1 RAM chips are needed for 256K bytes of memory? A 8; B 32; C 64; D 128.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Each 32K×1 chip stores 32K bits. The required 256K bytes equal 2048K bits. Therefore 2048K/32K=64 chips, C.

A 32K×1 chip stores 32K bits, not 32K bytes. The requested capacity is 256K·8 bits. Dividing gives(256·8)/32=64 chips. Equivalently, eight chips in parallel provide a byte-wide 32K bank, and eight banks provide 256K byte addresses. Confusing width in bits with bytes would undercount by a factor of eight.

Original paper, page 2

1 mark · MCQ
Report issue

Interrupt recognition point

Input/Output, DMA & Interrupts

Question 8, GATE 2009: When does a CPU normally begin interrupt service? A immediately when raised; B after checking at the end of fetch; C after checking when the current instruction finishes; D at fixed time intervals.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

In the conventional instruction-cycle model, an enabled pending interrupt is checked after the current instruction completes, then control transfers to its service routine. This preserves an instruction boundary rather than interrupting immediately at an arbitrary internal step. Thus C.

The usual instruction-cycle model completes an instruction before recognizing a pending interrupt and saving a consistent next-instruction state. This gives C. An asynchronous request can arrive earlier, but arrival is not the same as immediate transfer of control. Fetch completion is too early in that simple model, and periodic checking is not the general interrupt mechanism. Architecture-specific restartable instructions and precise-exception implementations are finer details outside this convention.

Original paper, page 2

1 mark · MCQ
Report issue

Belady anomaly policy

Virtual Memory & Paging

Question 9, GATE 2009: For which listed page replacement policy may Belady’s anomaly occur? A FIFO; B optimal; C LRU; D MRU.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

FIFO can incur more faults with more frames: the standard reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 has 9 faults with 3 frames and 10 with 4. LRU and optimal replacement have the stack-inclusion property; ordinary MRU also preserves inclusion for nested initially empty caches. Thus FIFO is the supplied policy exhibiting the anomaly, A.

FIFO can evict a page because it arrived long ago even if it will be reused immediately; adding frames changes that queue order and can increase faults. The classic reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 produces 9 FIFO faults with three frames and 10 with four. LRU and optimal have the inclusion/stack property that prevents this anomaly. The intended listed answer is FIFO; the baseline qualification concerning the exact MRU model remains important.

Original paper, page 2

1 mark · MCQ
Report issue

Essential conventional page-table entry

Virtual Memory & Paging

Question 10, GATE 2009: What is essential in each conventional page-table entry? A virtual page number; B physical page-frame number; C both numbers; D access-right information.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

A conventional page table is indexed by the virtual page number, so that number need not be stored again in each entry. Its essential mapping result is the physical page-frame number, B. Permission and status bits may also be included; inverted/hashed organizations have different entry layouts and are not the conventional indexed table assumed here.

A conventional page table is indexed by virtual page number, so that number is implicit in the entry’s position rather than necessarily stored again. The essential translation payload identifies the physical frame. Protection, valid and dirty information may also be stored, but access rights alone cannot perform address translation. Thus B is the expected minimum translation information; hashed or inverted page-table organizations can require additional explicit tags.

Original paper, page 2

1 mark · MCQ
Report issue

Selection-sort worst-case swaps

Searching, Sorting & Selection

Question 11, GATE 2009: What is the worst-case number of swaps in selection sort on n elements? A Θ(n); B Θ(n log n); C Θ(n²); D Θ(n² log n).
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Each pass places one selected minimum using at most one swap, and there are n−1 passes. Inputs exist requiring a linear number of those swaps, so the worst-case swap count is Θ(n), A, despite Θ(n²) comparisons.

Selection sort scans the remaining suffix to find its minimum and moves that minimum into the next position. There are n−1 such placements and at most one swap per placement. Some inputs require a swap in a linear number of passes, giving a tight Θ(n) worst-case swap count. This differs from its Θ(n²) comparison count, since each pass may examine many elements before performing only one exchange.

Original paper, page 2

1 mark · MCQ
Report issue

Odd-palindrome grammar

Context-Free Grammars & Languages

Question 12, GATE 2009: For grammar S→aSa|bSb|a|b over {a, b}, identify the language: A all palindromes; B odd-length palindromes; C all strings beginning and ending with the same symbol; D even-length palindromes.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The base productions produce a single a or b. Every recursive production adds the same symbol at both ends, preserving the palindrome property and odd length. Conversely strip matching outer pairs from any odd palindrome until one central symbol remains, yielding a derivation. Thus exactly all odd-length palindromes, B.

Every derivation starts from a one-symbol base a or b and adds matching symbols around the outside. Length therefore remains odd and the string remains a palindrome. Conversely, removing the equal end symbols from any odd palindrome repeatedly reaches its one-symbol centre, giving a reverse derivation. Even palindromes are excluded because no ε base exists; a string such as aabba begins/ends alike but is not generated.

Original paper, page 3

1 mark · MCQ
Report issue

Bellman-Ford negative-cycle scope

Graph Algorithms

Question 13, GATE 2009: For single-source Bellman–Ford, assess P: always detects a negative cycle if any exists; Q: detects whether a negative cycle is reachable from the source. A P only; B Q only; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Single-source Bellman-Ford detects a negative cycle reachable from that source by checking for a further relaxable edge after n−1 passes. A negative cycle in an unreachable component remains at infinite distance and need not be found. Therefore Q is true but P is not, giving B.

Bellman–Ford initializes only the source distance as finite. Vertices unreachable from it remain at infinity, so a disconnected negative cycle does not cause a finite relaxation. After |V|−1 passes, an additional successful relaxation among reachable vertices detects a reachable negative cycle. Therefore Q is true and P, which omits reachability, is false. Connecting a new super-source to every vertex would change the setup and allow global detection.

Original paper, page 3

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

NP-hardness within NP

Computational Complexity

Question 14, GATE 2009: Problem π belongs to NP. Which assertion follows? A no polynomial algorithm exists; B a deterministic polynomial algorithm for π would imply P=NP; C if π is NP-hard then it is NP-complete; D π may be undecidable.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

A problem already in NP is NP-complete exactly when it is also NP-hard, so C. Membership in NP does not exclude membership in P, and solving an arbitrary NP problem efficiently would not by itself prove P=NP. Every NP decision problem is decidable.

NP-complete means both membership in NP and NP-hardness. Since membership is given, adding NP-hardness proves C directly. NP also contains easy problems in P, so a polynomial algorithm for an arbitrary member does not settle P versus NP. All NP languages are decidable by finite exhaustive certificate search, ruling out D, and A is not generally true.

Original paper, page 3

1 mark · MCQ
Report issue

Regular expression with two distinguished zeros

Regular Expressions & Languages

Question 15, GATE 2009: Describe (0+1)*0(0+1)*0(0+1)*: A strings containing 00; B at most two zeros; C at least two zeros; D strings beginning and ending with either 0 or 1.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Each starred(0+1) factor permits any binary string, but the two explicit 0 symbols must occur in order. Hence the expression accepts exactly strings with at least two zeros, not necessarily adjacent, C.

Each explicit 0 in the expression must consume a separate symbol, so every generated string contains at least two zeros. The three starred factors can contain arbitrary binary strings, including more zeros, and may be empty. Conversely, choose any two zeros in a string and assign the prefix, intervening segment and suffix to the three starred factors. The zeros need not be adjacent, so 010 is accepted despite lacking substring 00. Hence C.

Original paper, page 3

1 mark · MCQ
Report issue

False claim about pushdown determinism

Pushdown Automata

Question 16, GATE 2009: Which is false? A each regular language has a unique minimal DFA (up to renaming); B each NFA has an equivalent PDA; C the complement of every CFL is recursive; D every NPDA has an equivalent DPDA.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Minimal DFAs are unique up to state renaming; an NFA can be simulated by a PDA that ignores its stack. Every CFL is decidable, so its complement is recursive. But deterministic PDAs recognize a proper subclass of the CFLs recognized by NPDAs. Thus the universal conversion in D is false.

A PDA can simulate an NFA without using its stack. Context-free membership is decidable, so complementing that decision gives a decider for the complement. Minimal DFAs are unique up to state renaming. Deterministic PDAs, however, recognize a proper subset of context-free languages; nondeterminism cannot always be eliminated. For instance, unmarked palindromes need a nondeterministic guess of the midpoint. Thus D is the false universal claim.

Original paper, page 3

1 mark · MCQ
Report issue

Compiler activity matching

Compiler Phases, Linking & Loading

Question 17, GATE 2009: Match P regular expressions, Q pushdown automata, R dataflow analysis, S register allocation to 1 syntax analysis, 2 code generation, 3 lexical analysis, 4 code optimization. A P4Q1R2S3; B P3Q1R4S2; C P3Q4R1S2; D P2Q1R4S3.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Regular expressions specify tokens for lexical analysis(P→3). Pushdown automata model syntax analysis(Q→1). Dataflow facts support code optimization(R→4), while register allocation is part of code generation(S→2). Hence B.

Regular expressions specify lexical tokens, giving P3. A pushdown store models nested grammatical structure in syntax analysis, giving Q1. Dataflow facts support optimizations such as dead-code elimination and constant propagation, giving R4. Register allocation assigns machine storage during code generation, giving S2. All four pairings are needed: option B is the unique complete match.

Original paper, page 3

1 mark · MCQ
Report issue

Recursive paired Fibonacci values

Recursion

Question 18, GATE 2009: C function fun(n, f_p) sets *f_p=1 and returns 1 if n≤1; otherwise t=fun(n−1, f_p), f=t+*f_p, *f_p=t, then returns f. main initializes x=15 and prints fun(5, &x). Choices A 6; B 8; C 14; D 15.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (13 steps)

At n=1 the function returns 1 and stores 1 through the pointer, overwriting the initial 15. For n=2, 3, 4, 5 the pairs(returned value, stored value) are(2, 1), (3, 2), (5, 3), (8, 5). The printed return value is 8, B.

The pointer is shared through all recursive calls, so its value must be tracked alongside the returned integer. The deepest call overwrites 15 with 1; thus 15 contributes nothing to the result. Each unwinding step returns the sum of the previous two Fibonacci-like values and stores the former return value for the next step. A trace gives n1:(1, 1), n2:(2, 1), n3:(3, 2), n4:(5, 3), n5:(8, 5). printf uses the returned 8, not the final stored 5.

Original paper, page 4

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

Ranking software coupling

Software Engineering

Question 19, GATE 2009: Rank coupling strongest to weakest: I content, II common, III control, IV stamp, V data. A I-II-III-IV-V; B V-IV-III-II-I; C I-III-V-II-IV; D IV-II-V-III-I.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

From strongest to weakest, content coupling reaches into another module’s internals; common coupling shares global state; control coupling passes control flags; stamp coupling passes a larger composite record; data coupling passes only needed data values. Thus I, II, III, IV, V, option A.

The ordering measures how much one module relies on another’s implementation. Content coupling directly accesses internals and is most intrusive. Common coupling shares globals; control coupling tells another module which action to take; stamp coupling passes a composite structure with more fields than needed; data coupling passes only the required values. Thus I-II-III-IV-V is the conventional ranking, A. This software-engineering topic is retained as supplemental coverage.

Original paper, page 4

1 mark · MCQ
Not in GATE 2027 syllabusReport issue

HTML row and column spans

Web Technologies

Question 20, GATE 2009: An HTML table has three rows. Row 1 contains ab with rowspan 2 and cd with colspan 2. Row 2 contains ef and gh with rowspan 2. Row 3 contains ik with colspan 2. Count visible cell regions per column and per row: A (2, 2, 3)/(2, 3, 2); B (2, 2, 3)/(2, 2, 3); C (2, 3, 2)/(2, 3, 2); D (2, 3, 2)/(2, 2, 3).
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

The logical 3×3 grid is [ab, cd, cd], [ab, ef, gh], [ik, ik, gh]. Counting distinct vertically separated cells in each column gives 2, 3, 2. Counting distinct horizontally separated cells in each row likewise gives 2, 3, 2. Thus C. These counts refer to the visible cell regions after spans, not the number of underlying grid coordinates.

Expand the spans onto a three-by-three logical grid: row 1 ab, cd, cd; row 2 ab, ef, gh; row 3 ik, ik, gh. In column 1 the first two slots form one ab cell and the last is ik, giving 2 regions. Column 2 has cd, ef, ik, giving 3. Column 3 has cd then a two-row gh, giving 2. The same horizontal counting gives 2, 3, 2 by row. The question counts distinct drawn regions, not the three underlying grid positions in each direction.

Original paper, page 4

2 marks · MCQ
Report issue

Biased die conditional probability

Probability & Random Variables

Question 21, GATE 2009: For a biased six-faced die, P(odd)=0.9P(even), the three even faces are equally likely, and P(even | value>3)=0.75. Which is closest to P(value>3)? A 0.453; B 0.468; C 0.485; D 0.492.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Let E=P(even). Since P(odd)=.9E and probabilities sum to 1, E=10/19. Each even face has probability 10/57. Therefore P(even and >3)=P(4)+P(6)=20/57. Dividing by the given conditional probability 3/4 gives P(>3)=80/171≈.46784, closest to.468, B.

Let total even probability be e. Then 1=e+0.9e=1.9e, so e=10/19. Equal even faces each have probability e/3=10/57. Event even and greater than 3 consists precisely of 4 and 6, giving 20/57. Conditional probability equals intersection divided by P(value>3); hence 0.75=(20/57)/p and p=80/171≈0.46784. Choose the nearest offered value 0.468. No equality assumption for the three odd faces was needed.

Original paper, page 5

2 marks · MCQ
Report issue

Generators from a cyclic-group table

Algebraic Structures

Question 22, GATE 2009: A cyclic group has rows/columns a, b, c, d and multiplication rows [a, b, c, d], [b, a, d, c], [c, d, b, a], [d, c, a, b]. Which pair generates the group? A a, b; B b, c; C c, d; D d, a.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

The identity is a. The powers of c are c, b, d, a, and those of d are d, b, c, a, so each generates all four elements. The element b has order 2 and a order 1. Thus the generators are c, d, option C.

The first row/column shows a acts as identity. The element b squares to a, so it generates only{a, b}. From the table c²=b, c³=d, c⁴=a, which visits all elements. Similarly d²=b, d³=c, d⁴=a. Therefore exactly c and d have order 4 and generate the cyclic group, option C. Being nonidentity alone does not guarantee being a generator.

Original paper, page 5

2 marks · MCQ
Report issue

Gold or silver implies precious

Propositional & Predicate Logic

Question 23, GATE 2009: G(x), S(x), P(x) mean x is a gold ornament, silver ornament, precious. Formalize “Gold and silver ornaments are precious.” A ∀x(P→(G∧S)); B ∀x((G∧S)→P); C ∃x((G∧S)→P); D ∀x((G∨S)→P).
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The sentence applies to both categories separately: every object that is a gold ornament or a silver ornament is precious. Its formula is∀x((G(x)∨S(x))→P(x)), D. Using conjunction would restrict the statement to ornaments simultaneously in both categories.

The intended universal statement covers either kind of ornament: if an object is gold OR silver, it is precious. Thus the antecedent must use disjunction and the quantifier must be universal, giving D. B says only objects simultaneously gold and silver are precious, which misses gold-only objects. A reverses the implication and requires both materials for every precious object. C makes only an existential assertion and can hold vacuously for an unrelated object.

Original paper, page 5

2 marks · MCQ
Report issue

Truth-table operation expressing disjunction

Propositional & Predicate Logic

Question 24, GATE 2009: Operation P□Q outputs T, T, F, T on inputs TT, TF, FT, FF respectively. Which equals P∨Q? A ¬Q□¬P; B P□¬Q; C ¬P□Q; D ¬P□¬Q.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The given operation is false only when its first argument is false and its second true, so P□Q=P∨¬Q. Substituting¬Q for the second argument yields P□¬Q=P∨Q, option B.

Inspect the sole false row: P is false while Q is true. This is exactly the false case of Q→P, equivalently P∨¬Q. To remove the negation on the second variable, supply ¬Q as that argument: P□¬Q=P∨¬¬Q=P∨Q. This is option B. A quick countercheck with P=Q=false rejects substitutions that incorrectly produce true in that case.

Original paper, page 5

2 marks · MCQ
Report issue

Tangent-difference integral

Calculus

Question 25, GATE 2009: Evaluate ∫₀^(π/4)(1−tan x)/(1+tan x) dx. A 0; B 1; C ln2; D(1/2)ln2.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The integrand equals tan(π/4−x). Substitute u=π/4−x to obtain the integral of tan u from 0 toπ/4. Its antiderivative is−ln(cos u), giving−ln(1/√2)=½ln2, D.

Use tan(α−β)=(tanα−tanβ)/(1+tanαtanβ) with α=π/4. The integrand becomes tan(π/4−x). Set u=π/4−x; reversing the bounds cancels the minus from dx, leaving ∫₀π/4tan u du. The antiderivative −ln(cos u) evaluates to−ln(1/√2)+ln1=(1/2)ln2. The interval contains no pole, so the substitution is valid throughout.

Original paper, page 5

2 marks · MCQ
Report issue

Negating a universal quantifier

Propositional & Predicate Logic

Question 26, GATE 2009: Which pair is equivalent? I ¬∀xP(x); II ¬∃xP(x); III ¬∃x¬P(x); IV ∃x¬P(x). A I, III; B I, IV; C II, III; D II, IV.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

By quantifier negation, ¬∀xP(x) is equivalent to∃x¬P(x). These are I and IV, option B. II means every object fails P, while III means every object satisfies P; neither is generally equivalent to I.

Negating “every object satisfies P” means “some object does not satisfy P.” Thus I and IV express precisely the same proposition. In contrast, II says no object satisfies P, while III says no object fails P. On a domain with one P-object and one non-P-object, I/IV are true but II/III are false; this separates the alternatives directly. Answer B.

Original paper, page 6

2 marks · MCQ
Report issue

Shortest input to a specified FSM output

Finite-State Machine Design

Question 27, GATE 2009: A two-bit state AB starts 00. For input 0, states 00, 01, 10, 11 transition respectively to 00, 10, 01, 10 with outputs 1, 0, 0, 0. For input 1 they transition to 01, 00, 01, 00 with outputs 0, 1, 1, 1. Minimum input length that arrives in 01 while emitting 1? A 3; B 4; C 5; D 6.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

The only transition ending in state 01 with output 1 is from state 10 on input 1. From 00, reaching 10 requires at least two inputs:00 --1/0-->01 --0/0-->10. Appending 1 reaches 01 and emits 1. Thus input 101 achieves the target in 3 steps, and the predecessor argument rules out shorter inputs. Answer A.

Work backward from the desired transition: among rows ending in 01, output 1 occurs only from 10 on input 1. From initial 00, a single input reaches only 00 or 01, never 10, so at least two inputs are needed before the final 1. Input 1 reaches 01 with output 0, then 0 reaches 10 with output 0, then 1 reaches 01 with output 1. This witness 101 has length 3 and matches the lower bound.

Original paper, page 6

2 marks · MCQ
Report issue

Variable-stage pipeline schedule

Pipelining & Hazards

Question 28, GATE 2009: Four pipeline stages S1–S4 require cycles per instruction: I1=(2, 1, 1, 1), I2=(1, 3, 2, 2), I3=(2, 1, 1, 3), I4=(1, 2, 2, 2). Execute two iterations of I1, I2, I3, I4. Find total cycles under overlapping buffered-stage execution, ignoring loop-control overhead: A 16; B 23; C 28; D 30.
Tap to enlarge
Your answer
Answer & solution

Answer: B under continuous overlapped execution (no official key was published)

Ignoring loop-control overhead and allowing the eight instructions from two iterations to overlap, each stage starts after both its instruction’s previous stage and the previous instruction’s same stage finish. The four stage-completion times are(2, 3, 4, 5), (3, 6, 8, 10), (5, 7, 9, 13), (6, 9, 11, 15), (8, 10, 12, 16), (9, 13, 15, 18), (11, 14, 16, 21), (12, 16, 18, 23). Thus completion is at cycle 23, B. This recurrence uses buffered stage outputs; it does not charge an additional loop branch or force a pipeline drain between iterations. Such implementation choices are not explicitly specified by the prompt.

Construct a completion-time grid. A cell cannot start until the same instruction finishes its prior stage and the previous instruction releases this stage. Thus completion(i, j)=max(completion(i−1, j), completion(i, j−1))+duration(i, j). Applying it to the eight instruction rows yields final completion 23; the full row table is given above. Simply summing durations would ignore overlap, while assuming every stage takes one cycle ignores the supplied table. Pipeline draining or stage blocking without buffers changes the model, so those assumptions remain explicit.

Original paper, page 6

2 marks · MCQ
Report issue

Four-way set-associative LRU contents

Cache Memory

Question 29, GATE 2009: An initially empty four-way cache has 16 blocks and memory 256 blocks. Reference sequence:0, 255, 1, 4, 3, 8, 133, 159, 216, 129, 63, 8, 48, 32, 73, 92, 155. With LRU within each set, which block is absent at the end? A 3; B 8; C 129; D 216.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

There are 16/4=4 sets, selected by block number modulo 4. Simulating LRU gives oldest-to-newest final sets: set 0=[8, 48, 32, 92], set 1=[1, 133, 129, 73], set 2=[], set 3=[3, 159, 63, 155]. Thus 3, 8, 129 remain but 216 has been evicted, D. In set 0, insertion 32 removes 4 and insertion 92 removes 216 after 8 was refreshed.

There are 16/4=4 sets; choose set number by block modulo 4. Only blocks mapping to the same set compete for four ways. In set 0, references are 0, 4, 8, 216, 8, 48, 32, 92. The second 8 refreshes its recency; inserting 48 removes 0, 32 removes 4, and 92 removes 216. The final set is 8, 48, 32, 92. Other sets retain 3 and 129. Hence 216, option D, is the absent listed block.

Original paper, page 6

2 marks · MCQ
Report issue

Concurrent resource requests and completion

Deadlocks

Question 30, GATE 2009: Resources R1, R2, R3, R4 have totals 3, 2, 3, 2. Requests are nonpreemptive and all-or-nothing. Independent progress timelines: P1 t0 requests 2R2, t1 requests 1R3, t3 requests 2R1, t5 releases 1R2+1R1, t7 releases 1R3, t8 requests 2R4, t10 finishes. P2 t0 requests 2R3, t2 requests 1R4, t4 requests 1R1, t6 releases 1R3, t8 finishes. P3 t0 requests 1R4, t2 requests 2R1, t5 releases 2R1, t7 requests 1R2, t8 requests 1R3, t9 finishes. Starting together, choose A all finish; B only P1/P2 deadlock; C only P1/P3 deadlock; D all deadlock.
Tap to enlarge
Your answer
Answer & solution

Answer: A under blocked-process local time (no official key was published)

Initially P1 holds both R2 units, P2 two R3 units, and P3 one R4. P1 obtains its R3 at 1; P2 obtains its R4 and P3 two R1 at 2. P1 then waits for two R1 at 3 because only one is free. P2 can take that last R1 at 4. At 5 P3 releases its two R1, allowing P1 to resume. Its local-time 5 releases now occur at wall time 7, providing the R2 requested by P3. P2 releases R3 at 6 and finishes at 8, so P3 can obtain R3 at 8 and finish at 9. P1’s later two-R4 request can be satisfied after those completions, and it finishes. No circular wait persists; A. The timeline treats each listed time as progress time in an independently running process, with blocked execution delayed.

A temporary wait is not sufficient evidence of deadlock: check whether another process can still progress and release the needed resource. At time 3, P1 lacks its two R1 units, but P3 will release two at time 5 without needing anything from P1 first. That release allows P1 to resume. P1’s later release of R2 lets P3 progress; P2 independently releases R3 and finishes. The dependency chain therefore has an escape. Using progress times delayed during blocking gives the timeline above and all processes eventually finish, A. Treating delayed operations as occurring retroactively at their original wall times would be inconsistent.

Original paper, page 7

2 marks · MCQ
Report issue

SSTF total disk movement

I/O & Disk Scheduling

Question 31, GATE 2009: A disk has 100 cylinders, head initially 50, all requests pending in listed order 4, 34, 10, 7, 19, 73, 2, 15, 6, 20. SSTF costs 1 ms per cylinder moved. Total seek time? A 95; B 119; C 233; D 276 ms.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (12 steps)

With all listed requests pending, SSTF visits 50→34→20→19→15→10→7→6→4→2→73. The decreasing leg costs 48 cylinders and the final increasing leg 71, totaling 119. At 1 ms per adjacent cylinder the seek time is 119 ms, B, excluding unspecified transfer/rotation costs.

At 50, the nearest pending request is 34 (distance 16), not 73 (distance 23). From 34 choose 20, then 19, 15, 10, 7, 6, 4, 2, always the nearest remaining cylinder. This monotone descent costs 50−2=48 in total. Only 73 then remains, costing 73−2=71. Total movement 119 times 1 ms gives 119 ms. Initial request order is irrelevant after all are pending under SSTF; FCFS would follow that order and produce a different answer.

Original paper, page 7

2 marks · MCQ
Report issue

Process-state transition interpretation

Processes, Threads & System Calls

Question 32, GATE 2009: Process transitions: A Start→Ready; B Ready→Running; C Running→Ready; D Running→Terminated; E Blocked→Ready; F Running→Blocked. A uniprocessor always has some ready processes. Assess I D immediately causes another A; II E may occur while another process runs; III preemptive scheduling; IV nonpreemptive scheduling. A I/II; B I/III; C II/III; D II/IV.
Tap to enlarge
Your answer
Answer & solution

Answer: C under conventional preemption labeling (no official key was published)

D terminates a running process; another ready process is dispatched through B, not newly admitted through A, so I is false. A blocked process can become ready by E while another runs, so II is true. The running-to-ready edge C represents preemption in the conventional diagram, making III true and IV false. Thus II and III, C. If C were instead explicitly defined as voluntary yield, the drawing alone would not establish preemption; the usual state-diagram convention is used.

Termination frees the CPU, so the scheduler dispatches an already ready process along B. It need not create or admit a process along A, making I false. An I/O completion can move a different process from blocked to ready while the CPU is busy, making II true. Under the conventional interpretation, C is preemption and distinguishes the diagram from a purely nonpreemptive scheduler. Thus III is selected with II; if C instead explicitly meant voluntary yield, that additional meaning would need a separate analysis.

Original paper, page 7

2 marks · MCQ
Report issue

Test-and-set spinlock guarantees

Synchronization & Concurrency

Question 33, GATE 2009: Shared lock X starts 0. enter_CS spins while atomic test-and-set(X) returns true; leave_CS writes X=0. Assess I deadlock-free; II starvation-free; III FIFO entry; IV multiple simultaneous entrants. A I only; B I/II; C II/III; D IV only.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Atomic test-and-set allows exactly one contender to observe 0 and enter, preserving mutual exclusion. When the current holder eventually leaves and resets X, some contender can acquire it, so the lock is deadlock-free under ordinary progress assumptions. There is no FIFO order or bounded-wait guarantee: the same process can repeatedly win and starve another. Only I holds, A. X denotes shared lock storage in this pseudocode, not an ordinary pass-by-value C local.

The atomic operation returns the old flag and sets it to 1 as one indivisible action. Only one contender can see old 0, so IV is false. Once the holder releases, some waiting process can succeed, assuming the holder and scheduler make ordinary progress; this supplies deadlock freedom. But no queue orders contenders. A newly arriving or repeatedly scheduled process can keep winning before another waiter, defeating both FIFO and starvation freedom. Therefore only I is justified.

Original paper, page 8

2 marks · MCQ
Report issue

Space benefit of multilevel page tables

Virtual Memory & Paging

Question 34, GATE 2009: Why prefer multilevel over single-level page tables? A shorter memory access time; B reduced page-table storage for a process virtual address space; C required by a TLB; D fewer replacement page faults.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

A sparse virtual address space need not allocate lower-level page tables for unused regions. This can reduce the resident page-table storage compared with a full flat table, B. Extra levels do not inherently shorten a page walk, eliminate page faults or become mandatory merely because a TLB exists.

A flat table allocates an entry for every possible virtual page even when most virtual regions are unused. A multilevel table can omit entire lower-level tables for absent regions, saving storage. This is the purpose captured by B. The price may be additional memory references on a TLB miss, not a guaranteed speedup. Neither a TLB nor the page-replacement policy logically requires a multilevel representation.

Original paper, page 8

2 marks · MCQ
Report issue

Geometric-sum recurrence

Asymptotic Analysis & Recurrences

Question 35, GATE 2009: T(n)=n for n≤3, otherwise T(n)=T(n/3)+cn with fixed c>0. Which growth rate? A Θ(n); B Θ(n log n); C Θ(n²); D Θ(n² log n).
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Expanding T(n)=T(n/3)+cn gives cn+cn/3+cn/9+... plus a constant-size base case. For fixed positive c this is bounded above by(3c/2)n+O(1) and below by cn. Hence Θ(n), A, with routine integer rounding not changing the asymptotic result.

The recursion tree has only one child, whose size shrinks by 3. Work by level is cn, cn/3, cn/9, … . The geometric sum is below cn/(1−1/3)=1.5cn, while the root alone contributes cn. These upper and lower linear bounds establish Θ(n). The depth is logarithmic, but multiplying n by that depth overcounts because work per level decreases rather than remaining n.

Original paper, page 8

2 marks · MCQ
Report issue

Linear-probing hash insertion

Hashing

Question 36, GATE 2009: Insert 12, 18, 13, 2, 3, 23, 5, 15 in an empty 10-slot table using h(k)=k mod 10 and linear probing. Candidate A stores 2:2, 3:23, 5:15, 8:18; B stores 2:12, 3:13, 5:5, 8:18; C stores slots 2–9 as 12, 13, 2, 3, 23, 5, 18, 15; D chains 2:[12, 2], 3:[13, 3, 23], 5:[5, 15], 8:[18]. Other slots empty. Which is correct?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (10 steps)

Insertions place 12 at 2, 18 at 8, 13 at 3, 2 at 4, 3 at 5, 23 at 6, 5 at 7 and 15 at 9 after probing past occupied slots 5 through 8. The final slots 2–9 are 12, 13, 2, 3, 23, 5, 18, 15, exactly option C.

Probe consecutive slots until empty. First 12→2 and 18→8; 13→3. Key 2 collides at 2 and 3, so goes 4. Key 3 goes 5; 23 goes 6; 5 goes 7. Finally 15 probes 5, 6, 7, 8 before reaching 9. This yields candidate C. D instead uses chaining, which is explicitly not the requested collision strategy; A/B discard keys rather than preserving them in later empty slots.

Original paper, page 8

2 marks · MCQ
Report issue

Maximum AVL height with seven nodes

Binary Search & Balanced Trees

Question 37, GATE 2009: Maximum edge-height of an AVL tree with 7 nodes, with singleton height 0? A 2; B 3; C 4; D 5.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The minimum-node recurrence for edge height h is N(h)=1+N(h−1)+N(h−2), with N(−1)=0, N(0)=1. Hence N(1)=2, N(2)=4, N(3)=7, N(4)=12. Seven nodes attain height 3 but cannot reach 4, so B.

To make an AVL tree as tall as possible with few nodes, give its two subtrees heights h−1 and h−2. Thus the minimum nodes at height h obey N(h)=1+N(h−1)+N(h−2). Starting with empty height−1 and singleton 0 gives 0, 1, 2, 4, 7, 12. Seven nodes suffice exactly for height 3, but any height 4 tree needs at least 12. This proves both attainability and impossibility, so B.

Original paper, page 9

2 marks · MCQ
Report issue

Invalid Kruskal edge order

Graph Algorithms

Question 38, GATE 2009: Weighted undirected graph edges ab 5, ac 3, bc 4, be 2, bd 6, cd 5, de 6, df 6, cf 6, ef 3, eg 5, fg 4. Which accepted-edge sequence cannot be Kruskal? A be, ef, ac, bc, fg, cd; B be, ef, ac, fg, bc, cd; C be, ac, ef, bc, fg, cd; D be, ef, bc, ac, fg, cd.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (4 options)

Kruskal considers accepted edges in nondecreasing weight. The relevant weights are be 2, ef 3, ac 3, bc 4, fg 4, cd 5. Equal-weight 3 or 4 edges may be interchanged in the valid choices. D instead accepts bc of weight 4 before ac of weight 3, even though ac can be safely accepted at that point. Thus D is not a possible Kruskal acceptance order.

Kruskal sorts by edge weight and accepts an edge whenever it connects two different components. The unique weight 2 edge be comes first. Both weight 3 edges ef and ac can be accepted, in either order, before any weight 4 edge. The weight 4 pair bc, fg can also be exchanged. D violates this by putting bc before ac. At that point ac is not cyclic, so it cannot have been skipped. The other orders respect both sorted weights and cycle avoidance.

Original paper, page 9

2 marks · MCQ
Report issue

Quicksort with a fixed-rank fractional pivot

Searching, Sorting & Selection

Question 39, GATE 2009: Quicksort selects the n/4-th smallest key as pivot using a linear-time selection algorithm. What is its worst-case time? A Θ(n); B Θ(n log n); C Θ(n²); D Θ(n² log n).
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Selecting the one-quarter order statistic in linear time gives recurrence T(n)=T(n/4)+T(3n/4−1)+Θ(n). Each recursion level has linear total work, and the longest/shortest nontrivial paths are logarithmic up to constants. Equivalently the Akra–Bazzi exponent is 1 because 1/4+3/4=1. Thus Θ(n log n), B, assuming rank partitioning is implemented appropriately for distinct keys or duplicates.

At each partition, linear-time selection plus partitioning costs Θ(n), and subproblems have sizes approximately n/4 and 3n/4. Both are fixed fractions, so recursion depth is Θ(log n); total size across a complete level remains proportional to n until leaves. Consequently total cost is Θ(n log n). Choosing the quarter-rank pivot is not perfectly balanced, but still prevents the n−1 versus 0 split responsible for quadratic quicksort.

Original paper, page 9

2 marks · MCQ
Report issue

Intersection leaves an equal-block prefix

Context-Free Grammars & Languages

Question 40, GATE 2009: L1={a^m b^m c a^n b^n:m, n≥0}; L2={a^i b^j c^k:i, j, k≥0}; L=L1∩L2. Classify: A not recursive; B regular; C context-free but nonregular; D RE but not context-free.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

L1 contains exactly one c between am bm and an bn. For membership in L2=a*b*c*, no a or b may follow that c, so n=0. Thus the intersection is{am bm c:m≥0}. A grammar for it is S→Tc, T→aTb|ε. The language is context-free and nonregular: removing its fixed final c by regular right quotient would otherwise make{am bm} regular. Therefore C.

L2 permits only a block of a’s, then b’s, then c’s. A word of L1 has one central c, so its trailing an bn must be empty to fit L2. Thus L={am bm c:m≥0}. The grammar S→Tc and T→aTb|ε proves context-freeness. For nonregularity, removing the final fixed c from a hypothetical finite automaton would recognize the classic nonregular language am bm. Hence C, not the much stronger undecidability alternatives.

Original paper, page 9

2 marks · MCQ
Report issue

DFA accepting a two-zero suffix

Finite Automata

Question 41, GATE 2009: A DFA starts q0, accepts only q2. On 0, q0→q1→q2→q2; on 1, all states go q0. What does it accept? A strings beginning 0 or 1; B ending 0; C ending 00; D containing 00.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

The states record zero, one, or at least two consecutive zeros at the end. Every 1 returns to the start state; 0 advances to the accepting state after the second consecutive zero, where further zeros loop. Hence exactly strings ending 00 are accepted, C, rather than all strings that merely contain 00 somewhere.

The state records the length of the current suffix of consecutive zeros, capped at 2. Reading 1 resets that suffix to length 0. Reading a second consecutive 0 reaches q2; additional zeros stay accepting. A string such as 001 contains 00 but ends in 1 and is rejected, separating C from D. A single 0 reaches q1 and is rejected, separating C from B.

Original paper, page 9

2 marks · MCQ
Report issue

Compiler implementation statements

Other / Mixed Topics

Question 42, GATE 2009: Assess I some programming-language parsers have complexity below Θ(n³); II recursion can be implemented with static storage allocation; III no L-attributed definition can be evaluated bottom-up; IV optimization can occur at source and intermediate-code levels. A I/II; B I/IV; C III/IV; D I/III/IV.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

I is true: LL/LR parsing for suitable grammars runs in linear time, below the general cubic CFL bound. II is false for unrestricted recursion under static allocation of activation records, since simultaneous recursive calls need distinct storage. III is false because S-attributed definitions are also L-attributed and can be evaluated bottom-up. IV is true: optimizations may occur at source and intermediate-code levels. Thus I and IV, B. Tail-recursive/bounded special cases do not justify the unrestricted static-allocation claim.

LL/LR parsers for suitable grammars run in linear time, establishing I without claiming every CFG can be parsed that way. Unbounded recursive activation records cannot all be assigned one fixed static location, so II is false in the intended general model. S-attributed definitions are a subclass of L-attributed ones and can be evaluated bottom-up, disproving III’s universal negative. Algebraic source rewrites and intermediate-code optimizations illustrate IV. Therefore I and IV are true.

Original paper, page 9

2 marks · MCQ
Report issue

Conflict serializability of four schedules

Transactions & Concurrency Control

Question 43, GATE 2009: T1=R1x, W1x, W1y; T2=R2x, R2y, W2y. S1=R1x, R2x, R2y, W1x, W1y, W2y; S2=R1x, R2x, R2y, W1x, W2y, W1y; S3=R1x, W1x, R2x, W1y, R2y, W2y; S4=R2x, R2y, R1x, W1x, W1y, W2y. Which are conflict-serializable? A S1/S2; B S2/S3; C S3 only; D S4 only.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (4 schedules)

S1 has T2→T1 from r2(x) before w1(x), but T1→T2 from w1(y) before w2(y), so it cycles. S2 has only T2→T1: both its reads and final write of y precede T1’s conflicting writes. S3 has only T1→T2, as w1(x) and w1(y) precede T2’s accesses. S4 cycles for the same opposing x and y directions as S1. Therefore S2 and S3 are conflict-serializable, B.

Build one vertex per transaction and add an edge when an earlier operation conflicts with a later operation of the other transaction on the same item, with at least one write. Reads of different items or two reads do not conflict. S2 has only 2→1, so it is equivalent to serial T2, T1; S3 has only 1→2. S1/S4 each contain both directions and therefore a directed cycle. Acyclicity, not whether operations are interleaved, determines conflict serializability.

Original paper, page 10

2 marks · MCQ
Report issue

Maximum B-plus leaf splits

B-Trees & Multiway Search Trees

Question 44, GATE 2009: Insert 10, 3, 6, 8, 4, 2, 1 into an empty B+ tree. Internal nodes allow at most 3 child pointers; leaves at most 2 data items. What is the maximum number of leaf splits, allowing valid choices of how 3 overflow items split? A 2; B 3; C 4; D 5.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

There can be at most one leaf split per insertion; the first two keys fit in the initial two-item leaf, so at most five splits occur. This bound is attained by leaving two smaller keys in the left leaf and one larger key in the right leaf at each overflow. Starting[3, 10], insertion 6 gives[3, 6]|[10]; 8 gives[3, 6]|[8]|[10]; 4 gives[3, 4]|[6]|[8]|[10]; 2 gives[2, 3]|[4]|[6]|[8]|[10]; 1 gives[1, 2]|[3]|[4]|[6]|[8]|[10]. Thus all five later insertions split a leaf, D. Internal-node splits are not counted. Exhaustive permitted split-choice enumeration confirms the maximum 5.

The first two insertions cannot split a capacity-two leaf. There are only five insertions left and each can overflow at most one leaf, so five is an upper bound. The explicit sequence of valid 1/2 splits in the baseline attains one split on each remaining insertion. That witness proves the maximum, not merely an observed count under one fixed implementation. Promoted separator changes and internal-node splits do not add to the requested leaf-split count.

Original paper, page 10

2 marks · MCQ
Report issue

Relational division formulations

Relational Algebra & Calculus

Question 45, GATE 2009: Relations r on R={a, b, c}, s on S={c}. I=π_ab(r)−π_ab((π_ab(r)×s)−r). II={t∈π_ab(r):∀u∈s ∃v∈r(u=v[c]∧t=v[ab])}. III replaces that quantification by∀v∈r ∃u∈s with the same equality predicates. IV SELECT R.a, R.b FROM R, S WHERE R.c=S.c. Which pair is equivalent? A I/II; B I/III; C II/IV; D III/IV.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

I begins with candidate(a, b) pairs from r and removes those for which some c in s is missing from r, exactly relational division r÷s. II expresses the same condition: for every tuple u in s there exists a tuple v in r matching both u’s c and the candidate(a, b). Thus I and II are equivalent, A, including empty s because both restrict candidates to the projection of r. III reverses the quantifiers and requires all r tuples to share the candidate pair; IV is only an existential matching join, not universal division.

Division asks for candidates paired with every c in s. Expression I constructs all required candidate/c combinations, subtracts actual tuples to find missing combinations, then removes the candidates with any missing one. II directly quantifies the same every-c requirement. A join only requires at least one matching c, so IV cannot replace division. Empty s is handled consistently because both I and II retain candidates only fromπ_ab(r), rather than introducing an infinite domain.

Original paper, page 10

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

RSA exponent and modulus conditions

Network Security

Question 46, GATE 2009: RSA has n=pq and φ(n)=(p−1)(q−1), message 0<M<n. The source calls(e, n) private and(d, n) public. Assess I M′=M^e mod n and M=(M′)^d mod n; II ed≡1 mod n; III ed≡1 mod φ(n); IV both message exponentiations use modulusφ(n). A I/II; B I/III; C II/IV; D III/IV.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

RSA exponentiation is modulo n=pq, and the chosen exponents obey ed≡1 (mod φ(n)), with φ(n)=(p−1)(q−1). Thus statements I and III are correct, option B. Writing ed=1+kφ(n), Euler’s theorem proves Med≡M modulo n when M is coprime to n; reduction separately modulo p and q, followed by the Chinese remainder theorem, also proves it for non-coprime messages. Statement II incorrectly uses modulus n for the exponent-inverse condition; IV incorrectly performs message arithmetic modulo φ(n). The question reverses the usual names of e and d (calling e private and d public), but RSA’s mathematical inversion works either way and the answer is unchanged.

Two different moduli serve different roles. Messages live modulo n, while the inverse relationship between exponents is taken moduloφ(n) (or a suitable Carmichael modulus in other formulations). Combining the message exponentiations gives Med; choosing ed=1+kφ(n) returns M. This explains I and III and rejects the distractors that interchange these moduli. The source’s naming of e and d is reversed from many textbooks but does not alter the algebra.

Original paper, page 10

2 marks · MCQ
Report issue

Minimum sequence-number progression

Transport, Congestion Control & Traffic Shaping

Question 47, GATE 2009: TCP initial sequence numbers use the low 32 bits of a persistent time-of-day counter incremented once per millisecond. Maximum packet lifetime 64 s. The source asks the minimum permissible rate of sequence-number increase in a connection. Choices A 0.015/s; B 0.064/s; C 0.135/s; D 0.327/s. Connection duration is not specified; the listed-result derivation requires an explicit extra model.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Let S=232, clock rate C=1000/s, packet lifetime M=64 s, and a constant-rate connection start at time 0 with initial sequence number 0, so its sequence trajectory is q(t)=rt. For r<C, the next occurrence of this sequence value on the returning clock trajectory is at time (S+rt)/C. To let a packet sent at t expire before that clock reuse, require (S+rt)/C−t≥M, equivalently (C−r)t≤S−CM. Requiring this throughout a connection of duration D therefore gives r≥C−(S−CM)/D (with nonnegative rates understood). If the intended duration is one clock cycle, D=S/C, this becomes r≥C²M/S=1000²×64/232=0.0149011612/s, closest to A, 0.015/s. This is an exact conditional derivation under the stated constant-rate, returning-clock model. The question does not actually specify D: the tiny minimum is therefore conditional on the one-clock-cycle interpretation, not a universal minimum. In particular, every r<C eventually reaches the returning forbidden strip if the connection continues indefinitely. The original 1/M shortcut is unjustified and is not used. Conceptual reference: Tanenbaum, Computer Networks, 5th edition, Figure 6-10 (clock-based forbidden regions); https://csc-knu.github.io/sys-prog/books/Andrew%20S.%20Tanenbaum%20-%20Computer%20Networks.pdf .

Do not infer a universal rate from 64 seconds alone:1/64 is not derived from the supplied 32-bit clock. Under a constant-rate trajectory and a connection lasting exactly one clock wrap, substitution yields r≥1000²·64/2³²≈0.014901/s, nearest A. The baseline derives the time-to-reuse inequality and shows where that extra duration enters. For an indefinitely long connection, any rate below the clock slope eventually meets the returning forbidden region. Thus the numeric choice is conditional; absent the duration/model assumption, the prompt does not uniquely define that minimum.

Original paper, page 11

2 marks · MCQ
Report issue

CRC detection of odd-weight errors

Data Link, Framing, Error Control & ARQ

Question 48, GATE 2009: What condition on CRC generator G(x) detects all odd-weight bit errors? A more than two terms; B G does not divide 1+x^k for any k within frame length; C 1+x divides G; D an odd number of terms.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Over GF(2), an error polynomial E(x) with an odd number of nonzero coefficients satisfies E(1)=1. If x+1 divides G(x), every multiple of G(x) evaluates to zero at x=1. Therefore no odd-weight E(x) is divisible by G(x), and every such error has a nonzero CRC syndrome. Hence C. Option B instead addresses two-bit errors of the form xi(1+xk); merely having more than two terms is insufficient, and an odd number of terms makes G(1)=1 rather than giving the needed x+1 factor.

A polynomial has factor x+1 over GF(2) exactly when its value at 1 is 0, meaning an even number of nonzero coefficients. An odd-weight error has E(1)=1, so it cannot be a multiple of a generator that vanishes at 1. Therefore its division remainder cannot be zero, and the CRC detects it. This parity argument establishes C without enumerating error positions. The condition about 1+xk is associated with two-bit errors, not all odd-weight errors.

Original paper, page 11

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Data-flow diagram conventions

Software Engineering

Question 49, GATE 2009: DFD assertions: I context diagram represents system as one bubble; II external entities must be identified at every level; III control information should not appear; IV stores may connect directly to another store or external entity. A II/III; B I/II/IV; C I/III; D I/II/III.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

I is true: the context diagram represents the entire system as a single process or bubble and shows its boundary interactions. II is false: external entities need not be repeated at every decomposition level; lower-level DFDs elaborate relevant processes and flows. III is true in conventional DFD notation: a DFD models data transformation and movement, not execution-control information. IV is false: a data store cannot directly exchange data with another store or an external entity; a process must intervene. Therefore I and III, option C. Supplemental topic: software engineering / structured analysis, outside the collection’s twelve core subject buckets.

A context diagram deliberately hides internal decomposition behind one process, so I describes its purpose. Lower-level diagrams refine relevant flows and need not duplicate every external entity, refuting II. Ordinary DFD arrows describe data rather than the temporal order or branching control of execution, supporting III. Data must pass through a transforming process between a store and another store/entity, refuting IV. These conventions select C; real-time DFD extensions require additional notation.

Original paper, page 11

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Cyclomatic complexity interpretations

Software Engineering

Question 50, GATE 2009: Cyclomatic complexity assertions: I equals maximum independent circuits; II equals decisions+1; III gives independent paths for basis-path tests. A I/II; B II/III; C I/III; D all. Interpret circuit augmentation and binary-decision conventions explicitly.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Under the standard software-testing convention all three statements are true, option D. For a connected module with E control-flow edges and N nodes, V(G)=E−N+2. Adding a virtual exit-to-entry edge gives a strongly connected/closed flow graph whose cycle-space dimension is (E+1)−N+1=E−N+2, explaining statement I’s independent-circuit interpretation. For binary predicates V(G)=number of decisions+1 (II), and V(G) gives the number of independent paths in a basis-path test set (III). The circuit wording presupposes this conventional augmentation; the raw unaugmented graph has ordinary undirected cycle rank E−N+1. Likewise a multiway branch contributes outdegree−1 rather than one unless reduced to binary decisions. Supplemental topic: software engineering / testing, outside the twelve core subject buckets.

For a connected single-entry/single-exit module, V=E−N+2. The independent-cycle interpretation uses a virtual edge from exit back to entry; omitting that augmentation gives cycle rank E−N+1 instead. Each binary predicate adds one independent alternative, yielding decisions+1, and those alternatives form a basis of test paths. Thus all three hold under the intended testing convention. Multiway decisions contribute more than one unless decomposed into binary predicates, so the wording is not an unrestricted graph theorem.

Original paper, page 11

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Convert cylinder-head-sector address

I/O & Disk Scheduling

Question 51, GATE 2009: Disk has 63 sectors/track, 10 platters with 2 surfaces each, 1000 cylinders. Zero-based address(c, h, s) orders sectors then surfaces then cylinders. Convert(400, 16, 29) to linear sector index: A 505035; B 505036; C 505037; D 505038.
Question 51, GATE 2009: Disk has 63 sectors/track, 10 platters with 2 surfaces each, 1000 cylinders. Zero-based address(c, h, s) orders sectors then surfaces then cylinders. Convert(400, 16, 29) to linear sector index: A 505035; B 505036; C 505037; D 505038.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

There are 10×2=20 recording surfaces, hence 20 tracks per cylinder. With 63 sectors per track and all indices starting at zero, linear sector index = ((c×20)+h)×63+s. For (400, 16, 29) this is (8000+16)×63+29=505008+29=505037, option C. No one-based correction applies because the shared statement explicitly labels the first sector (0, 0, 0) as sector 0.

There are 20 tracks per cylinder because each recording surface supplies one track at that radius. Convert cylinder and surface to track index 400·20+16=8016. Convert to sector index 8016·63+29=505037. Every multiplication moves one level down the address hierarchy. The explicit zero-based convention means no extra 1 is added at the end.

Original paper, page 11

2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Convert sector number to disk address

I/O & Disk Scheduling

Question 52, GATE 2009: For the same disk with 20 surfaces/cylinder and 63 sectors/track, convert zero-based linear sector 1039 to(c, h, s): A(0, 15, 31); B(0, 16, 30); C(0, 16, 31); D(0, 17, 31).
Question 52, GATE 2009: For the same disk with 20 surfaces/cylinder and 63 sectors/track, convert zero-based linear sector 1039 to(c, h, s): A(0, 15, 31); B(0, 16, 30); C(0, 16, 31); D(0, 17, 31).
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Each cylinder contains 20×63=1260 sectors. Divide 1039 by 1260: cylinder c=0 with remainder 1039. Then 1039=16×63+31, giving surface h=16 and sector s=31. Thus the address is (0, 16, 31), option C. This uses the zero-based indexing explicitly defined in the common data on physical page 11.

Invert the mixed-radix calculation. One cylinder spans 1260 sectors, so 1039 lies in cylinder 0. Divide the remainder by 63: quotient 16 is the surface and remainder 31 is the sector. Check by recomposition:((0·20)+16)·63+31=1039. This is C; options differing by one reveal the common mistake of silently switching to one-based counting.

Original paper, page 12

2 marks · MCQ
Report issue

Longest common subsequence recurrence

Dynamic Programming

Question 53, GATE 2009: Let l(i, j) be LCS length of prefixes of lengths i, j of zero-indexed X, Y. Boundary l=0 if either prefix empty; expr1 applies if last symbols match, expr2 otherwise. Which proposal is correct? A expr1=l(i−1, j)+1; B expr1=l(i, j−1); C expr2=max(l(i−1, j), l(i, j−1)); D expr2=max(l(i−1, j−1), l(i, j)).
Question 53, GATE 2009: Let l(i, j) be LCS length of prefixes of lengths i, j of zero-indexed X, Y. Boundary l=0 if either prefix empty; expr1 applies if last symbols match, expr2 otherwise. Which proposal is correct? A expr1=l(i−1, j)+1; B expr1=l(i, j−1); C expr2=max(l(i−1, j), l(i, j−1)); D expr2=max(l(i−1, j−1), l(i, j)).
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Let l(i, j) be the LCS length of the first i elements of X and first j elements of Y. If either prefix is empty, l(i, j)=0. When X[i−1]=Y[j−1], the matching final elements extend an optimal LCS of both shortened prefixes, so expr1=l(i−1, j−1)+1. If they differ, an LCS omits at least one of the two final elements, yielding expr2=max(l(i−1, j), l(i, j−1)). Only option C gives a correct proposed expression. A omits shortening Y in the matching case, B omits both the match increment and shortening X, and D is circular.

If the last symbols match, use that matched pair and extend the best solution for both shorter prefixes: l(i−1, j−1)+1. If they differ, a common subsequence must omit at least one of them, so take the larger of the two one-prefix-shortened values. Only C states a valid supplied formula. Option D references l(i, j) on its own right side and cannot define a bottom-up recurrence.

Original paper, page 12

2 marks · MCQ
Report issue

Legal LCS dynamic-programming fill orders

Dynamic Programming

Question 54, GATE 2009: Store the LCS recurrence in L[m+1, n+1]. Which is true? A every cell must first be zero; B increasing row-major or column-major computation works; C neither works; D L[p, q] must precede L[r, s] whenever p<r OR q<s.
Question 54, GATE 2009: Store the LCS recurrence in L[m+1, n+1]. Which is true? A every cell must first be zero; B increasing row-major or column-major computation works; C neither works; D L[p, q] must precede L[r, s] whenever p<r OR q<s.
Question 54, GATE 2009: Store the LCS recurrence in L[m+1, n+1]. Which is true? A every cell must first be zero; B increasing row-major or column-major computation works; C neither works; D L[p, q] must precede L[r, s] whenever p<r OR q<s.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Initialize only the empty-prefix boundary L[0, j]=L[i, 0]=0. Every other L[i, j] depends on L[i−1, j−1] in the matching case, or on L[i−1, j] and L[i, j−1] in the nonmatching case. Increasing-index row-major order computes all predecessors first; increasing-index column-major order also does so. Therefore B. Initializing every cell to zero is not necessary (A), and C contradicts these valid orders. D overstates the dependency: p<r alone does not require an arbitrarily far-right cell L[p, q] before L[r, s]; its OR condition can even demand opposite orders for incomparable cells such as (1, 2) and (2, 1).

The dependency arrows point left, up or diagonally up-left. Both increasing row order and increasing column order place all those predecessor cells before the current cell. Only row 0 and column 0 require initialization; every interior cell can be assigned when reached. The proposed OR ordering in D is too strong: cells(1, 2) and(2, 1) would each be required before the other. Therefore B.

Original paper, page 12

2 marks · MCQ
Report issue

Nested NOT IN supplier query

SQL & Queries

Question 55, GATE 2009: Schema Suppliers(sid key, sname, city, street), Parts(pid key, pname, color), Catalog(sid, pid composite key, cost). Query SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN(SELECT C.sid FROM Catalog C WHERE C.pid NOT IN(SELECT P.pid FROM Parts P WHERE P.color<>blue)). Relations nonempty. Options suppliers who A supplied a non-blue part; B have not supplied a non-blue part; C supplied only blue parts; D have not supplied only blue parts. Preserve SQL-null/referential-integrity and wording qualifications.
Question 55, GATE 2009: Schema Suppliers(sid key, sname, city, street), Parts(pid key, pname, color), Catalog(sid, pid composite key, cost). Query SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN(SELECT C.sid FROM Catalog C WHERE C.pid NOT IN(SELECT P.pid FROM Parts P WHERE P.color<>blue)). Relations nonempty. Options suppliers who A supplied a non-blue part; B have not supplied a non-blue part; C supplied only blue parts; D have not supplied only blue parts. Preserve SQL-null/referential-integrity and wording qualifications.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The innermost query finds non-blue part IDs. The middle query finds supplier IDs for catalog rows whose part is not in that set, i.e. suppliers of a blue part under the intended referential-integrity and non-NULL color assumptions. The outer NOT IN therefore returns names of suppliers who supply no blue parts, including suppliers with no catalog rows. The intended option is D, but its printed wording is imprecise: “have not supplied only blue parts” logically also includes mixed-color suppliers, whereas the SQL excludes them. A asks for any non-blue supply and also includes mixed suppliers; B and C concern suppliers with no non-blue supply / only blue supply, the opposite condition. Thus no option states the exact result under a literal reading. Do not present D as an officially verified or exact semantic equivalence.

Read the nested NOT IN clauses from inside out. First collect non-blue part IDs; next collect suppliers with a catalog part outside that set, meaning a blue part under non-null referential-integrity assumptions; finally exclude those suppliers. The result is suppliers with no blue supply, including suppliers with no catalog row. A supplier of both blue and red is excluded. That mixed-supply example demonstrates why printed D is not literally equivalent to the SQL despite being the intended choice. The discrepancy is semantic, not a reason to invent an official key.

Original paper, page 13

2 marks · MCQ
Report issue

Normal form with key-implied dependencies

Normalization & Decomposition

Question 56, GATE 2009: For the preceding schema, supplier names and street names are unique within a city, and(sname, city) is a candidate key. No FDs other than those implied by primary/candidate keys are assumed. Choose A BCNF; B 3NF not BCNF; C 2NF not 3NF; D not 2NF.
Question 56, GATE 2009: For the preceding schema, supplier names and street names are unique within a city, and(sname, city) is a candidate key. No FDs other than those implied by primary/candidate keys are assumed. Choose A BCNF; B 3NF not BCNF; C 2NF not 3NF; D not 2NF.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

The given primary keys are Suppliers.sid, Parts.pid, and Catalog.(sid, pid); Suppliers additionally has candidate key (sname, city). The question explicitly rules out functional dependencies other than those implied by primary and candidate keys. Consequently every nontrivial FD has a superkey as determinant, exactly the BCNF condition. All three relations are in BCNF, option A. Do not infer street→city from an address or infer sname alone is a key: the stipulated uniqueness is within a city and (sname, city) is explicitly the candidate key.

BCNF tests every nontrivial FD X→Y and requires X to be a superkey. The source explicitly permits only dependencies implied by the listed keys, so all such determinants qualify. Do not invent dependencies from the meaning of street or supplier name beyond the stated within-city uniqueness. Thus the schema meets BCNF and consequently the weaker normal forms as well; A is the strongest correct listed description.

Original paper, page 13

2 marks · MCQ
Report issue

Sequence bits for frames in flight

Physical Layer & Transmission

Question 57, GATE 2009: Frames 1000 bits traverse a 10^6 bps duplex link with one-way propagation 25 ms, packed back-to-back in transit. Minimum bits l to distinguish frames physically in the link? A 2; B 3; C 4; D 5.
Question 57, GATE 2009: Frames 1000 bits traverse a 10^6 bps duplex link with one-way propagation 25 ms, packed back-to-back in transit. Minimum bits l to distinguish frames physically in the link? A 2; B 3; C 4; D 5.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Frame transmission time is 1000/106=0.001 s=1 ms. One-way propagation time is 25 ms, so the link can hold (106×0.025)/1000=25 frames in transit. Distinguishing these requires l=ceil(log2 25)=5 bits, option D. This question asks about frames physically within the one-way link, not the sender window needed to cover a complete data-plus-ACK round trip; that latter calculation is not the quantity requested here.

Transmission consumes 1 ms per frame. During the 25 ms one-way propagation delay, 25 complete frame-lengths can occupy the channel, so at least 25 distinct labels are needed. Four bits give only 16 labels; five give 32 and suffice. The quantity is one-way in-flight frames, not the round-trip bandwidth-delay product for a continuously busy sender. That distinction prevents mistakenly demanding six bits here.

Original paper, page 13

2 marks · MCQ
Report issue

Waiting after a full sliding window

Data Link, Framing, Error Control & ARQ

Question 58, GATE 2009: Using the preceding l, sender window is 2^l frames and ACKs always piggyback on return frames. After the initial full window, minimum wait before next transmission, ignoring processing? A 16; B 18; C 20; D 22 ms. Immediate equal-size return frame is the timing convention.
Question 58, GATE 2009: Using the preceding l, sender window is 2^l frames and ACKs always piggyback on return frames. After the initial full window, minimum wait before next transmission, ignoring processing? A 16; B 18; C 20; D 22 ms. Immediate equal-size return frame is the timing convention.
Question 58, GATE 2009: Using the preceding l, sender window is 2^l frames and ACKs always piggyback on return frames. After the initial full window, minimum wait before next transmission, ignoring processing? A 16; B 18; C 20; D 22 ms. Immediate equal-size return frame is the timing convention.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

From Q57 l=5, so the stated sender window is 2^5=32 frames. Sending those frames takes 32×1=32 ms. The first frame is fully received after 1+25=26 ms. With an immediately sent equal-sized return frame carrying the piggybacked acknowledgment, its serialization takes 1 ms and propagation another 25 ms, so the ACK is fully received at 52 ms. The sender thus waits 52−32=20 ms after its initial burst, option C. This is the minimum: any delay waiting for a return data frame would increase it. The question stipulates the window size; do not replace it with protocol-specific Go-Back-N or Selective-Repeat sequence-space restrictions.

The first outgoing frame finishes transmission at 1 ms and arrives fully at 26 ms. An immediately transmitted 1000-bit return frame finishes its own serialization at 27 ms and arrives fully back at 52 ms. The initial 32-frame window completes sending at 32 ms. Thus the minimum additional wait is 20 ms. Waiting for return application data would increase it, so immediate piggybacking is the minimum-time assumption, not a guaranteed real traffic pattern.

Original paper, page 13

2 marks · MCQ
Report issue

Recognize an array max-heap

Heaps & Priority Queues

Question 59, GATE 2009: Which zero-based array is a binary max-heap? A[25, 12, 16, 13, 10, 8, 14]; B[25, 14, 13, 16, 10, 8, 12]; C[25, 14, 16, 13, 10, 8, 12]; D[25, 14, 12, 13, 10, 8, 16].
Question 59, GATE 2009: Which zero-based array is a binary max-heap? A[25, 12, 16, 13, 10, 8, 14]; B[25, 14, 13, 16, 10, 8, 12]; C[25, 14, 16, 13, 10, 8, 12]; D[25, 14, 12, 13, 10, 8, 16].
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

In a zero-based heap each parent at i must be at least as large as children at 2i+1 and 2i+2. In C, [25, 14, 16, 13, 10, 8, 12], the checks are 25≥14, 16; 14≥13, 10; and 16≥8, 12, so every edge satisfies max-heap order. A fails because parent 12 has child 13; B fails because parent 14 has child 16; D fails because parent 12 has child 16. Thus C alone is a max-heap.

A max-heap needs parent≥child along every edge, not a globally descending array. In C, root 25 exceeds 14/16; 14 exceeds 13/10; 16 exceeds 8/12. A fails at 12<13; B at 14<16; D at 12<16. Checking only the root would wrongly admit the distractors; every internal node must satisfy the local condition.

Original paper, page 14

2 marks · MCQ
Report issue

Two delete-max operations

Heaps & Priority Queues

Question 60, GATE 2009: Perform two delete-max operations on the valid heap from Q59. Result? A[14, 13, 12, 10, 8]; B[14, 12, 13, 8, 10]; C[14, 13, 8, 12, 10]; D[14, 13, 12, 8, 10].
Question 60, GATE 2009: Perform two delete-max operations on the valid heap from Q59. Result? A[14, 13, 12, 10, 8]; B[14, 12, 13, 8, 10]; C[14, 13, 8, 12, 10]; D[14, 13, 12, 8, 10].
Question 60, GATE 2009: Perform two delete-max operations on the valid heap from Q59. Result? A[14, 13, 12, 10, 8]; B[14, 12, 13, 8, 10]; C[14, 13, 8, 12, 10]; D[14, 13, 12, 8, 10].
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (9 steps)

Start from Q59’s heap [25, 14, 16, 13, 10, 8, 12]. Delete 25, move final element 12 to the root, and sift down by swapping with the larger child 16. The six-element heap is [16, 14, 12, 13, 10, 8]. Delete 16 and move final element 8 to the root: [8, 14, 12, 13, 10]. Swap 8 with larger child 14, then with larger child 13, giving [14, 13, 12, 8, 10]. This is option D. Each deletion removes the maximum and reduces the active heap length by one.

Delete-max replaces the root by the last active element, shrinks the heap and repeatedly swaps downward with the larger child. First deletion moves 12 to the root and swaps it with 16, yielding[16, 14, 12, 13, 10, 8]. Second deletion moves 8 to the root, then swaps with 14 and 13, yielding[14, 13, 12, 8, 10]. Choosing the smaller child would not restore heap order, which explains several plausible-looking alternatives.

Original paper, page 14