@bikram sir, shouldnt the answer be 8 ??

Dark Mode

442 views

3 votes

A relation $R(P,Q,R,S)$ has $\{PQ, QR, RS, PS\}$ as candidate keys. The total number of superkeys possible for relation $R$ is ______

with 4 elements i.e. {P,Q,R,S}, the number of combinations possible are 2^{4} i.e. 16. Now from these 16 exclude o length and 1 length elements. thus 16-5 = 11. now with the length of 2 two combinations are not candidate keys i.e. PR and QS. So subtract these 2 also.

Hence 11-2 i.e. 9 are the candidate keys

1

9 votes

Best answer

Number of Superkeys which are superset of PQ = 2^2 = 4

Number of Superkeys which are superset of QR = 2^2 = 4

Number of Superkeys which are superset of PS = 2^2 = 4

Number of Superkeys which are superset of RS = 2^2 = 4

Number of Superkeys which are superset of PQR = 2^1 = 2

Number of Superkeys which are superset of PQS = 2^1 =2

Number of Superkeys which are superset of PRS = 2^1 =2

Number of Superkeys which are superset of QRS = 2^1 = 2

Number of Superkeys which are superset of PQRS = 2^0 = 1

So, applying the formula of Set theory, the total number of Superkeys possible on given relation are = 4+4+4+4-2-2-2-2+1 = 9

Number of Superkeys which are superset of QR = 2^2 = 4

Number of Superkeys which are superset of PS = 2^2 = 4

Number of Superkeys which are superset of RS = 2^2 = 4

Number of Superkeys which are superset of PQR = 2^1 = 2

Number of Superkeys which are superset of PQS = 2^1 =2

Number of Superkeys which are superset of PRS = 2^1 =2

Number of Superkeys which are superset of QRS = 2^1 = 2

Number of Superkeys which are superset of PQRS = 2^0 = 1

So, applying the formula of Set theory, the total number of Superkeys possible on given relation are = 4+4+4+4-2-2-2-2+1 = 9