title: Number of ways to divide a number
body: <p>Given a number <code>N</code>, print in how many ways it can be represented as </p>
  
  <pre><code>N = a + b + c + d
  </code></pre>
  
  <p>with</p>
  
  <pre><code>1 &lt;= a &lt;= b &lt;= c &lt;= d; 1 &lt;= N &lt;= M
  </code></pre>
  
  <p>My observation:</p>
  
  <pre><code>For N = 4: Only 1 way - 1 + 1 + 1 + 1
  
  For N = 5: Only 1 way - 1 + 1 + 1 + 2
  
  For N = 6: 2 ways     - 1 + 1 + 1 + 3
                          1 + 1 + 2 + 2
  
  For N = 7: 3 ways     - 1 + 1 + 1 + 4
                          1 + 1 + 2 + 3
                          1 + 2 + 2 + 2
  
  For N = 8: 5 ways     - 1 + 1 + 1 + 5
                          1 + 1 + 2 + 4
                          1 + 1 + 3 + 3
                          1 + 2 + 2 + 3
                          2 + 2 + 2 + 2
  
  So I have reduced it to a DP solution as follows:
   DP[4] = 1, DP[5] = 1;
  
  for(int i = 6; i &lt;= M; i++)
     DP[i] = DP[i-1] + DP[i-2];
  </code></pre>
  
  <p>Is my observation correct or am I missing any thing. I don't have any test cases to run on. So please let me know if the approach is correct or wrong.</p>