GATE / CS ARCHIVE

GATE CSE 2024 SET 2 / QUESTION 56

Count disjoint nonempty sides of a functional dependency

Database Management Systems · Functional Dependencies & Keys · Full GATE CSE 2024 Set 2 paper

GATE 2024 Set 2, Q56 2 marks · NAT
Report issue

Functional Dependencies & Keys

Question 56, GATE 2024: On a schema of four attributes, call X→Y useful when X and Y are both nonempty and X∩Y=∅. How many different such dependencies are possible?
Tap to enlarge
Answer & solution

Official answer: 50

Approach: Assign each attribute to the left side, right side, or neither, then exclude empty sides.

1. Derivation. For each of four attributes choose membership in X, membership in Y, or neither: 3⁴ assignments enforce disjointness. Exclude assignments with X empty (2⁴) and Y empty (2⁴), then restore the all-neither assignment counted twice. The number is 3⁴−2⁴−2⁴+1=81−16−16+1=50. This counts possible syntactic dependencies, not dependencies that necessarily hold on a particular instance.

2. Explanation and checks. An alternative count chooses the size k of X: sum from k=1 to 3 of C(4,k)(24−k−1). For k=1 there are 4×7=28 choices; k=2 gives 6×3=18; k=3 gives 4×1=4, totaling 50. X→Y and Y→X are different dependencies because direction matters. Multiattribute right sides are allowed by the definition; restricting Y to a single attribute would answer a different question.

Original paper, page 37 · Answer key