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:

  1. XĀ is a non-empty subset ofĀ S.

  2. YĀ is a non-empty subset ofĀ S.

  3. 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.

Explore the full course: Gate Guidance By Sanchit Sir