I am curious about a situation in permutations/combinations. This question stems from a challenge site (project euler, problem 15) and research found on this exchange and elsewhere. The question involves finding a path through a 20 x 20 grid from one corner to another. This question has been generally addressed previously here: Counting number of moves on a grid
But I am curious about the solution and was hoping to understand it further. The use of the algorithms for combinations and permutations makes sense to me. This problem can be though of by simplifying it to the fact there will always be 40 total moves, 20 of which will be down and 20 of which will be right to reach a valid end point. The solution involves using the algorithm for combinations, i.e. 40C20. Reading the responses it has been stated that order does not matter and as such this is a combination. However, traditionally I would think this would call for a permutation because although starting as (0,0) and going Right-Down or Down-Right both gets you to (1,1) they do so using different paths and I would think would need to be counted as unique. However, this does not appear to be the case. If thought of in terms of strings such as RRRRDDDD... for the series of moves, does not each unique position of an R and a D matter? Thanks for any help, I like to understand the concepts behind a problems solution before I move on, any additional explanation would be much appreciated.