(A)Consider the set of all possible positive binary whole numbers each having exactly twelve digits consisting of precisely six 1's and six 0's. The first digit cannot be 0 . Determine the sum of all these numbers in the decimal notation.
(B)Consider the set of all possible positive binary whole numbers each having exactly fourteen digits consisting of precisely seven 1's and seven 0's. The first digit cannot be 0. Determine the sum of all these numbers in the decimal notation.
Part 1.
The first digit must be 1, so the remaining 5 1's must be distributed among the other 11 digits. The number of such numbers is therefore combin(11,5)=462. All have their high-order bit on, with a value of 2^11=2048. In the other digit positions, only 5/11 of the 462, or 210, have any given bit on. Those bits together, if all were on in one number, would total 2047. So the total is 462*2048 + 210*2047 = 1,376,046.
Part 2.
The first digit must be 1, so the remaining 6 1's must be distributed among the other 13 digits. The number of such numbers is therefore combin(13,6)=1716. All have their high-order bit on, with a value of 2^12=4096. In the other digit positions, only 6/13 of the 1716, or 792, have any given bit on. Those bits together, if all were on in one number, would total 4095. So the total is 1716*4096 + 792*4095 = 10,271,976.
|
Posted by Charlie
on 2006-10-09 10:44:32 |