Question

Suppose the following functional dependencies hold on a relation UU with attributes P,Q,R,SP, Q, R, S, and TT:

P→QRP \to QR
RS→TRS \to T

Which of the following functional dependencies can be inferred from the above functional dependencies?

Choose every correct option
Official answer and solution
Official answer
A, C and D
From
Official GATE 2021 answer key

Solution

Compute attribute closures under the given functional dependency set F={P→QR,RS→T}F = \{P \to QR, RS \to T\}.

Given functional dependencies:

  1. P→QRP \to QR
  2. RS→TRS \to T

Check each candidate functional dependency using attribute closure:

  • Option A (PS→TPS \to T):
    Start with {P,S}\{P, S\}.
    Since P→QRP \to QR, add QQ and RR: {P,Q,R,S}\{P, Q, R, S\}.
    Since RS→TRS \to T, and both R,S∈{P,Q,R,S}R, S \in \{P, Q, R, S\}, add TT: {P,Q,R,S,T}\{P, Q, R, S, T\}.
    Since T∈(PS)+T \in (PS)^+, PS→TPS \to T can be inferred. Option A is correct.
  • Option B (R→TR \to T):
    Start with {R}\{R\}. Neither dependency applies since neither PP nor RSRS is a subset of {R}\{R\}.
    Thus R+={R}R^+ = \{R\}. Since T∉R+T \notin R^+, R→TR \to T cannot be inferred. Option B is incorrect.
  • Option C (P→RP \to R):
    Start with {P}\{P\}. By dependency 1, P→QRP \to QR, which by the decomposition rule implies P→QP \to Q and P→RP \to R. Thus R∈P+R \in P^+, so P→RP \to R can be inferred. Option C is correct.
  • Option D (PS→QPS \to Q):
    From closure (PS)+={P,Q,R,S,T}(PS)^+ = \{P, Q, R, S, T\}, Q∈(PS)+Q \in (PS)^+. Thus PS→QPS \to Q can be inferred. Option D is correct.
Final answer

A, C, D

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
Question
50 of 65, printed as CS Q.40
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.