Natasha K. answered 05/19/23
Experienced math and chess educator for all ages
To use 3 x's, 4 y's, and 7 z's means there are 3+4+7=14 letters in the sequence. We can think about it like this: first, how many different ways are there to place the 3 x's among the 14 spots in the sequence? Then, how many ways are there to place the 4 y's in the remaining 11 spots? Note that there is only 1 way after that to place all the z's, as their locations are determined. This is just counting combinations: the answer to the question of placing x's is 14C3=14!/(3!11!)=14*13*12/(3*2*1)=364. The answer to the question of placing y's is 11C4=11!/(4!7!)=11*10*9*8/(4*3*2*1)=330. Since we have to do both of these things, the answer to the overall question is the product of those numbers: 364*330=120,120.
For the second question, to get from (1,1,1) to (3,5,7) means you have to go 2 steps in the x direction, 4 steps in the y direction, and 6 steps in the z direction. By the same logic as above, there are 2+4+6=12 total steps, and therefore 12C2 ways to choose when to do the x steps, and 10C4 ways to choose when to do the y steps; the other steps are all z steps so there is only 1 way to choose that. The answer is therefore
(12C2)*(10C4)*(1)=12!10!/(2!10!4!6!)=12!/(2!4!6!)=13,860.