# How many ways can a television producer air commercials…

A television director has to schedule commercials during 6 time slots. There are four distinct commercials, A, B, C, and D. A must be aired three times but never twice consecutively.

How many ways are there to air the ads?

-

Let $X,Y$, and $Z$ stand for the commercials $B,C$, and $D$ in any order. Counting the first and last positions, there are four possible slots for $A$, indicated by underscores: $\_X\_Y\_Z\_$. We can put at most one $A$ commercial in each of those slots, so to schedule the $A$ commercials, we need only decide which $3$ of the $4$ possible slots to use; we can do that in $\binom43$ ways. Then we have to decide on the order of $B,C$, and $D$ in the $X,Y$, and $Z$ slots. How many permutations of $A,B$, and $C$ are possible? Can you finish it from there?

-
X_Y_Z are not the only possibilities, as it may also be XY_Z for example – CodyBugstein Sep 24 '12 at 20:55
@Imray: You didn't put breaks between the sets of six in your comment, so it is very hard to read. – Ross Millikan Sep 24 '12 at 20:56
Is this what you're saying? That, calling the other one-shot commercials "O", there are four possible ways to arrange the A's: {A O A O A O} {A O O A O A} {A O A O O A} {O A O A O A} And then, it's simply 3! * 4 ? – CodyBugstein Sep 24 '12 at 21:00
@Imray: If the four ways in your first comment are AOAOAO, AOOAOA, AOAOOA, and OAOAOA, then yes, that’s exactly what I’m saying. Your second comment doesn’t make any sense: _X_Y_Z_ does not specify a placement of $B,C$, and $D$, but rather shows all four of the places that they could go. – Brian M. Scott Sep 24 '12 at 21:00
Gotcha!! So there are 4 ways to arrange A. Now, within each of those four ways, there are 3! ways to rearrange B, C & D (A doesn't matter since their order is not important). So the answer is 3! * 4 = 24 ways. Is that correct? – CodyBugstein Sep 24 '12 at 21:05

There is some ambiguity in the problem: must each of $B$, $C$, and $D$ be shown?

Yes, they all must be shown: Call the time slots $1, 2, 3, 4, 5, 6$. Then $A$ is either in $1,3,5$ or in $2,4,6$, two possibilities. For each of these, there are $3$ empty slots, which can be filled in $3!$ orders from $B$, $C$, and $D$, for a total of $(2)(3!)$. This is likely to be the intended interpretation.

No, they need not be all show: this is a much less plausible interpretation. The location of the $A$'s can be chosen in $2$ ways. For each of these, the first empty slot can be filled in $3$ ways. For each such possibility, the second empty slot can be filled in $3$ ways, and then the third can be filled in $3$ ways, for a total of $(2)(3^3)$.

-