Number of Unique Paths in $M\times N$ Matrix; Combination or Permutation? I was checking out this problem about # of unique paths in a mxn matrix where you go from top left to bottom right, using only down and right.
http://researchideas.ca/wmt/c6b3.html

There's a solution using combination, by rephrasing the problem as out of total steps to get to the goal how many can you have to pick them to be right (the other ones are down by default). 
The article has this quote "In fact, the order of the moves does not matter as long as there are a total of 10 moves, five of which are right."
I don't understand that. If I didn't look at the solution using combination, I would have guessed this needs to be solved using permutation because order seem to matter:
D D D D D R R R R R is a different path than D D D D R D R R R R.
I'm confused at why the order doesn't matter? Why is this combination instead of permutation?
 A: The task
Imagine a × matrix where one can make steps only in two directions - down and to the right.
The task is to find a number of unique paths connecting top left and bottom right corners.
As correctly mentioned above, there are exactly  vertical and  horizontal moves. This is an important assumption and having made it one is tempted to use it literally to represent a set of possible steps
$ =｛ \underbrace{ ℎ,…, ℎ }_\text{} , \underbrace{,…, }_\text{} ｝$,
i.e. by step types.
However, this is not a set as defined for the purpose of combinatorics formulas used - all elements must be unique. So the challenge is just to represent the steps set properly.
The trick
Here is the trick to solve this representation problem.Instead of step types consider a set of step numbers
$ =｛ \underbrace{ 1,2,…,+−2 }_\text{+−2} ｝$.
Now, picking any −1 step numbers to be vertical will uniquely represent a path
forcing the remaining -1 steps to be horizontal.
Finally, answering your very question
Say, out of 3 vertical and 5 horizontal steps in total we picked 3 vertical steps to be number 2, 4 and 8. That will leave us with steps number 1, 3, 5, 6 and 7 to be horizontal. These two are true sets, and picking {2,4,8} to be vertical ones is essentially the same as picking {8,2,4}. That is why, following the above representation we use combinations instead of permutations.
Due to the trivial identity of binomial coefficients, the number of ways to pick  elements out of  is equal to the number of ways to pick - elements. Hence we do not care which of type to pick, and consequently
$\binom{+−2}{−1} =\binom{+−2}{−1} = \frac{(+−2)!}{(−1)!(−1)!}$
Hope that helps.
A: The D's and R's arent unique. In a permutation there would be $5! 5!$ different paths that just consist of  D D D D D R R R R R. When clearly that is just a single path. 
We have 10 distinct "slots" to fill with 5 indistinct "D"'s (or "R"'s, whichever way you choose to do it). Therefore we use combinations, since that's exactly what they do.
