Edward C. answered 05/25/15
Tutor
5.0
(438)
Caltech Grad for math tutoring: Algebra through Calculus
If you imagine Joe lining up the candies and numbering them 1 thru 10 before he eats them in that order, then the number of color patterns is uniquely specified by the number of different placements of orange candies. That is, once Joe decides which positions he's going to put the 5 orange candies in, then the positions of the 5 yellow candies are fixed. So how many choices does Joe have to place the orange candies? In essence, Joe is choosing 5 locations for the orange candies out of 10 available locations. So the number of choices is 10 choose 5, which is written 10C5 and
10C5 = 10!/(5!(10-5)!) = 10*9*8*7*6/(5*4*3*2) = 1*3*2*7*6 = 42*6 = 252
Note that there is some symmetry in this problem, meaning that you could have solved for the number of placements of yellow candies instead and gotten the same answer (obviously, since 10C5 = 10C5). But the problem is symmetric even if the number of orange candies is different than the number of yellow candies. So if there were 3 orange candies and 7 yellow candies, you could get the same answer by computing 10C7 or 10C3, and this is the reason that the choose function is symmetric about n/2.