unique paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below).
How many possible unique paths are there?
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below).
How many possible unique paths are there?
Catalan Number.
ReplyDeletepath(n,m)=path(n,m-1)+path(n-1,m)
ReplyDeletepath(1,k)=1 for all 1<=k<=m
path(k,1)=1 for all 1<=k<=n
C(m+n,n) or C(m+n,m)
ReplyDelete=(m+n)!/n!*m!
@ankit please cross check your solution i think it should be c(m+n-2,m-1).
ReplyDeleteu r rite... thanks.... this is a pet question of Adobe ;)
ReplyDelete