Let $N_4 = \{1, 2, ..., 4\}$. Calculate the number of strings on the set $N_4$ that are of length $8$. Calculate the number of strings on the set $N_4$ that are of length $8$ and contain exactly five ones.


For the first part of the question, for each of the $8$ positions in the string we have a choice of $4$ digits. Using the product rule, the number of different possible strings is $= 4^8 = 65536$.

The task of creating a string from the set $N_4$ of length $8$ with $5$ ones may be partitioned into two tasks:

Select the position of the ones this can be done in $C(8,5) = 56$ different ways. (THIS IS THE STEP I DON"T UNDERSTAND)

(AND THIS TOO) Select the digits that go into the remaining $3$ positions $= 3^3 = 27$ different ways.

We now apply the product rule to obtain the solution $= 1512$.

Hence, the solutions are:

  • $\begingroup$ Please read this tutorial on how to typeset mathematics on this site. $\endgroup$ – N. F. Taussig Aug 6 '16 at 22:33

Placing the ones: You have 8 positions to place the first '1', after that 7 positions remain available for the second '1', and so on till the fifth '1' (4 positions left for it). In total you would have 8×7×6×5×4 options; but, because the '1's are indistinguishable from each other, for each placement you are counting them 5×4×3×2×1 times (this is the number of ways you can order the '1's between themselves; imagine them having different colors for example). So the number of indistinguishable ways to place the '1's is: 8×7 = 56 (divide the two products above).

Placing the other digits: You are now left with 3 vacant positions, where you can place 2, 3 or 4. So, you have 3 options for each position, and in total: 3×3×3 = 27 combinations

  • $\begingroup$ ok got it now, i forgot that there was a formula for this $\endgroup$ – Jack Sindler Aug 6 '16 at 23:28
  • $\begingroup$ one more thing, how does the (3)^3 come about the one in (), in another question i did it is like so (5)^3 $\endgroup$ – Jack Sindler Aug 8 '16 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.