1
$\begingroup$

Say you have a function: f (m,n)

f (m,n) =  m  if n = 1 f (m,n) =  n  if m = 1 otherwise f (m,n) = f (m - 1, n) + f (m, n - 1) 

Pre-calculated value:

1 2  3  4  5  6  2 4  7  11 16 3 7  14 25 4 11 25 5 16 6 

Just wondering if there could be formula of f(m,n), instead of doing a dynamic progrmming or recursive calculation to get the value.

2 Answers 2