title: How to find out the number of calls to the nCr function
body: <p>What is the solution of the following recursive equation?</p>
  
  <p>T(n, 0) = 1,<br/>
  T(n, n) = 1,<br/>
  T(n, r) = T(n-1, r-1) + T(n-1, r) + 1</p>
  
  <p>I got this while trying to find out the number of calls to the function nCr, in the following definition of nCr</p>
  
  <pre><code>int nCr ( int n, int r ) {
    if( n == r || r == 0 ) 
      return 0;
    return nCr( n-1, r-1 ) + nCr( n-1, r );
  }
  </code></pre>
  
  <p>Is this recursive equation appropriate for the purpose?</p>