GATE CS 2024 Set 2 — Question 56

NAT+2 / -0MediumFunctional DependenciesNormalizationDatabases

Databases → Normalization → Functional Dependencies

Last updated

Question

A functional dependency F:XYF: X \to Y is termed as a useful functional dependency if and only if it satisfies all the following three conditions:
  • XX is not the empty set.
  • YY is not the empty set.
  • Intersection of XX and YY is the empty set.
For a relation RR with 44 attributes, the total number of possible useful functional dependencies is ________

Correct answer

50 to 50

Solution

To find the total number of useful functional dependencies F:XYF: X \to Y for a relation RR with 44 attributes, we follow the given conditions:
1.XX \neq \emptyset
2.YY \neq \emptyset
3.XY=X \cap Y = \emptyset
Let the set of attributes be U={A,B,C,D}U = \{A, B, C, D\}, so U=4|U| = 4. For each attribute aUa \in U, there are three possible assignments in a functional dependency X → Y that satisfies XY=X \cap Y = \emptyset:
  • aXa \in X
  • aYa \in Y
  • aXa \notin X and aYa \notin Y
The total number of such assignments for 44 attributes is 34=813^4 = 81.
Now, we must exclude the cases where X=X = \emptyset or Y=Y = \emptyset:
  • Case 1: X=X = \emptyset

If XX is empty, each attribute can either be in YY or in neither set. There are 24=162^4 = 16 such cases.
  • Case 2: Y=Y = \emptyset

If YY is empty, each attribute can either be in XX or in neither set. There are 24=162^4 = 16 such cases.
  • Case 3: X=X = \emptyset and Y=Y = \emptyset

This case is included in both Case 1 and Case 2. It occurs when all attributes are in neither set. There is 14=11^4 = 1 such case.
Using the Principle of Inclusion-Exclusion, the number of invalid cases (where X=X = \emptyset or Y=Y = \emptyset) is:16+161=3116 + 16 - 1 = 31Therefore, the total number of useful functional dependencies is:8131=5081 - 31 = 50

More questions on Normalization

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free