In the sentence “While trying to collect an envelope from under the table, Mr. X fell down and was losing consciousness”, the marked phrases are I “While trying to collect”, II “from under the table”, III “Mr. X fell down”, IV “was losing consciousness”. Which is inappropriate in the intended narration? A I; B II; C III; D IV.
Your answer
Answer & solution
Official answer: D
Our answer: D as the intended completed-event edit
Step 1: Identify the intended time relationship: the fall and loss of consciousness are being narrated as completed past events. Step 2: Parallel simple-past verbs would read “fell down and lost consciousness”, so IV is the intended edit, D. Step 3: Do not infer a general ban on mixing simple past and past progressive: “fell down and was losing consciousness” is grammatical when the second event is ongoing. Without further context, the original wording is not categorically wrong; the existing aspect discrepancy remains open.
Complete: “If she ____ how to calibrate the instrument, she ____ done the experiment.” A knows / will have; B knew / had; C had known / could have; D should have known / would have.
Your answer
Answer & solution
Official answer: C
Step 1: The intended meaning is a past experiment that did not happen because the required knowledge was absent. Step 2: A counterfactual past condition uses “if + had + past participle”: “had known”. Step 3: Its unrealized possible result uses “could have + past participle”: “could have done”. This gives C. The second blank must fit before the already supplied word “done”; it is not a simple present conditional.
Which is the opposite of “coherent”? A sticky; B well-connected; C rambling; D friendly.
Your answer
Answer & solution
Official answer: C
Step 1: In descriptions of speech or thought, coherent means logically organized and connected. Step 2: “Well-connected” is close to that meaning rather than its opposite. “Sticky” and “friendly” describe unrelated qualities. Step 3: Rambling speech wanders without a clear connected structure, so C is the intended antonym.
Find the term that does not fit the sequence 2, 5, 10, 17, 26, 37, 50, 64. A 17; B 37; C 64; D 26.
Your answer
Answer & solution
Official answer: C
Step 1: Consecutive differences through 50 are 3, 5, 7, 9, 11, 13: successive odd numbers. Step 2: The next difference should be 15, making the last term 65, not 64. Equivalently, term n is n²+1 for n=1 through 8. Step 3: Among the listed choices, only 64 breaks this intended pattern, so C. As with finite sequence puzzles, the answer uses the simple intended pattern rather than claiming a unique possible generating rule.
Similar questions1 more → · asked again: GATE 2015 Set 1, Q10
Data Interpretation & Logical Reasoning
Tap to enlarge
An examination has no negative or partial marks. For questions 1, 2, 3, the rows (marks, correct, wrong, unattempted) are (2,21,17,6), (3,15,27,2), (2,23,18,3). Find the class average total score. A 1.34; B 1.74; C 3.02; D 3.91.
Your answer
Answer & solution
Official answer: C
Step 1: Each row represents the same class: 21+17+6=44, and the other two rows also total 44. Do not add these row totals as if they represented different students. Step 2: Only correct responses earn marks, so total marks awarded across the class are 2×21+3×15+2×23=133. Step 3: Divide by the number of students, not by the number of questions: 133/44=3.0227…, rounded to 3.02, C.
A dance event starts at 10 a.m. Participating students must arrive one hour early with a parent; other students and parents should arrive in time for the event. Choose the suitable instruction. A All students at 9, parents at 10. B Participants with a parent at 9; other students and parents by 10. C Nonparticipants at 10 without parents; participants at 9. D Participants before 9, accompanying parents at 9, everyone else at 10.
Your answer
Answer & solution
Official answer: B
Step 1: Separate the two groups: participants need preparation time, while other attendees only need to be present for the 10 a.m. start. Step 2: Preserve the accompaniment requirement: the parent must arrive with the participating student at 9. Step 3: B satisfies all requirements. A separates parents from participants, C invents a ban on parents of nonparticipants and omits accompaniment, and D changes “one hour earlier” to “before 9” while separating arrivals.
A passage says that early in the twentieth century several hypotheses proposed a major change in understanding the universe, but decisive evidence came from experimental measurements of a star positioned behind the sun. Which inferences follow? (i) Understanding changes according to star positions; (ii) major paradigm changes usually occur at century beginnings; (iii) stars are important objects in the universe; (iv) experimental evidence was important in confirming this change. A i,ii,iv; B iii only; C i,iv; D iv only.
Your answer
Answer & solution
Official answer: D
Step 1: Distinguish what this particular passage establishes from general claims that merely sound plausible. It explicitly describes the measurements as decisive evidence. Step 2: Thus iv is supported. A single example near a century boundary cannot establish ii, and a measurement of position is not a general claim that positions themselves determine understanding, so i is too broad. Step 3: The passage does not argue the general importance of stars in iii. Only iv follows, D.
GDP measured in rupees grew 7% in 2012–2013, while the exchange rate rose from Rs.50 per USD to Rs.60 per USD. How did GDP measured in USD change? A increased 5%; B decreased 13%; C decreased 20%; D decreased 11%.
Your answer
Answer & solution
Official answer: D
Step 1: Let the original rupee GDP be G, so the original dollar GDP is G/50. Step 2: The new rupee GDP is 1.07G, and converting at the new rate gives 1.07G/60 dollars. Step 3: Divide new by old: (1.07G/60)/(G/50)=107/120=0.891666…. The decrease is 1−107/120=13/120, or 10.8333%, approximately 11%, D. Rupee growth and exchange-rate percentages cannot simply be subtracted because they apply multiplicatively.
A line graph gives male:female ratios for 2008, 2009, 2010, 2011, 2012 as 2.5, 3, 2, 1, 1.5 respectively. Female enrolment is equal in 2011 and 2012. Find male enrolment in 2012 divided by male enrolment in 2011. A 1:1; B 2:1; C 1.5:1; D 2.5:1.
Your answer
Answer & solution
Official answer: C
Step 1: Read the two relevant graph ordinates: M2011/F2011=1 and M2012/F2012=1.5. The other years provide context but do not enter the calculation. Step 2: Write the common female count as F. Then the male counts are F and 1.5F respectively. Step 3: Their ratio is 1.5F/F=1.5:1, C. Equal female counts are essential; ratios alone would not determine the male-count ratio otherwise.
All numerals in (7526)₈−(Y)₈=(4364)₈ are octal. Find Y. A 1634; B 1737; C 3142; D 3162.
Your answer
Answer & solution
Official answer: C
Step through it (6 steps)
Step 1: Rearrange to Y=(7526)₈−(4364)₈. Step 2: Subtract right to left in base eight: units 6−4=2; the next column needs a borrow, giving (2+8)−6=4. That borrow reduces the next digit from 5 to 4, so 4−3=1; the leftmost digit is 7−4=3. Step 3: Hence Y=(3142)₈, C. Verify by octal addition: 4364+3142=7526.
P says good mobile phones are not cheap; Q says cheap mobile phones are not good. Let L mean P implies Q, M mean Q implies P, and N mean P is equivalent to Q. Which holds? A only L; B only M; C only N; D L,M,N all true.
Your answer
Answer & solution
Official answer: D
Step 1: For an arbitrary phone, write G for “good” and C for “cheap”. P is G→¬C. Step 2: The contrapositive of G→¬C is C→¬G, precisely Q; contraposition preserves truth in classical logic. Both statements also simplify to ¬G∨¬C. Step 3: Therefore each implies the other, and they are equivalent. L, M and N all hold, D.
For finite sets X,Y and a function f:X→Y, which statement always holds? A For A,B⊆X, |f(A∪B)|=|f(A)|+|f(B)|. B For A,B⊆X, f(A∩B)=f(A)∩f(B). C For A,B⊆X, |f(A∩B)|=min{|f(A)|,|f(B)|}. D For S,T⊆Y, f⁻¹(S∩T)=f⁻¹(S)∩f⁻¹(T). Here inverse notation denotes preimage.
Your answer
Answer & solution
Official answer: D
Step 1: Test D elementwise: x belongs to f⁻¹(S∩T) exactly when f(x) belongs to both S and T. This is equivalent to x belonging to both preimages, proving D. Step 2: A fails for equal nonempty A and B because their common image is counted twice. Step 3: For B and C, choose disjoint singleton sets A={a}, B={b} with f(a)=f(b). Their intersection has empty image, but both individual images are the same singleton. No injectivity assumption was given, so those identities need not hold.
A group G has 15 elements. A proper subgroup L≠G has at least 4 elements. Determine the order of L.
Answer & solution
Official answer: 5
Step 1: Apply Lagrange’s theorem: the order of a finite subgroup divides the order of the group. Thus |L| is one of 1, 3, 5, 15. Step 2: The lower bound of 4 removes 1 and 3. Properness removes 15, since a subgroup with all 15 elements would be G itself. Step 3: The only remaining value is 5. The question supplies the existence of such a subgroup; the task is to determine its size.
For an n×n matrix with only real eigenvalues, which assertion is always true? A Positive trace and negative determinant imply at least one negative eigenvalue. B Positive trace implies all eigenvalues positive. C Positive determinant implies all eigenvalues positive. D Positive trace-times-determinant implies all eigenvalues positive.
Your answer
Answer & solution
Official answer: A
Step 1: The trace equals the eigenvalue sum, while the determinant equals their product, including algebraic multiplicities. Step 2: A negative product of real numbers requires a negative factor; none can be zero. Thus A is true, and its positive-trace condition is not even needed for this conclusion. Step 3: A positive sum permits negative terms, and a positive product permits an even number of negative factors. For example diag(3,−1,−1) has trace 1, determinant 3 and positive product of trace and determinant, yet two negative eigenvalues. It refutes B, C and D simultaneously.
V1 and V2 are four-dimensional subspaces of a six-dimensional vector space V. What is the smallest possible dimension of V1∩V2?
Answer & solution
Official answer: 2
Step 1: Use dim(V1+V2)=dim V1+dim V2−dim(V1∩V2). Step 2: Since V1+V2 is a subspace of V, its dimension is at most 6, so the intersection dimension is at least 4+4−6=2. Step 3: Establish attainability: for a basis e1,…,e6 of V, take V1=span(e1,e2,e3,e4) and V2=span(e3,e4,e5,e6). Their intersection is span(e3,e4), of dimension 2. Therefore the minimum is exactly 2, not merely a lower bound.
If the definite integral from 0 to 2π of |x sin x| dx equals kπ, find k.
Answer & solution
Official answer: 4
Step 1: On the integration interval x is nonnegative; sin x is nonnegative on [0,π] and nonpositive on [π,2π]. Thus split the absolute-value integral as ∫₀^π x sin x dx−∫π2π x sin x dx. Step 2: Integration by parts gives the antiderivative −x cos x+sin x. The first ordinary integral is π, and the second is −3π. Step 3: The absolute areas add to π+3π=4π, so k=4. Integrating without splitting the absolute value would incorrectly allow cancellation.
For F(P,Q,R,S), the listed minterms are Σm(0,2,5,7,8,10,13,15), with 2,7,8,13 designated don't-cares. Find a minimal SOP. A Q S̅+Q̅ S; B Q̅ S̅+QS; C Q̅ R̅ S̅+Q̅ R S̅+Q R̅ S+QRS; D P̅ Q̅ S̅+P̅ QS+PQS+P Q̅ S̅. Variables in minterm indexing are ordered P,Q,R,S.
Your answer
Answer & solution
Official answer: B
Step through it (10 steps)
Step 1: Required ones are 0,5,10,15; the four designated don't-cares may be used to enlarge groups but do not require coverage. Step 2: Group {0,2,8,10}: P and R vary, while Q=S=0, giving Q̅S̅. Group {5,7,13,15}: P and R vary, while Q=S=1, giving QS. Neither group includes a specified zero. Step 3: These two four-cell implicants cover every required one. One implicant cannot bridge the two regions without including specified zeros, so two terms are necessary. The minimal form is B; C and D split these groups into smaller, nonminimal terms.
A combinational block has inputs x,a,b and output y. It sets y=a when x=1, otherwise y=b. Which block best implements it? A full adder; B priority encoder; C multiplexer; D flip-flop.
Your answer
Answer & solution
Official answer: C
Step 1: Express the two cases algebraically as y=xa+x̅b. Only one product term is enabled for any x. Step 2: This is a two-input data selector: x chooses between data inputs a and b. That is exactly a 2-to-1 multiplexer, C. Step 3: A full adder computes sums, a priority encoder encodes active-input priority, and a flip-flop stores state; no storage or arithmetic is required here.
Pipeline-register latency is zero. Four processors have stage delays in ns: P1=(1,2,2,1); P2=(1,1.5,1.5,1.5); P3=(0.5,1,1,0.6,1); P4=(0.5,0.5,1,1,1.1). Which has the highest peak clock frequency? A P1; B P2; C P3; D P4.
Your answer
Answer & solution
Official answer: C
Step 1: A synchronous pipeline must allow its slowest stage to finish during one clock period. With zero register overhead, the minimum period is the maximum stage latency, not the sum or average. Step 2: The four maxima are 2, 1.5, 1 and 1.1 ns respectively. Step 3: Frequency is the reciprocal of period, so P3 is fastest at 1/(1 ns)=1 GHz, C. Its greater number of stages does not itself determine this ranking.
For an n×n matrix A, execute C=100; for i=1,…,n and j=1,…,n execute Temp=A[i][j]+C; A[i][j]=A[j][i]; A[j][i]=Temp−C. Then print A in row order. What is printed? A original A; B transpose of A; C upper-diagonal entries increased by 100 and lower-diagonal entries decreased by 100; D none of these.
Your answer
Answer & solution
Official answer: A
Step 1: Track one iteration with old values u=A[i][j] and v=A[j][i]. Temp=u+100, then the assignments store v and (u+100)−100=u, so the body swaps the two entries. Step 2: For i≠j, both index pairs (i,j) and (j,i) occur in the complete nested loops. The second swap undoes the first. A diagonal entry is swapped with itself. Step 3: Consequently every entry finishes unchanged, A. This reasoning uses exact arithmetic or assumes no problematic overflow in adding and subtracting C.
For a supplied X, find the minimum number of arithmetic operations needed to evaluate P(X)=X⁵+4X³+6X+5 using only one temporary variable. This is a numerical-answer question.
Answer & solution
Official answer: 7
Our answer: At most 6; official 7 is not minimal under algebraic refactoring
Step 1: Sparse Horner form is X((X²+4)X²+6)+5. An evaluation recomputing X² with one temporary can use seven additions/multiplications, explaining the official key 7. Step 2: However, expand X[(X²+2)²+2]+5: the square is X⁴+4X²+4, so multiplying X(X⁴+4X²+6)+5 gives the same polynomial. Step 3: Execute t=X*X; t=t+2; t=t*t; t=t+2; t=t*X; t=t+5. This uses only X and one temporary t, with three multiplications and three additions. Step 4: Six operations suffice, so 7 cannot be the unrestricted minimum. This is an upper-bound counterexample, not a proof that 6 is globally minimal. Keep the official answer and the open discrepancy separate; no unstated ban on algebraic refactoring has been supplied.
An ordered rooted tree has root P with children Q,R from left to right. Q has sole child S. R has children T,U,V from left to right. U has sole child W. Find the stated inorder visit sequence. A SQPTRWUV; B SQPTUWRV; C SQPTWUVR; D SQPTRUWV.
Your answer
Answer & solution
Official answer: A
Our answer: A under the ordered-general-tree inorder convention
Step 1: Notice that R has three children, so ordinary binary-tree inorder is not sufficient to define the task. The keyed interpretation uses the ordered-tree extension: traverse the first child, visit the node, then traverse remaining children left to right. Step 2: Under that convention Q's subtree gives S,Q; P is next. R's subtree gives T,R, then U's subtree W,U, then V. Step 3: Concatenate to obtain S,Q,P,T,R,W,U,V, option A. The source's missing convention remains a qualification rather than silently treating the drawing as binary.
The undirected graph consists of two 3×3 square grids, each with horizontal and vertical edges only between adjacent grid vertices. Label their vertices L(r,c) and R(r,c), rows and columns 1…3 from top-left. Add connector v with edges L(3,3)−v−R(3,1), a pendant vertex u attached only to v, and pendant w attached only to R(2,3). Recursive DFS starts at an unspecified vertex and calls visit only after confirming the neighbor is unvisited. Find the maximum possible call-stack depth, including the initial call.
Answer & solution
Official answer: 19
Step 1: Active DFS calls form a simple path because an already visited vertex is never recursively called. Conversely, a desired simple path can be followed first by a suitable starting vertex and neighbor order. Step 2: A path spanning both grids must pass through connector v using its two grid edges; it cannot also visit pendant u without revisiting v. It uses at most nine left-grid vertices. Step 3: On the right, color the 3×3 grid like a checkerboard. A Hamilton path through all nine vertices starting at R(3,1), in the five-vertex color class, must end in that same color class. The pendant w attaches at R(2,3), in the opposite class, so a path entering at R(3,1) cannot include all nine grid vertices and then w. The right side contributes at most nine vertices including w. Step 4: Thus a spanning path has at most 9+1+9=19 vertices. Paths not spanning both grids are shorter, even with pendant leaves. Step 5: Attain 19 by snaking through all left vertices from L(1,1) to L(3,3), crossing v, then snaking through all right vertices from R(3,1) to R(1,3). DFS can follow this path before exploring unused pendants. The maximum depth is 19.
Quicksort on n elements always selects the element at the central array index as pivot. What is the tightest listed worst-case upper bound? A O(n²); B O(n log n); C Θ(n log n); D O(n³).
Your answer
Answer & solution
Official answer: A
Step 1: A central position in an array is not necessarily the median value. An adversarial ordering can place the smallest or largest current value at each selected pivot position. Step 2: Partitioning then leaves subproblems of sizes 0 and n−1 while doing Θ(n) work. The recurrence is T(n)=T(n−1)+Θ(n). Step 3: Summing the partition costs gives Θ(n+(n−1)+…+1)=Θ(n²). Therefore A is the tightest offered upper bound; O(n³) is true but weaker.
Over alphabet {a,b}, consider the regular expression a*b*(ba)*a*. What is the length of a shortest string outside its language?
Answer & solution
Official answer: 3
Step 1: A shortest counterexample requires checking every shorter length. The empty string is obtained by choosing zero repetitions everywhere; a and b are generated by their star factors. Step 2: All length-two strings occur: aa from a*, ab from a*b*, bb from b*, and ba from (ba)*. Step 3: The length-three word bab is absent. Without any ba pair, a*b*a* cannot switch back to b after a trailing a. If a ba pair is used, the remaining final b cannot be produced by the final a*, and extra pairs are too long. Step 4: Hence no shorter string is missing, while bab is missing, so the answer is 3.
For a finite nonempty alphabet Σ, let Σ* be all finite strings and 2^(Σ*) its power set. Which is true? A both countable; B power set countable and Σ* uncountable; C power set uncountable and Σ* countable; D both uncountable.
Your answer
Answer & solution
Official answer: C
Step 1: For each length k there are finitely many strings, |Σ|^k. Listing by increasing length and lexicographically within a length enumerates every finite string. Thus Σ* is countably infinite, including when Σ has only one symbol. Step 2: Cantor’s theorem states that the power set of any set has strictly larger cardinality than that set. The power set of a countably infinite set is uncountable. Step 3: Therefore C holds. A language is a subset of Σ*, and there are uncountably many such languages despite only countably many strings.
Which is a purpose of intermediate code in a compiler? A simplify parsing and semantic analysis; B improve error recovery/reporting; C increase reuse of a machine-independent optimizer across compilers; D improve register allocation.
Your answer
Answer & solution
Official answer: C
Step 1: Separate a compiler into a source-language front end, an optimizer and a target-machine back end. A shared intermediate representation gives the middle portion a common input/output language. Step 2: The same machine-independent optimization passes can then be used for several source languages or machine targets. This directly explains C. Step 3: Parsing and semantic analysis are primarily front-end tasks, and register allocation is a later target-related task. Intermediate code may assist a design, but the other choices do not state its principal reuse motivation.
Evaluate: (1) statically allocating every data area prevents recursion; (2) automatic garbage collection is essential for recursion; (3) dynamic allocation of activation records is essential for recursion; (4) both heap and stack are essential for recursion. Choose A 1,2 only; B 2,3 only; C 3,4 only; D 1,3 only.
Your answer
Answer & solution
Official answer: D
Our answer: D under the general recursion storage model
Step 1: General recursive calls can leave multiple invocations of the same procedure simultaneously active. Each needs its own parameters, local variables, return address and other activation information. Step 2: One fixed static record per procedure cannot preserve all these activations; records must be allocated as calls occur. This is the intended sense in which 1 and 3 hold. Step 3: A runtime stack allocates and reclaims activation records without a heap or automatic garbage collector, refuting 2 and 4. Thus D. Bounded recursion or tail-call elimination can use fixed storage, so these claims concern the conventional general recursion model, not every special recursive program.
For modular software design, which combination is desirable? A high cohesion/high coupling; B high cohesion/low coupling; C low cohesion/high coupling; D low cohesion/low coupling.
Your answer
Answer & solution
Official answer: B
Step 1: Cohesion measures how closely a module's internal responsibilities belong together. High cohesion makes its purpose focused and understandable. Step 2: Coupling measures dependencies between modules. Low coupling limits the effect of one module's changes on others and facilitates independent testing. Step 3: The desirable combination is therefore high cohesion and low coupling, B. “High” is not universally good: the two measures describe different relationships.
Three initially empty page frames use LRU replacement. Count faults for page references 4,7,6,1,7,6,1,2,7,2.
Answer & solution
Official answer: 6
Step through it (12 steps)
Step 1: Maintain recency on hits as well as on insertions. Write resident pages from least to most recently used. The first three references fault and produce [4], [4,7], [4,7,6]. Step 2: Reference 1 faults and evicts 4, giving [7,6,1]. The following hits on 7,6,1 change the order to [6,1,7], [1,7,6], [7,6,1]. Step 3: Reference 2 faults, evicting 7 and giving [6,1,2]. Next 7 faults, evicting 6 and giving [1,2,7]. Final 2 hits and gives [1,7,2]. Faults occur at positions 1,2,3,4,8,9: total 6.
Simplify π_A1(π_A2(σ_F1(σ_F2(r)))), where A1⊂A2 are attribute sets of r and F1,F2 are predicates on r. A π_A1(σ_(F1∧F2)(r)); B π_A1(σ_(F1∨F2)(r)); C π_A2(σ_(F1∧F2)(r)); D π_A2(σ_(F1∨F2)(r)).
Your answer
Answer & solution
Official answer: A
Step 1: A row survives the two selections only if it satisfies both predicates, so σ_F1(σ_F2(r))=σ_(F1∧F2)(r). An OR would admit rows discarded by one selection. Step 2: Projecting onto A2 and then its subset A1 is equivalent to projecting directly onto A1, because the intermediate projection retains every finally requested attribute. Step 3: Combining these rules gives π_A1(σ_(F1∧F2)(r)), A. Keep the final output attributes A1; replacing them with A2 changes the query.
A prime attribute of a relation R belongs to which set? A every candidate key; B some candidate key; C a foreign key; D only the primary key.
Your answer
Answer & solution
Official answer: B
Step 1: A candidate key is a minimal attribute set that uniquely identifies a tuple. A relation may have several such sets. Step 2: An attribute is prime if it appears in at least one candidate key, including a candidate key not chosen as primary. Therefore B is the definition. Step 3: Requiring membership in every key is too strong. Foreign-key membership is unrelated, and selection of a primary key does not change which attributes are prime.
Which OSI layer/function pair is incorrect? A network/routing; B data link/bit synchronization; C transport/end-to-end process communication; D MAC sublayer/channel sharing.
Your answer
Answer & solution
Official answer: B
Step 1: Routing is a network-layer responsibility, and transport connects application processes end to end. MAC governs access to a shared communication medium. These match A, C and D. Step 2: Bit synchronization concerns physical timing: identifying bit boundaries in a signal. That belongs to the physical layer rather than the data-link layer. Step 3: Hence B is the incorrect pair. Distinguish bit timing from data-link framing and error detection.
A bit-stuffing framing protocol uses delimiter 01111110. The stuffed payload is 01111100101. Recover its input bits. A 0111110100; B 0111110101; C 0111111101; D 0111111111.
Your answer
Answer & solution
Official answer: B
Step 1: To prevent payload data from imitating the flag, the transmitter inserts a zero after every run of five consecutive ones. The receiver removes only that inserted zero. Step 2: Parse the given output as 0,11111,0(stuffed),0101. Removing the marked zero leaves 0,11111,0101=0111110101. Step 3: That is B. The zero immediately following the inserted zero belongs to the original payload and must not also be removed.
Host A sends an IPv4 datagram to host B on another network without transmission errors. Which fields may differ when it reaches B: (i) TTL; (ii) header checksum; (iii) fragment offset? A i only; B i,ii only; C ii,iii only; D i,ii,iii.
Your answer
Answer & solution
Official answer: D
Step 1: Every forwarding router decrements TTL. Since TTL is part of the IPv4 header, the router updates the header checksum even on an error-free path. Thus i and ii can differ. Step 2: A smaller outgoing MTU can require fragmentation. Later fragments carry nonzero fragment offsets even if the original unfragmented datagram had offset zero. Step 3: Therefore all three may differ, D, when considering received fragment headers before reassembly. No-error transmission rules out corruption, not ordinary forwarding changes or fragmentation. A fully reassembled abstract datagram needs separate interpretation.
A CIDR router receives destination 131.23.151.76. Its prefix→interface table is 131.16.0.0/12→3; 131.28.0.0/14→5; 131.19.0.0/16→2; 131.22.0.0/15→1. Which output interface is selected?
Answer & solution
Official answer: 1
Step through it (3 steps)
Step 1: Compare prefixes rather than numerical closeness. With the first octet fixed at 131, /12 covers second octets 16…31, so it matches 23. The /14 entry covers 28…31 and does not match; /16 requires exactly 19 and does not match. Step 2: The /15 entry fixes the top seven bits of the second octet, covering 22 and 23, so it matches. Step 3: CIDR chooses the longest matching prefix, /15 rather than /12. Its output interface is 1.
Each IPv4 host has a battery-backed real-time clock with 1-second resolution and a globally unique IPv4 address. Each must generate up to 1000 unique identifiers per second. Design a 50-bit global ID; after how many seconds does a host's identifier time field wrap around?
Answer & solution
Official answer: 256
Step 1: In the conventional fixed-field construction, reserve 32 bits for the globally unique IPv4 address so different hosts cannot collide. Step 2: To distinguish up to 1000 IDs generated in the same second, reserve ceil(log₂1000)=10 counter bits, because 2⁹<1000≤2¹⁰. Step 3: This leaves 50−32−10=8 bits for the timestamp in seconds. The timestamp cycles through 2⁸=256 values, so wraparound occurs after 256 seconds. This construction assumes no clock rollback and no counter reuse within a second; global uniqueness is limited by the timestamp wrap interval.
A router with MTU 1500 bytes receives a 4404-byte IPv4 packet whose header is 20 bytes. What are the third fragment's (MF,total length,offset) fields? A (0,1444,370); B (1,1424,185); C (1,1500,370); D (0,1424,2960).
Your answer
Answer & solution
Official answer: A
Step through it (4 steps)
Step 1: Remove the original header to get 4404−20=4384 payload bytes. Each full fragment can carry 1500−20=1480 bytes; this is a multiple of eight, as required for nonfinal fragment payloads. Step 2: Two full fragments carry 2960 payload bytes, leaving 4384−2960=1424 bytes for the third fragment. Add its own 20-byte header: total length 1444. Step 3: Its starting payload offset is 2960 bytes, stored in eight-byte units as 2960/8=370. It is the last fragment, so MF=0. Therefore A, assuming fragmentation is permitted and the arriving packet is an unfragmented original.
Transactions are T1:r1(X),r1(Z),w1(X),w1(Z); T2:r2(Y),r2(Z),w2(Z); T3:r3(Y),r3(X),w3(Y). S1=r1(X),r3(Y),r3(X),r2(Y),r2(Z),w3(Y),w2(Z),r1(Z),w1(X),w1(Z). S2=r1(X),r3(Y),r2(Y),r3(X),r1(Z),r2(Z),w3(Y),w1(X),w2(Z),w1(Z). Which schedules are conflict-serializable? A only S1; B only S2; C both; D neither.
Your answer
Answer & solution
Official answer: A
Step through it (2 schedules)
Step 1: Construct a precedence graph: add Ti→Tj when conflicting operations from different transactions access the same item, at least one is a write, and Ti's operation occurs first. Read/read pairs create no edge. Step 2: In S1, Y gives T2→T3, X gives T3→T1, and Z gives T2→T1. The graph is acyclic, with serial order T2,T3,T1. Step 3: In S2, r1(Z) precedes w2(Z), giving T1→T2; r2(Z) and w2(Z) precede w1(Z), giving T2→T1. This two-way cycle suffices to reject conflict serializability. Thus only S1 is conflict-serializable, A.
Schemas: employee(empId,empName,empAge) and dependent(depId,eId,depName,depAge), with eId referencing employee.empId. Every employee has at least one dependent. Interpret π_empId(employee)−π_empId(employee ⋈_(empId=eId ∧ empAge≤depAge) dependent). It returns employees older than A some dependent; B all dependents; C some of their own dependents; D all of their own dependents.
Your answer
Answer & solution
Official answer: D
Step 1: The join condition first pairs each employee only with that employee's own dependents. Its age condition selects counterexamples to “employee is older”: a dependent whose age is at least the employee's age. Step 2: Projecting empId collects employees with at least one such counterexample. Subtracting this set from all empIds keeps employees with none. Step 3: No own dependent is as old or older means the employee is strictly older than every own dependent, D. The nonempty-dependent premise prevents vacuous cases; ordinary relational algebra here assumes comparable, non-NULL ages.
Similar questions7 more → · asked again: GATE 1997, Q6.7
Deadlocks
Tap to enlarge
Three programs each require three tape units to operate. What is the minimum number of tape units that guarantees no resource deadlock?
Answer & solution
Official answer: 7
Step 1: Exhibit a deadlock with six units: each program holds two and waits for a third, leaving no free unit and no program able to finish. Thus six is insufficient. Step 2: With seven units, if no program yet holds its full requirement, each holds at most two and together they hold at most six. At least one unit remains available to let some program reach three and finish. Step 3: Its release permits the others to progress. Hence the minimum is 3(3−1)+1=7 under the usual reusable-resource model, maximum demand of three, and eventual completion/release once the demand is met.
Preemptive shortest-remaining-time-first scheduling is applied to processes (arrival,CPU burst), in ms: P1=(0,12), P2=(2,4), P3=(3,6), P4=(8,5). Find their average waiting time.
Answer & solution
Official answer: 5.5
Step through it (8 steps)
Step 1: P1 runs 0–2, leaving 10. P2 arrives with burst 4 and preempts it. At time 3, P2 has 3 remaining, shorter than P3's 6, so P2 finishes at 6. Step 2: P3 then runs 6–12. When P4 arrives at 8, P3 has 4 remaining, less than P4's 5, so no preemption occurs. P4 runs 12–17, then P1 runs 17–27. Step 3: Waiting time equals completion−arrival−burst: P1=27−0−12=15; P2=6−2−4=0; P3=12−3−6=3; P4=17−8−5=4. The average is (15+0+3+4)/4=5.5 ms, assuming negligible switching cost.
A paging system has a TLB; all pages and the entire page table reside in physical memory. TLB search takes 10 milliseconds, physical-memory access 80 milliseconds, and the TLB hit ratio is 0.6. Find effective access time in milliseconds.
Answer & solution
Official answer: 122
Step 1: On a TLB hit, address translation takes 10 ms and the requested memory access takes 80 ms, totaling 90 ms. Step 2: On a TLB miss, after the same 10 ms lookup, one memory access reads the page-table entry and another reads the requested data: 10+80+80=170 ms. There is no disk page-fault penalty because all pages are resident. Step 3: Average over the two cases: 0.6×90+0.4×170=122 ms. The source's milliseconds are intentionally retained; the model assumes serial lookup and a single-level page-table access.
The basic block executes a=b+c; c=a+d; d=b+c; e=d−b; a=e+b. What are the minimum DAG node and edge counts? A (6,6); B (8,10); C (9,12); D (4,4).
Your answer
Answer & solution
Official answer: A
Our answer: A with algebraic simplification
Step 1: Preserve old values when tracking assignments: let the input leaves be b0,c0,d0. The first three operations create u=b0+c0, v=u+d0, w=b0+v. The current c is v and current d is w. Step 2: Algebraically, e=w−b0=(b0+v)−b0=v, and final a=e+b0=v+b0=w. Therefore e shares v's node and a shares w's node. Step 3: The minimized DAG has three input leaves and three binary addition nodes: six nodes. Each operation has two incoming operand edges, giving six edges, A. Without cancellation, a purely syntactic DAG gives eight nodes and ten edges. The keyed minimum assumes valid algebraic identities, not unrestricted floating-point cancellation.
Which problem is undecidable for arbitrary context-free grammars? A whether a grammar is ambiguous; B whether it generates a given string; C whether its language is empty; D whether its language is finite.
Your answer
Answer & solution
Official answer: A
Step 1: Membership is decidable by a general CFG parsing algorithm, so B is not the answer. Step 2: Emptiness is decidable by marking nonterminals that can derive terminal strings and checking the start symbol. Finiteness is decidable by analyzing useful recursive growth, so C and D are also decidable. Step 3: There is no algorithm deciding ambiguity for every CFG: whether some string has multiple parse trees is an undecidable property of arbitrary grammars. Thus A. This does not say that ambiguity cannot be demonstrated for a particular grammar by an explicit witness.
Over Σ={0,1,c}, define L1={0ⁿ1ⁿ:n≥0}, L2={wcwʳ:w∈{0,1}*}, L3={wwʳ:w∈{0,1}*}, with wʳ the reversal of w. Which languages are deterministic context-free? A none; B only L1; C only L1,L2; D all three.
Your answer
Answer & solution
Official answer: C
Step 1: For L1, a deterministic pushdown automaton pushes one marker per 0 and switches to popping when the first 1 appears. The input symbol change identifies the phase boundary; accept when the counts match. Step 2: For L2, push the first binary word, then the marker c deterministically signals the switch to matching and popping its reverse. Step 3: In L3 there is no midpoint marker. An arbitrary binary even palindrome requires a nondeterministic choice of when to switch, and this unmarked palindrome language is a standard CFL that is not deterministic context-free. Therefore C. The final claim is the known non-DCFL result, not a claim that every language with an unmarked midpoint is automatically nondeterministic.
Move from 0 to 100 on the number line. One step either moves from k to k+1 or takes a supplied shortcut (i,j), i<j, directly from i to j. At most one shortcut involves any number; in particular 9 has a shortcut to 15. T(k) is the minimum steps from k to 100. If T(9)=1+min(T(y),T(z)), find yz.
Answer & solution
Official answer: 150
Step 1: Condition on the first move from 9. The ordinary unit move reaches 10; the available shortcut reaches 15. Each costs one step. Step 2: Once the first move is made, the optimal remaining cost is T(10) or T(15), so optimal substructure yields T(9)=1+min(T(10),T(15)). Step 3: The order of y and z is irrelevant: their product is 10×15=150. No knowledge of the remaining shortcuts is needed to identify these two immediate successor states.
2CNFSAT asks whether a CNF propositional formula with at most two literals per clause is satisfiable; for example (x1∨x2)∧(x1∨¬x3)∧(x2∨x4). Classify it. A NP-complete; B polynomial-time solvable via directed graph reachability; C constant-time solvable because every instance is satisfiable; D NP-hard but not NP-complete.
Your answer
Answer & solution
Official answer: B
Step 1: Translate every clause (a∨b) into implications ¬a→b and ¬b→a. Treat a unit clause as (a∨a). This gives a directed implication graph with one vertex per literal. Step 2: If x reaches ¬x and ¬x reaches x, they lie in one strongly connected component, so either truth assignment forces a contradiction. Conversely, if no variable shares an SCC with its negation, the SCC ordering yields a satisfying assignment. Step 3: SCCs and reachability are computable in polynomial time (linear time suffices for SCCs), establishing B. C is false, as clauses x and ¬x form an unsatisfiable instance.
An unaugmented balanced BST T stores n numbers. There are m keys in the interval from L to H, whose sum must be computed. If the tightest upper bound is O(nᵃ logᵇ n + mᶜ logᵈ n), find a+10b+100c+1000d.
Answer & solution
Official answer: 110
Step 1: Use the search ordering to locate the interval's first relevant key or its boundary in O(log n), since the tree is balanced. Step 2: Traverse the m matching keys in inorder while pruning subtrees wholly outside the interval. With a traversal stack, the total is O(log n+m), not m independent root-to-key searches costing O(m log n). Step 3: Match this to the displayed form: n⁰log¹n + m¹log⁰n, so (a,b,c,d)=(0,1,1,0). The requested encoding is 0+10+100+0=110. Subtree-sum augmentation was not specified and would change the range-sum method.
A 100-slot hash table resolves collisions by chaining and uses simple uniform hashing. What is the probability that slots 1,2,3 are all empty after three insertions? A 97³/100³; B (99×98×97)/100³; C (97×96×95)/100³; D (97×96×95)/(3!×100³).
Your answer
Answer & solution
Official answer: A
Step 1: For a given insertion, 97 of the 100 equally likely slots avoid the three prohibited slots, so its avoidance probability is 97/100. Step 2: Under simple uniform hashing the three placements are independent. Chaining permits multiple inserted keys to use the same allowed slot, so the allowed count does not decrease after an insertion. Step 3: Multiply the three factors: (97/100)³, option A. Using 97,96,95 would incorrectly require distinct occupied slots.
An arbitrary tree uses leftMostChild/rightSibling pointers. Function D(t): set value=0; if t is non-NULL, set value=1 when t.leftMostChild is NULL, otherwise set value=D(t.leftMostChild); then add D(t.rightSibling); return value. Passing the root returns what? A internal-node count; B tree height; C number of nodes without right siblings; D leaf count.
Your answer
Answer & solution
Official answer: D
Step 1: A NULL pointer returns zero. A node with no child contributes one for itself, identifying a leaf. A node with children contributes only the recursive count from its child list, not one for itself. Step 2: The rightSibling recursion adds the counts of the remaining sibling subtrees. It does not test whether a sibling exists as a property to count. Step 3: Inductively each forest call counts exactly its leaves; at the root, whose sibling pointer is NULL, this is the entire tree's leaf count, D. The recurrence adds branches rather than taking a maximum, so it does not compute height.
A sorted ascending array listA has n>0 entries. ProcessArray sets i=0,j=n−1, then repeatedly sets k=(i+j)/2 using integer division; if x≤listA[k], sets j=k−1; independently, if listA[k]≤x, sets i=k+1; repeats while i≤j. Afterward returns k if listA[k]==x, else −1. Which is correct? A absent x causes an infinite loop; B this is binary search; C it always finds the maximum; D it returns −1 even when x is present.
Your answer
Answer & solution
Official answer: B
Step 1: If x is smaller than the midpoint, only the first comparison succeeds, eliminating the midpoint and upper half. If x is larger, only the second succeeds, eliminating the lower half. Each unsuccessful iteration strictly shrinks the candidate interval. Step 2: If x equals the midpoint, both independent tests succeed: j=k−1 and i=k+1. The loop terminates immediately, and the final equality test returns the matching k. Step 3: Therefore it implements binary search, B, including for duplicates where any matching index suffices. Assume a valid nonempty sorted array and arithmetic without overflow in i+j.
An old pipeline has IF,ID/RF,EX,MEM,WB with delays 1,2.2,2,1,0.75 ns. A new eight-stage pipeline splits ID/RF into ID,RF1,RF2 of 2.2/3 ns each, and EX into EX1,EX2 of 1 ns each. Branches are 20% of instructions and resolve at the end of EX (old) or EX2 (new); after fetching a branch, IF stalls until its next PC is known. Other instructions have average CPI 1. For old/new program times P,Q, find P/Q.
Answer & solution
Official answer: 1.50 to 1.60
Our answer: 1.54
Step 1: Ignoring latch overhead, the old period is max(1,2.2,2,1,0.75)=2.2 ns. The new longest stage is 1 ns. Step 2: In the old design, a branch fetched in cycle 1 resolves at the end of stage 3, so it blocks two following fetch slots. Average CPI is 1+0.2×2=1.4. Step 3: In the new design, EX2 is stage 6: IF,ID,RF1,RF2,EX1,EX2. A branch blocks five following fetch slots, yielding CPI 1+0.2×5=2. Step 4: In the steady-state model, time per instruction is CPI×period. Therefore P/Q=(1.4×2.2)/(2×1)=1.54. Pipeline fill/drain and register overhead are omitted; without program length an exact finite-program ratio is not specified.
Cache access times are read hit 1 ns, read miss 5 ns, write hit 2 ns, write miss 10 ns. A sequence performs 100 instruction fetches, 60 operand reads and 40 operand writes. Cache hit ratio is stated as 0.9. Find mean memory-access time in ns.
Answer & solution
Official answer: 1.68
Our answer: 1.68 if each access class has hit ratio 0.9
Step 1: Count instruction fetches as reads: there are 160 reads and 40 writes, 200 accesses total. Under the intended common hit ratio of 0.9 for each class, a read averages 0.9×1+0.1×5=1.4 ns, and a write averages 0.9×2+0.1×10=2.8 ns. Step 2: Weight by access count: (160×1.4+40×2.8)/200=1.68 ns. Miss times are given complete access times, not penalties to add again. Step 3: Preserve the ambiguity: an aggregate hit ratio alone only fixes 20 total misses. If w are write misses, read misses are 20−w and total time is 160+2×40+4(20−w)+8w=320+4w ns. Thus the mean can be 1.6+0.02w for 0≤w≤20, ranging from 1.6 to 2.0 ns. The official 1.68 assumes w=4 or the same hit ratio for both classes.
Three synchronous JK flip-flops have state Q2Q1Q0 initially 000 and a common clock. The drawing's wiring is J2=Q̅1,K2=Q0; J1=Q2,K1=Q̅2; J0=Q1,K0=Q̅0. The crossing before the first flip-flop is a wire jump, not a junction. Which are the next three states? A 001,010,011; B 111,110,101; C 100,110,111; D 100,011,001.
Your answer
Answer & solution
Official answer: C
Step 1: Use the JK characteristic equation Q⁺=J Q̅+K̅ Q, evaluating every input from the same pre-edge state. Do not update flip-flops sequentially. Step 2: At 000, the three (J,K) pairs are (1,0),(0,1),(0,1), so Q2 sets and the other two remain reset: next state 100. Step 3: At 100 the pairs are (1,0),(1,0),(0,1), giving 110. At 110 they are (0,0),(1,0),(1,1), so Q2 holds, Q1 stays set and Q0 toggles to 1, giving 111. Step 4: The sequence is 100,110,111, C. Correctly interpreting the drawn wire jump is essential to these input equations.
For K=∫ₐᵇ x² dx, evaluate statements I: trapezoidal-rule K is always at least the exact integral; II: Simpson-rule K is always exact. A I only; B II only; C both; D neither.
Your answer
Answer & solution
Official answer: C
Our answer: C under the usual a≤b interval convention
Step 1: On an ordinary forward interval a≤b, x² is convex because its second derivative is 2. Every trapezoidal chord lies on or above the curve, so summing trapezoid areas overestimates the integral; I holds. Step 2: Simpson’s rule integrates every polynomial of degree at most three exactly when its partition meets the rule's requirements. Since x² has degree two, II holds as well. Step 3: The intended answer is C. Preserve the implicit ordering qualification: reversing integration limits reverses signed errors, so I's inequality is not valid for arbitrary a>b. The source says only that a and b are given.
Evaluate ∫₀^π x² cos x dx. A −2π; B π; C −π; D 2π.
Your answer
Answer & solution
Official answer: A
Step 1: Integrate by parts with u=x² and dv=cos x dx: the integral is [x² sin x]₀^π−2∫₀^π x sin x dx. The boundary term is zero. Step 2: For the remaining integral, another integration by parts gives ∫x sin x dx=−x cos x+sin x. Between 0 and π this is π. Step 3: Therefore the original definite integral is −2π, A. The negative result is possible because cos x is negative over the second half and the x² weight is larger there.
Events A and B are mutually exclusive and exhaust sample space S, so A∪B=S. What is the largest possible P(A)P(B)?
Answer & solution
Official answer: 0.25
Step 1: Mutual exclusion gives P(A∪B)=P(A)+P(B), and exhaustion makes this sum 1. Let p=P(A), so P(B)=1−p with 0≤p≤1. Step 2: Complete the square: p(1−p)=1/4−(p−1/2)². The square is nonnegative, so the product is at most 1/4. Step 3: Equality is possible when both events have probability 1/2. Thus the maximum consistent with the given constraints is 0.25; this is not a claim that every particular probability space contains such an equal partition.
Let f:{0,1,…,2014}→{0,1,…,2014} satisfy f(f(i))=i for every i. P: every such f fixes every i. Q: every such f fixes at least one i. R: every such f is onto. Which holds? A P,Q,R; B Q,R only; C P,Q only; D R only.
Your answer
Answer & solution
Official answer: B
Step 1: For any target i, the element f(i) maps to i, so f is onto. It is also injective because applying f to f(a)=f(b) gives a=b. Thus R holds. Step 2: The identity f²=id means each orbit is either a fixed point or a two-element swap. Since the domain has 2015 elements, swaps alone cannot partition it; at least one fixed point exists, proving Q. Step 3: P fails: swap 0 and 1 while fixing 2,…,2014. This still satisfies f(f(i))=i without fixing every element. Therefore Q and R only, B.
A group (G,*) is generated by x and y: every element is a finite word in them. They satisfy x*x=y*y=x*y*x*y=y*x*y*x=e. What is the maximum possible order of G?
Answer & solution
Official answer: 4
Step 1: Relations x²=y²=e imply x⁻¹=x and y⁻¹=y. Also (xy)²=e gives xy=(xy)⁻¹=y⁻¹x⁻¹=yx, so the generators commute. Step 2: Reorder any word as xᵃyᵇ and remove even powers. Only four forms remain: e,x,y,xy. Hence |G|≤4. Step 3: This bound is attainable: the Klein four-group has two distinct commuting elements of order two whose product is a third distinct nonidentity element. All supplied relations hold, so the maximum is exactly 4 rather than merely at most 4.
Similar questions1 more → · asked again: GATE 1992, Q3(iii)
Trees & Connectivity
Tap to enlarge
A forest G has n vertices and k connected components. How many edges does it contain? A floor(n/k); B ceil(n/k); C n−k; D n−k+1.
Your answer
Answer & solution
Official answer: C
Step 1: Each connected component of a forest is a tree. A tree with vi vertices contains vi−1 edges, including a one-vertex component with zero edges. Step 2: Sum across the k components: E=Σ(vi−1)=Σvi−k=n−k. Step 3: Thus C is correct. The quotient n/k concerns an average component size, not the total edge count; the extra +1 in D would already fail for a single tree.
Let δ be minimum vertex degree. For every planar graph with n vertices and δ≥3, which is true? A every planar embedding has at least n/2+2 faces; B every embedding has fewer than n/2+2 faces; C some embedding has fewer than n/2+2 faces; D some embedding has at most n/(δ+1) faces.
Your answer
Answer & solution
Official answer: A
Step 1: By the degree-sum formula, 2E=Σdeg(v)≥3n, hence E≥3n/2. Step 2: For a planar embedding with c connected components, Euler’s formula is n−E+F=1+c, counting the outer face. Thus F=E−n+1+c≥n/2+1+c. Step 3: Since c≥1, F≥n/2+2 in every embedding, proving A without needing a connectedness assumption. B and C contradict this bound; D offers a much smaller upper bound and cannot be the universal conclusion.
Choose the formula for “not all rainy days are cold”. A ∀d(Rainy(d)∧¬Cold(d)); B ∀d(¬Rainy(d)→Cold(d)); C ∃d(¬Rainy(d)→Cold(d)); D ∃d(Rainy(d)∧¬Cold(d)).
Your answer
Answer & solution
Official answer: D
Step 1: “All rainy days are cold” is ∀d(Rainy(d)→Cold(d)). Negate the entire statement, not just the cold predicate inside an unchanged universal quantifier. Step 2: Move negation through the quantifier: ∃d ¬(Rainy(d)→Cold(d)). Since ¬(p→q)=p∧¬q, this becomes ∃d(Rainy(d)∧¬Cold(d)). Step 3: Therefore D: at least one rainy day is not cold. A incorrectly says every day is rainy and not cold, a far stronger claim.
Schemas are employee(empId,empName,empDept) and customer(custId,custName,salesRepId,rating), with salesRepId referencing empId. Every employee sells to at least one customer. Query: SELECT empName FROM employee E WHERE NOT EXISTS (SELECT custId FROM customer C WHERE C.salesRepId=E.empId AND C.rating <> 'GOOD'). It returns names of employees with A at least one GOOD customer; B at most one GOOD customer; C no GOOD customers; D all customers GOOD.
Your answer
Answer & solution
Official answer: D
Our answer: D assuming nonnull ratings
Step 1: For a fixed employee, the correlated subquery considers only that employee's customers, and finds rows whose rating is unequal to GOOD. NOT EXISTS keeps the employee exactly when this set is empty. Step 2: If ratings are non-NULL, having no customer rated other than GOOD means every customer is GOOD. The premise guarantees at least one customer, so the intended option is D. Step 3: The source does not declare rating NOT NULL. In SQL, NULL <> 'GOOD' is UNKNOWN, not TRUE, so a NULL-rated customer does not enter the subquery. An employee with only NULL-rated customers is still returned even though all-GOOD is not established. The precise query means “no own customer has a known non-GOOD rating”; retain the official D qualification and existing NULL discrepancy.
With ⊕ denoting XOR, simplify F(P,Q)=((1⊕P)⊕(P⊕Q))⊕((P⊕Q)⊕(Q⊕0)). A P+Q; B complement of (P+Q); C P⊕Q; D complement of (P⊕Q). Here + is Boolean OR.
Your answer
Answer & solution
Official answer: D
Step 1: XOR is associative and commutative, so flatten the expression into 1⊕P⊕P⊕Q⊕P⊕Q⊕Q⊕0. Step 2: Repeated equal pairs cancel because x⊕x=0; three P terms leave one P and three Q terms leave one Q. Zero is neutral, so F=1⊕P⊕Q. Step 3: XOR with 1 complements its operand: F=¬(P⊕Q), the XNOR function, D. Its output is 1 when P and Q agree, distinguishing it from OR and NOR.