title: Algorithm for total number of subsets of distinct elements in a given set of repetitive elements
body: <p>I have to find out the total number of subsets of 'k' (k > 1), length which contains distinct elements. Two subsets are considered different if there happened to be a same element but have different index. See the example below.</p>
  
  <blockquote>
    <p>Given a Set A={1, 1, 2, 3}.</p>
    
    <p>For k=2, the possible subsets are {1(index=1), 2}, {1(index=2), 2},
    {1(index=1), 3}, {1(index=2), 3} and {2, 3}.  Total=5.</p>
    
    <p>For k=3,the possible subsets are {1(index=1), 2, 3}, {1(index=2), 2,
    3}.  Total=2.</p>
    
    <p>For k=4,possible subsets=0.</p>
  </blockquote>
  
  <p>I have to calculate this for an array of 10^5 length. Is there any combinatorial logic for it?</p>