title: computes the number of possible orderings of n objects under the relations < and =
body: <p>Here is the problem :</p>
  
  <p>Give a algorithm that takes a positive integer n as input, and computes the number of possible orderings
  of n objects under the relations &lt; and =. For example, if n = 3 the 13 possible orderings are as follows:</p>
  
  <pre><code>a = b = c, 
  a = b &lt; c, 
  a &lt; b = c, 
  a &lt; b &lt; c, 
  a &lt; c &lt; b, 
  a = c &lt; b, 
  b &lt; a = c, 
  b &lt; a &lt; c, 
  b &lt; c &lt; a,
  b = c &lt; a, 
  c &lt; a = b, 
  c &lt; a &lt; b, 
  c &lt; b &lt; a. 
  </code></pre>
  
  <p>Your algorithm should run in time polynomial in n.</p>
  
  <p>I'm null to this problem. Can you find any solution to this dynamic-programming problem?</p>