Counting Methods

mathproblems

New member
Joined
Oct 24, 2011
Messages
17
How many eight- bit strings have exactly two 1's?

I wrote all combinations from 11000000 to 00000011. And I got 28 combinations.

Is there a better way to count them?

Thank you.
 
You did not have to write them all out, but you are correct.

\(\displaystyle C(8,2)=28\)
 
Hello, mathproblems!

How many eight-bit strings have exactly two 1's?
galactus is absolutely correct!


There are eight positions.
Choose two of them to place the two 1's.
. . There are: .\(\displaystyle \displaystyle _8C_2 \:=\:{8\choose2} \:=\:\frac{8!}{2!\,6!} \:=\:28\) ways.



If you had to make a brute-force Listing . . .

\(\displaystyle \begin{array}{cccc}1\:\_\:\_\:\_\:\_\:\_\:\_\:\_ & \text{There are 7 choices for the other 1.} \\ \_\:1\:\_\:\_\:\_\:\_\:\_\:\_ & \text{There are 6 choices for the other 1.} \\ \_\:\_\;1\:\_\:\_\:\_\:\_\:\_ & \text{There are 5 choices for the other 1.} \\ \vdots & \vdots \\ \_\:\_\:\_\:\_\:\_\:\_\:\_\:1\:\_ & \text{There is 1 choice for the other 1.} \\ \_\:\_\:\_\:\_\:\_\:\_\:\_\:\_\:\_\:1 & \text{There is 0 choice for the other 1.} \end{array}\)


Therefore, there are: .\(\displaystyle 7+6+5+4+3+2+1+0 \:=\:28\) ways.
 
Top