edited by
1,975 views
2 votes
2 votes

Consider the following relation $R(A, B, C, D, E, F, G, H)$. The maximum number of super keys possible if $4$ simple candidate keys in relation $R$ are ________.

Solution.

What i did is $^8C_4 + ^8C_5 + ^8C_6 + ^8C_7 + ^8C_8 = 163$        Is it wrong ? and why 

edited by

1 Answer

Best answer
4 votes
4 votes

Since All are Simple Candidate keys..Apply Complementary method. Let's assume $A,B,C,D$ are the Four simple Candidate keys.

All Super Keys = All Possible Combinations -  All combinations Where None of the candidate keys are selected

All Possible Combinations = $2^8$

All combinations Where None of the candidate keys (Say A,B,C,D) are selected :  $2^4$

Hence Our answer = 256 - 16 = 240


Where you did wrong : 

See, in $_{4}^{8}\textrm{C}$ there is One combination where None of the Candidate keys is selected and All the four selected attributes are Non-key attribute. 

Further, Even if you choose Only One attribute from the $8$ But which is a candidate key (A or B or C or D), It is a Super key. And Such Combinations are not counted in your answer.

So, To Correct your answer, you would have to add such combinations. It is gonna be Time-taking approach (But you can try for learning purpose), That's why In This Question I think Complementary approach is Better one.

selected by

Related questions

3 votes
3 votes
2 answers
2
atul_21 asked Aug 16, 2017
2,052 views
0 votes
0 votes
3 answers
3
5 votes
5 votes
3 answers
4
GateAspirant999 asked Oct 29, 2016
2,424 views
A relation R(A,B,C,D,E,F) holds following FDs$AB\rightarrow C$$C\rightarrow D$$D\rightarrow EA$$E\rightarrow F$$F\rightarrow B$The number of minimal candidate keys of R a...