Question:

R(A B C D E) 
F = A$\rightarrow$ BC, CD$\rightarrow$ E, E$\rightarrow$A
Which of the following is correct? 
 

Show Hint

To find candidate keys, a systematic approach is to compute the closures of attribute sets. Start with single attributes, then pairs, and so on. Once you find a key, any superset of it cannot be a candidate key (as it won't be minimal), which helps prune the search.
Updated On: Feb 23, 2026
  • A and ED and CK
  • AD, ED, CD are CK
  • A, E, C, D and CK
  • A, E, CD are CK
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding the Question:
We are given a relation R with attributes ABCDE and a set of functional dependencies (FDs) F. We need to find all the candidate keys (CK) for this relation. A candidate key is a minimal set of attributes that can uniquely determine all other attributes in the relation.
Step 2: Finding Candidate Keys:
A common approach is to first classify the attributes:
- Right-hand side only: B
- Left-hand side only: None
- Both sides: A, C, D, E
Attributes that never appear on the left-hand side (like B) must be part of any candidate key.
Attributes that only appear on the right side cannot be part of any candidate key. In this case, there are no attributes only on the right, but B never appears on the left, so it must be determined by any key.
Essential attributes (that must be in every key) are those that never appear on the right side. Here, no attribute is essential. Let's test potential keys by computing their closures. The closure of a set of attributes is the set of all attributes that can be determined by it.
- Test CD:
- $(CD)^+ = \{C, D\}$ (reflexive)
- from $CD \rightarrow E$, we get $\{C, D, E\}$
- from $E \rightarrow A$, we get $\{A, C, D, E\}$
- from $A \rightarrow BC$, we get $\{A, B, C, D, E\}$
Since $(CD)^+ = \{A, B, C, D, E\}$, CD determines all attributes. CD is a candidate key.
- Test AD:
- $(AD)^+ = \{A, D\}$
- from $A \rightarrow BC$, we get $\{A, B, C, D\}$
- from $CD \rightarrow E$, we get $\{A, B, C, D, E\}$
Since $(AD)^+ = \{A, B, C, D, E\}$, AD is a candidate key.
- Test ED:
- $(ED)^+ = \{E, D\}$
- from $E \rightarrow A$, we get $\{A, E, D\}$
- from $A \rightarrow BC$, we get $\{A, B, C, E, D\}$
Since $(ED)^+ = \{A, B, C, D, E\}$, ED is a candidate key.
- Test A:
- $(A)^+ = \{A, B, C\}$. This is not a key.
- Test E:
- $(E)^+ = \{E, A, B, C\}$. This is not a key.
Let's check other combinations. Since we found keys of size 2 (AD, CD, ED), no superset of these can be a candidate key, and no single attribute is a key. We have found all minimal keys.
Step 3: Comparing with Options:
The candidate keys we found are CD, AD, and ED.
- (A) A and ED are CKs, but 'CK' is not an attribute. This is poorly phrased.
- (B) States that AD, ED, CD are CKs. This matches our findings.
- (C) and (D) are incomplete lists.
Step 4: Final Answer:
The set of all candidate keys is \{AD, ED, CD\}. Option (B) correctly lists these.
Was this answer helpful?
0
0

Questions Asked in GATE DA exam

View More Questions