Class CombinatorialFunctions


  • public abstract class CombinatorialFunctions
    extends java.lang.Object
    https://reference.wolfram.com/language/tutorial/CombinatorialFunctions.html
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long partitions​(int n, int[] k)  
      static long permutations​(int n)  
      static long subsets​(int n, int k)  
      static long variations​(int n, int k)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CombinatorialFunctions

        public CombinatorialFunctions()
    • Method Detail

      • partitions

        public static long partitions​(int n,
                                      int[] k)
        Parameters:
        n - The number of elements in the set
        k - A vector of subset sizes the sum of which must equal the size of the full set
        Returns:
        The number of ways the set can be partitioned in to subsets of the given sizes
      • permutations

        public static long permutations​(int n)
        Parameters:
        n - The number of elements in the set
        Returns:
        The number of permutations of the set
      • subsets

        public static long subsets​(int n,
                                   int k)
        Parameters:
        n - The number of elements in the set
        k - The number of elements in the subset
        Returns:
        The number of subsets to the set
      • variations

        public static long variations​(int n,
                                      int k)
        Parameters:
        n - The number of elements in the set
        k - The size of the tuple
        Returns:
        The number of ordered k-tuples (variations) of the set