Skip to content
Official PYQ · 2024

GATE CS 2024 Set 2 Q46 — Normal Forms

Explain with AI

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:

  • X\text{X} is not the empty set.
  • Y\text{Y} is not the empty set.
  • Intersection of X\text{X} and Y\text{Y} is the empty set.


For a relation R\text{R} with 44 attributes, the total number of possible useful functional dependencies is __________.

View worked solution

Answer: 50

To find the total number of possible useful functional dependencies X→YX \rightarrow Y for a relation RR with 44 attributes, we need to find the number of pairs of subsets (X,Y)(X, Y) of the attribute set UU (where ∣U∣=4|U| = 4) such that:

  1. X≠∅X \neq \emptyset
  2. Y≠∅Y \neq \emptyset
  3. X∩Y=∅X \cap Y = \emptyset

We can solve this using two different approaches:

Method 1: Using Attribute Assignments (Combinatorics)

For each of the 44 attributes in UU, there are exactly 33 choices:

  • The attribute belongs to XX.
  • The attribute belongs to YY.
  • The attribute belongs to neither XX nor YY.

The total number of such assignments is 34=813^4 = 81.

However, we must exclude cases where XX or YY is empty:

  • Case 1: X=∅X = \emptyset
    Each attribute can either belong to YY or to neither (22 choices per attribute).
    Number of ways = 24=162^4 = 16.
  • Case 2: Y=∅Y = \emptyset
    Each attribute can either belong to XX or to neither (22 choices per attribute).
    Number of ways = 24=162^4 = 16.
  • Case 3: Both X=∅X = \emptyset and Y=∅Y = \emptyset
    All attributes belong to neither (11 choice per attribute).
    Number of ways = 14=11^4 = 1.

Using the Principle of Inclusion-Exclusion (PIE):

Valid Pairs=Total−∣X=∅∣−∣Y=∅∣+∣X=∅∩Y=∅∣\text{Valid Pairs} = \text{Total} - |X = \emptyset| - |Y = \emptyset| + |X = \emptyset \cap Y = \emptyset| Valid Pairs=81−16−16+1=50\text{Valid Pairs} = 81 - 16 - 16 + 1 = 50

Method 2: Partitioning by the Size of XX

Let ∣X∣=k|X| = k. Since YY must be non-empty and disjoint from XX, kk can range from 11 to 33.

  • If k=1k = 1:
    Choose XX in (41)=4\binom{4}{1} = 4 ways. The remaining 33 attributes can form YY. Since Y≠∅Y \neq \emptyset, there are 23−1=72^3 - 1 = 7 choices for YY.
    Total=4×7=28\text{Total} = 4 \times 7 = 28 ways.
  • If k=2k = 2:
    Choose XX in (42)=6\binom{4}{2} = 6 ways. The remaining 22 attributes can form YY. Since Y≠∅Y \neq \emptyset, there are 22−1=32^2 - 1 = 3 choices for YY.
    Total=6×3=18\text{Total} = 6 \times 3 = 18 ways.
  • If k=3k = 3:
    Choose XX in (43)=4\binom{4}{3} = 4 ways. The remaining 11 attribute can form YY. Since Y≠∅Y \neq \emptyset, there is 21−1=12^1 - 1 = 1 choice for YY.
    Total=4×1=4\text{Total} = 4 \times 1 = 4 ways.

Summing these up:

Total useful FDs=28+18+4=50\text{Total useful FDs} = 28 + 18 + 4 = 50

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Normal Forms questions