A functional dependency š¹: š ā š is termed as a useful functionalā¦
2024
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 4 attributes, the total number of possible useful functional dependencies is ________
Attempted by 168 students.
Show answer & explanation
Correct answer: 50
For a relation R with 4 attributes, the total number of possible useful functional dependencies isĀ 50.
Explanation - This is a combinatorial problem based on the provided definition of a "useful functional dependency" (X ā Y), which is another term for aĀ non-trivial functional dependencyĀ where the left-hand side (LHS) and right-hand side (RHS) are disjoint sets.
Let the set of 4 attributes beĀ S = {A, B, C, D}. A useful FDĀ X ā YĀ must satisfy:
XĀ is a non-empty subset ofĀ S.
YĀ is a non-empty subset ofĀ S.
XĀ andĀ YĀ are disjointĀ (X ā© Y = ā ).
We can calculate the total number by considering all possible sizes for the determinantĀ X. LetĀ kĀ be the number of attributes inĀ X.
Case 1:Ā XĀ has 1 attribute (k=1)
We can choose 1 attribute forĀ XĀ from the 4 available attributes inĀ C(4, 1) = 4 ways.
For each choice ofĀ X, there areĀ 4 - 1 = 3Ā attributes remaining forĀ Y.
Y must be a non-empty subset of these 3 remaining attributes. The number of non-empty subsets is 2³ - 1 = 7.
Total FDs for this case:Ā 4 Ć 7 = 28.
Case 2:Ā XĀ has 2 attributes (k=2)
We can choose 2 attributes forĀ XĀ from the 4 available inĀ C(4, 2) = 6 ways.
For each choice ofĀ X, there areĀ 4 - 2 = 2Ā attributes remaining forĀ Y.
Y must be a non-empty subset of these 2 remaining attributes. The number of non-empty subsets is 2² - 1 = 3.
Total FDs for this case:Ā 6 Ć 3 = 18.
Case 3:Ā XĀ has 3 attributes (k=3)
We can choose 3 attributes forĀ XĀ from the 4 available inĀ C(4, 3) = 4 ways.
For each choice ofĀ X, there isĀ 4 - 3 = 1Ā attribute remaining forĀ Y.
Y must be a non-empty subset of this 1 remaining attribute. The number of non-empty subsets is 2¹ - 1 = 1.
Total FDs for this case:Ā 4 Ć 1 = 4.
(Note:Ā XĀ cannot have 4 attributes, because thenĀ YĀ would have to be empty, violating the condition.)
Final Calculation - The total number of possible useful functional dependencies is the sum of all cases: Total = 28 + 18 + 4 =Ā 50.
A video solution is available for this question ā log in and enroll to watch it.