Consider an \(m\times n\) rectangular grid . Find the total number of paths one can reach from lower left corner to upper right corner .

Plz post ur method and other variations possible in such questions,

For example the number of shortest path possible from one corner to opposite corner is \(\frac{(m+n)!}{m!\times n!}\)

I dont know how to solve if its asked number of paths possible to reach from one corner to the corner above it.

## Comments

Sort by:

TopNewestI think this problem would be more interesting if it asked for the number of ways to reach the opposite square,

not being able to retrace your path, i.e. go on squares you have already been on. – Andrei Golovanov · 2 years, 2 months agoLog in to reply

– Gian Sanjaya · 2 years, 2 months ago

right. I guess that's what meantLog in to reply

it's infinite if you said all path. Obviously, because you told all possible paths, and you can return to a point you started, that makes number of possible paths infinite. What's wrong? – Gian Sanjaya · 2 years, 2 months ago

Log in to reply

Can you add your explanation to Rectangular Grid Paths wiki? Thanks! – Calvin Lin Staff · 2 years, 2 months ago

Log in to reply

Assume person starts from lower left corner. To take the shortest path, one can travel

only up or rightin each step. And there are of course, \(m+n\) steps to take. In the end, the person is at the top right corner, this means that he/she has traveled \(m\) units up and \(n\) units right. The order in which these steps were arranged is the thing that matters here and is the thing we have to count. Basically you need the coefficient of \(x^ny^m\) in \((x+y)^{m+n}\). – Raghav Vaidyanathan · 2 years, 2 months agoLog in to reply

set helps a lot – Tanishq Varshney · 2 years, 2 months ago

well thisLog in to reply

– Raghav Vaidyanathan · 2 years, 2 months ago

Yes, I saw that set.. My friend gave me similar qs.. so I din't go for solving them again.Log in to reply

– Tanishq Varshney · 2 years, 2 months ago

if total number of possible paths are asked then??Log in to reply

– Raghav Vaidyanathan · 2 years, 2 months ago

Then the answer is infinite, as one can keep going in loops around the grid.Log in to reply

– Tanishq Varshney · 2 years, 2 months ago

ok, if one is allowed to move p steps noth and q steps east, thenLog in to reply

– Raghav Vaidyanathan · 2 years, 2 months ago

I do not understand your question. How is it different from the one initially discussed in this note?Log in to reply

– Tanishq Varshney · 2 years, 2 months ago

I mean to say if one has the condition to move 3 steps right and 2 steps upLog in to reply

eg: if there are thirty vertical blocks and person can take three steps only, this is same as 10 vertical blocks when the person is taking one step each. – Raghav Vaidyanathan · 2 years, 2 months ago

Log in to reply

– Tanishq Varshney · 2 years, 2 months ago

Can u post solution for the problems ants on a cubeLog in to reply