code: @Override
  	public int powerSetSize(int min, int max) {
  		if (min < 1 || max < min)
  			throw new IllegalArgumentException();
  		final int size = size();
  
  		// special cases
  		if (size < min)
  			return 0;
  		if (size == min)
  			return 1;
  
  		/*
  		 * Compute the sum of binomial coefficients ranging from (size choose
  		 * max) to (size choose min) using dynamic programming
  		 */
  
  		// trivial cases
  		max = Math.min(size, max);
  		if (max == min && (max == 0 || max == size))
  			return 1;
  
  		// compute all binomial coefficients for "n"
  		int[] b = new int[size + 1];    
  		for (int i = 0; i <= size; i++)
  			b[i] = 1;
  		for (int i = 1; i <= size; i++)   
  			for (int j = i - 1; j > 0; j--)             
  				b[j] += b[j - 1];        
  		
  		// sum binomial coefficients
  		int res = 0;
  		for (int i = min; i <= max; i++)
  			res += b[i];
  		return res;
  	}
docs: {@inheritDoc}