How many arrangements are there of n 0s m 1s with k runs of 0s? a run is a consecutive set (1 or more) of the same digit?
Answers
Answered by
0
There are (n−1k−1) ways to ""cut"" n zeroes into k nonempty blocks (separate them at any of the n−1 places between zeroes).
And there are m+1 possible insertion points among the m ones (including before the first/after the last), so (m+1k) ways to place the above zero-blocks.
Thus we arrive at a total of
(n−1k−1)(m+1k).
Similar questions