2A) Find the number of ways to write four 0's and five 1's in a row so that no two zeroes are next to each other.
So I understand the basic structure of this problem is "0101010" but how do you factor in the remaining two 1's to calculate the number of ways to write the sequence?
2B) Find the number of ways to write digits 1 through 9 in a row (so each digit appears exactly once) and no two digits EVEN digits are next to each other.
I feel like this is the same logic as A but I have no idea how to solve.
If we write down a row of five ones, we create six spaces in which we could place a zero, four between successive ones and two at the ends of the row.
$$\square 1 \square 1 \square 1 \square 1 \square 1 \square$$
To separate the zeros, we choose four of these six spaces in which to insert a single zero. For instance, if we choose the first, third, fourth, and fifth places, we obtain $$011010101$$ The number of such choices is $$\binom{6}{4} = 15$$ Hence, there are $15$ sequences of four zeros and five ones in a row in which no two zeros are adjacent.