A functional dependency is termed as a useful functional dependency if and only if it satisfies all the following three conditions:
- is not the empty set.
- is not the empty set.
- Intersection of and is the empty set.
For a relation with 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 for a relation with attributes, we need to find the number of pairs of subsets of the attribute set (where ) such that:
We can solve this using two different approaches:
Method 1: Using Attribute Assignments (Combinatorics)
For each of the attributes in , there are exactly choices:
- The attribute belongs to .
- The attribute belongs to .
- The attribute belongs to neither nor .
The total number of such assignments is .
However, we must exclude cases where or is empty:
- Case 1:
Each attribute can either belong to or to neither ( choices per attribute).
Number of ways = . - Case 2:
Each attribute can either belong to or to neither ( choices per attribute).
Number of ways = . - Case 3: Both and
All attributes belong to neither ( choice per attribute).
Number of ways = .
Using the Principle of Inclusion-Exclusion (PIE):
Method 2: Partitioning by the Size of
Let . Since must be non-empty and disjoint from , can range from to .
- If :
Choose in ways. The remaining attributes can form . Since , there are choices for .
ways. - If :
Choose in ways. The remaining attributes can form . Since , there are choices for .
ways. - If :
Choose in ways. The remaining attribute can form . Since , there is choice for .
ways.
Summing these up:
Free practice · Your answers on this page are not saved.
