# Thread: Shortest ways from (0.0,0) to (M,N,P)

1. ## Shortest ways from (0.0,0) to (M,N,P)

I have a problem for the number of the shortest ways from (0,0,0) to (M,N,P).
May I ask the shortest way is (M+N+P), and the total number of the shortest ways is (M+N+P)! / M!N!P! or (M+N+P) C (M) * (N+P) C (N) * (P) C (P) ?
because a journey from (0,0,0) to (M,N,P) consists of lists of segments where each segment is the length of a single block either east or north or up.
So, (M+N+P) can be arranged in any order. However, each M*easts or N*norths or P*ups can be interchangeable each other.
Thus, I need to remove the duplication, so I need to divide (M+N+P)! by M!N!P!.

May I ask if I am correct?
Happy New Year!

Best

2. ## Re: Shortest ways from (0.0,0) to (M,N,P)

PLEASE state the entire problem first! You state "I have a problem for the number of the shortest ways from (0,0,0) to (M,N,P)."

The answer to that is that there is exactly one shortest way! It is the straight line from (0, 0, 0) to (M, N, P).

From what you then write, you seem to be considering only lines of integer lengths, parallel to the axes. Is that true?

3. ## Re: Shortest ways from (0.0,0) to (M,N,P)

Originally Posted by HallsofIvy
PLEASE state the entire problem first! You state "I have a problem for the number of the shortest ways from (0,0,0) to (M,N,P)."

The answer to that is that there is exactly one shortest way! It is the straight line from (0, 0, 0) to (M, N, P).
From what you then write, you seem to be considering only lines of integer lengths, parallel to the axes. Is that true?
While I absolutely agree that we should not be made to guess at what a post really means, I think in this case the intent is clear.

The question is about a three 3-D lattice. Each of $M,~N,~\&~P$ is a non-negative integer.
Each path from $(0,0,0)\to(M,N,P)$ consists of $M~x's,N~y's,~\&~P~z's$ all of length one.

Actually the OP gives the correct answer: $\frac{(M+N+P)!}{(M!)(N!)(P!)}$

4. ## Re: Shortest ways from (0.0,0) to (M,N,P)

I am sorry not to mention the question first.
Yes, what you said it exactly correct!