Question
Q 8: Count the number of 01-strings with following constraints.
(a) The length is 8. Number of 1s is 2 more than number of 0s.
(b) The length is 8. Number of 1s is 3 more than number of 0s.
(c) The length is 9. Number of 1s is 3 more than number of 0s.
(a) The length is 8. Number of 1s is 2 more than number of 0s.
(b) The length is 8. Number of 1s is 3 more than number of 0s.
(c) The length is 9. Number of 1s is 3 more than number of 0s.
Answers
Steve
(a) you have 5 1s and 3 0s
so, use the formula for permutations of a set with duplicates:
8!/(5!3!) = 56
That's because for every one of the 8! permutations, the 1s and 0s can be shuffled without altering the string.
(b) and (c) are similar.
so, use the formula for permutations of a set with duplicates:
8!/(5!3!) = 56
That's because for every one of the 8! permutations, the 1s and 0s can be shuffled without altering the string.
(b) and (c) are similar.