5 5 votes Consider a relation $R$ with $2n$ attributes. Assume any $2n/2$ of the attributes constitutes key. Total number of super keys possible are: $^{2n}C_{2^{n-1}}\times \left(2\right)^{2^{n-1}}$ $^{2n}C_{2^{n-1}} + \left(2\right)^{2^{n-1}}$ $^{2n}C_{2^{n-1}} - \left(2\right)^{2^{n-1}}$ $^{2n}C_{2^{n-1}} \div \left(2\right)^{2^{n-1}}$ Databases made-easy-test-series databases super-key + – Tushar Shinde 2.3k views answer comment Share Follow Print See 1 comment 1 1 comment reply Sumit1311 commented Jan 18, 2016 reply Follow flag I think by 2n they mean 2^n(because otherwise no option matches) 0 0 replyShare Please log in or register to add a comment.
4 4 votes Well I think there is a typo in question .... as per the given answer..:p the question should be There are 2^n attributes in a relation R,... Any combination (2^n)/2 (i.e 2^(n-1)) keys forms a candidate key then number of candidate keys---> $\binom{2^{n}}{2^{n-1}}$ remaining attributes --> $2^{n}-2^{n-1}= 2^{n-1}$ any of the subset could be taken for a superkey therefore number of subsets $2^{2^{n-1}}$ therefore total number of superkeys $\binom{2^{n}}{2^{(n-1)}}*2^{2^{n-1}}$ Abhishekcs10 answered Jan 19, 2016 Abhishekcs10 comment Share Follow See all 9 Comments 9 9 Comments reply Show 6 previous comments Arjun commented Jan 20, 2016 reply Follow flag Can't the summation be evaluated? 0 0 replyShare Abhishekcs10 commented Jan 20, 2016 i edited by Abhishekcs10 Jan 20, 2016 reply Follow flag Please verify the summation ...I solved it this way..--> In a binomial expansion terms repeats after the middle term .For eg. the pascal triangle 1--->$\binom{n}{0}$ 1 1---> $\binom{n}{0} \binom{n}{1}$ 1 2 1..... 1 3 3 1... So for summing sequence having odd terms (as the summation from $\binom{2^{n}}{0} to \binom{2^{n}}{2^n}$ will have odd number of terms from 0 to 2^n) $\displaystyle\sum_{k= 0}^{2^{n}}\binom{2^{n}}{k}$ = $\displaystyle\sum_{k= 0}^{2^{n-1}-1}\binom{2^{n}}{k}$ + $\binom{2^{n}}{2^{n-1}} + \displaystyle\sum_{k= 2^{n-1}+1}^{2^{n}}\binom{2^{n}}{k}$ { just broke the summation in three parts let us call them I, II, III where first summation term and last summation will be equal} now we need to find out II+III, I term = lII term = $(1/2)*\left ( \displaystyle\sum_{k= 0}^{2^{n}}\binom{2^{n}}{k} -\binom{2^{n}}{2^{n-1}}\right )$ therefore II+III term =$\binom{2^{n}}{2^{n-1}}$ + $1/2*\left ( \displaystyle\sum_{k= 0}^{2^{n}}\binom{2^{n}}{k} -\binom{2^{n}}{2^{n-1}}\right )$ =$(1/2)*\left ( 2^{2^{n}} + \binom{2^{n}}{2^{n-1}} \right )$ 4 4 replyShare Arjun commented Jan 20, 2016 reply Follow flag yes, the summation is correct. Option B would have been correct with 0.5 on the left term. 0 0 replyShare Please log in or register to add a comment.
0 0 votes Candidate key:- it is the minimal super key which can identify each tuple uniquely. A table can have more than one candidate kr possible. As it is minimal, any attribute attach to it will make it a super key. So here out of 2n attributes we can have any 2n/2 attributes as candidate key.therefore can select the attributes in 2nC(2n/2) ways . Attributes left - 2n/2 Now any attribute attach with any candidate keys will make them super key. So for each attributes we can have 2 choices either include them or leave them So for 2n/n attributes total way to select: 2^2n/2 Total super key: 2nC(2n)/2 *2^2n/2 Sandip Shaw answered Jan 18, 2016 Sandip Shaw comment Share Follow 0 reply Please log in or register to add a comment.