public static void checkSubSet(final int n, final int k) {
		if (k <= 0) {
			throw new IllegalArgumentException(format(
				"Subset size smaller or equal zero: %s", k
			));
		}
		if (n < k) {
			throw new IllegalArgumentException(format(
				"n smaller than k: %s < %s.", n, k
			));
		}
		if (!isMultiplicationSave(n, k)) {
			throw new IllegalArgumentException(format(
				"n*sub.length > Integer.MAX_VALUE (%s*%s = %s > %s)",
				n, k, (long)n*(long)k, Integer.MAX_VALUE
			));
		}
	}
Checks if the given subset parameters {@code n} and {@code k} can be used
safely by the {@code next} methods.

@param n the cardinality of the superset
@param k the cardinality of the subset
@throws IllegalArgumentException if {@code k <= 0 || n < k} or if
        {@code n*k} overflows
jenetics/src/main/java/io/jenetics/internal/math/Subsets.java