4,015 views

2 Answers

Best answer
5 votes
5 votes

There are three Ck : A, BC, CDE

Take Each CK alone

No. of superkeys when CK is A alone = 24 (Because each remaining 4 values may or may not be in the SK, hence 2 posibilities for each)

No. of superkeys when CK is BC alone = 23 (Because each remaining 3 values may or may not be in the SK, hence 2 posibilities for each)

No. of superkeys when CK is CDE alone = 22 (Because each remaining 2 values may or may not be in the SK, hence 2 posibilities for each)

Now, take combinations from given CK

No. of superkeys when CK is ABC = 22 (Because each remaining 2 values may or may not be in the SK, hence 2 posibilities for each)

No. of superkeys when CK is BCDE = 21 (Because each remaining 2 values may or may not be in the SK, hence 2 posibilities for each)

No. of superkeys when CK is ACDE = 21 (Because each remaining 2 values may or may not be in the SK, hence 2 posibilities for each)

Now, take all three CK together

No. of superkeys when CK is ABCDE = 20 (Because each remaining 2 values may or may not be in the SK, hence 2 posibilities for each)

Hence total SK = 24 + 23 + 22 - 22 - 21 - 21 + 20 = 16 + 8 + 4 - (4+2+2) + 1 = 28 - 8 + 1 = 21

Hence total super keys are 21

selected by
0 votes
0 votes

using inclusion exclusion principle

no of superkeys :

2^4 +2^3 +2^2 - 2^2 -2^1 -2^1 +2^0

=21