Question

A functional dependency F:X→YF: X \rightarrow 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 4 attributes, the total number of possible useful functional dependencies is ________

Official answer and solution
Official answer
50
From
Official GATE 2024 answer key

Solution

Assign each of the 4 attributes to XX, YY, or neither (343^4), and use inclusion-exclusion to remove cases where X=∅X = \emptyset or Y=∅Y = \emptyset.

Since X∩Y=∅X \cap Y = \emptyset, each of the 44 attributes of relation RR can be placed into one of 33 disjoint buckets: XX, YY, or R∖(X∪Y)R \setminus (X \cup Y).

  • Total ways to assign 44 attributes to the 33 buckets =34=81= 3^4 = 81.
  • Number of assignments where X=∅X = \emptyset (attributes only in YY or neither) =24=16= 2^4 = 16.
  • Number of assignments where Y=∅Y = \emptyset (attributes only in XX or neither) =24=16= 2^4 = 16.
  • Number of assignments where both X=∅X = \emptyset and Y=∅Y = \emptyset =1= 1.

By inclusion-exclusion, the number of useful functional dependencies is:

34−2⋅24+1=81−32+1=503^4 - 2 \cdot 2^4 + 1 = 81 - 32 + 1 = 50
Final answer

50

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

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
Question
56 of 65
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.