Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Combinatorics

Tutorials

  • Combinatorics
  • Combinatorics-1
  • Combinatorics-2

Guides

  • Combinatorics
  • Functions I understand in combinatorics

Tech Notes

  • Combinatorics

Symbols

  • CanonicalMultiset
  • CentralBinomialCoefficient
  • ConjugatePartition
  • DescendingSublists
  • DivisorHasseDiagram
  • DominatingIntegerPartitionQ
  • DurfeeSquare
  • EnumerateMultisetPartialDerangements
  • EulerianCatalanNumber
  • EulerianNumber
  • EulerianNumberOfTheSecondKind
  • FerrersDiagram
  • Fibbinary
  • FibonacciEncode
  • FindAscentElements
  • FindAscentPositions
  • FrobeniusSymbolFromPartition
  • FromInversionVector
  • FromPartitionPlusNotation
  • FromPartitionSuperscriptNotation
  • GaussFactorial
  • GrayCode
  • HasseDiagram
  • HookLengths
  • HuffmanCodeWords
  • HuffmanDecode
  • HuffmanEncode
  • IntegerPartitionQ
  • InverseFibonacci
  • InverseGrayCode
  • InversionCount
  • InversionVectorQ
  • LehmerCodeFromPermutation
  • LucasNumberU1
  • LucasNumberV2
  • ModifiedCentralBinomialCoefficient
  • Multichoose
  • MultisetAssociation
  • MultisetPartialDerangements
  • MultisetStrictDescentElements
  • MultisetStrictDescents
  • NarayanaNumber
  • NextPermutation
  • NumberOfTableaux
  • OrderedTupleFromIndex
  • OrderedTupleIndex
  • OrderlessCombinations
  • OrderlessCombinationsOfUnmarkedElements
  • PartialOrderGraphQ
  • PartitionCrank
  • PartitionFromFrobeniusSymbol
  • PartitionPlusNotation
  • PartitionRank
  • PartitionSuperscriptNotation
  • PermutationAscents
  • PermutationCountByInversions
  • PermutationDescents
  • PermutationFromIndex
  • PermutationGraph
  • PermutationIndex
  • PermutationMajorIndex
  • PermutationToTableaux
  • Phitorial
  • PosetQ
  • PosetToTableau
  • Primorial
  • QExponential
  • QMultinomial
  • RandomYoungTableau
  • RationalNumberRepeatingDecimalPeriod
  • ReflexiveGraphQ
  • SecantNumber
  • SelectPermutations
  • SelectSubsets
  • SelectTuples
  • SelfConjugatePartitionQ
  • SignedLahNumber
  • StandardYoungTableaux
  • StrictIntegerPartitions
  • SubsetFromIndex
  • SubsetIndex
  • TableauQ
  • TableauToPoset
  • TableauxToPermutation
  • TangentNumber
  • ToInversionVector
  • TransitiveGraphQ
  • TransposeTableau
  • TupleFromIndex
  • TupleIndex
  • UnsignedLahNumber
  • YoungDiagram
  • ZeckendorfRepresentation
Combinatorics
Some of the functions here do not belong in combinatorics. I am including them here anyways.
Indexing
PermutationIndex
— Give the lexicographic index of a permutation
PermutationFromIndex
— Give the permutation corresponding to a given length and lexicographic index
SubsetIndex
— Give the index of a subset
SubsetFromIndex
— Get the subset with the given index and length
TupleIndex
— Compute the index of a given tuple of non-negative integers
TupleFromIndex
— Return the tuple corresponding to a given index
OrderedTupleIndex
— Give the index of an ordered tuple
OrderedTupleFromIndex
— Get the ordered tuple with the given index and length
LehmerCodeFromPermutation
— Create the Lehmer code corresponding to a given permutation
Partitions
ConjugatePartition
— Switch the rows and columns of a partition
DominatingIntegerPartitionQ
— Determine if one integer partition dominates another
IntegerPartitionQ
— Check whether the argument is a weakly decreasing list of positive integers
PartitionCrank
— Get Dyson's crank of an integer partition
PartitionFromFrobeniusSymbol
— Construct the corresponding partition, given a Frobenius symbol
PartitionRank
— The largest part minus the number of parts of a partition
FrobeniusSymbolFromPartition
— Get a pair of lists representing the Ferrers diagram of a partition
FerrersDiagram
— Display the Ferrers diagram of a partition with dots
DurfeeSquare
— get the dimensions of the Durfee square of a partition
SelfConjugatePartitionQ
— test if a partition is a self-conjugate partition
Notation for partitions
PartitionPlusNotation
— write a partition with plus signs, like 2+2+1
FromPartitionPlusNotation
— go from a partition written with plus signs to a list of integers
PartitionSuperscriptNotation
— write a partition with superscripts, like
1
1
2
2
for 2+2+1/{2,2,1}.
FromPartitionSuperscriptNotation
— go from a partition in superscript notation like
1
1
2
2
to 2+2+1.
Tableaux
TableauQ
— Determine if a list of values forms a Young tableau
TransposeTableau
— Transpose a Young tableau
PermutationToTableaux
— Get the two Young tableaux corresponding to a permutation
TableauxToPermutation
— Get a permutation corresponding to two Young tableaux
TableauToPoset
— Convert a Young tableau to a partially ordered set of coordinates
NumberOfTableaux
— Get a count of Young tableaux for a given size or shape
HookLengths
— Get the list of lists whose entries are the hook lengths of the entries of a Young tableau
StandardYoungTableaux
— Enumerate all standard Young tableaux of a given shape
RandomYoungTableau
— Generate a random Young tableau with a given shape
Multisets
CanonicalMultiset
— canonical form of a multiset
EnumerateMultisetPartialDerangements
— enumerate a multiset's partial derangements
Multichoose
— compute the multichoose operation
MultisetAssociation
— assign every element of a multiset a unique number, in effect turning a multiset into a set.
MultisetPartialDerangements
— list the partial derangements of a multiset one by one
Make a list of the elements one by one
OrderlessCombinations
— Generate all possible orderless lists of a given length with a given set of elements
OrderlessCombinationsOfUnmarkedElements
— Generate all possible orderless lists of a given length with a given set of unmarked indistinguishable plain unlabeled elements
Combinatorial Optimization and Existence
SelectPermutations
— Get permutations that satisfy a certain criterion
SelectSubsets
— Generate subsets that satisfy a certain criterion
SelectTuples
— Generate tuples that satisfy a certain criterion
Combinatorial Functions
CentralBinomialCoefficient
— compute the central binomial coefficient
EulerianCatalanNumber
— compute the Eulerian Catalan number
EulerianNumber
— Get the number of permutations with a given number of ascents
EulerianNumberOfTheSecondKind
— compute the Eulerian number of the second kind
NarayanaNumber
— compute the Narayana number
SecantNumber
— compute the secant number
S
k
, also referred to a zig number
SignedLahNumber
— compute the signed Lah number
L(n,k)
TangentNumber
— compute the tangent numbers, also referred to as zag numbers
UnsignedLahNumber
— compute the unsigned Lah number
L(n,k)
Encoding, Decoding, and Representation related
Fibbinary
— Get the fibbinary sequence
FibonacciEncode
— Fibonacci-digit encoding for a number
GrayCode
— Find the Gray code for an integer
HuffmanCodeWords
— Find optimal Huffman code words given a list of probabilities
HuffmanDecode
— Decode data specified by a Huffman encoding
HuffmanEncode
— Find a Huffman encoding for a string
InverseFibonacci
— Compute the inverse Fibonacci function
InverseGrayCode
— Find the integer corresponding to a given Gray code
ZeckendorfRepresentation
— Give the 0–1 list that indicates the unique nonconsecutive Fibonacci numbers that sum to the non-negative integer input
Permutation Functions
LehmerCodeFromPermutation
— Create the Lehmer code corresponding to a given permutation
NextPermutation
— Get the next permutation in lexicographic order
PermutationAscents
— Give the indices of a permutation where there is an immediate ascent
PermutationGraph
— Compute the permutation graph of a permutation
PermutationIndex
— Give the lexicographic index of a permutation
PermutationFromIndex
— Give the permutation corresponding to a given length and lexicographic index
PermutationMajorIndex
— Compute the major index of a permutation
PermutationToTableaux
— Get the two Young tableaux corresponding to a permutation
TableauxToPermutation
— Get a permutation corresponding to two Young tableaux
Permutation Inversion functions
FromInversionVector
— Construct the permutation list corresponding to the given inversion vector
InversionCount
— Count the number of pairs of out-of-order elements in a permutation
InversionVectorQ
— Check if a list is the inversion vector of a permutation written as a list
PermutationCountByInversions
— Get the number of permutations having a specified length and number of inversions
Permutation Runs and Ascents
DescendingSublists
— Split a list at its left-to-right maxima
PermutationAscents
— Give the indices of a permutation where there is an immediate ascent
MultisetStrictAscents
— Give the indices of a permutation of a multiset where there is an immediate ascent
MultisetStrictAscentElements
— Give a list of the elements that make up the ascents of a multiset
PermutationDescents
— Give the indices of a permutation where there is an immediate descent
MultisetStrictDescents
— Give the indices of a permutation of a multiset where there is an immediate descent
MultisetStrictDescentElements
— Give a list of the elements that make up the descents of a multiset
EulerianNumber
— Get the number of permutations with a given number of ascents
EulerianNumberOfTheSecondKind
— compute the Eulerian number of the second kind
Order Theory
DivisorHasseDiagram
— Generate a transitive reduction graph for the divisors of a positive integer
HasseDiagram
— Construct a Hasse diagram of a poset
PartialOrderGraphQ
— Test whether a graph is a partial order, that is, reflexive, antisymmetric and transitive
PosetQ
— Determine if a set of coordinates is partially ordered
TableauToPoset
— Convert a Young tableau to a partially ordered set of coordinates
ReflexiveGraphQ
— Test whether a graph is reflexive
TransitiveGraphQ
— Test whether the binary relation defined by edges of a graph is transitive
Factorial Functions
GaussFactorial
— compute the Gauss factorial
Phitorial
— compute the phitorial
Primorial
— compute the primorial
Recurrence Functions
LucasNumberU1
— compute the term of the Lucas sequence of the first kind
LucasNumberV2
— compute the term of the Lucas sequence of the second kind
Q Analogues
QExponential
— q-exponential
QMultinomial
— q-multinomial
Modular Number Theory
RationalNumberRepeatingDecimalPeriod
— find the period of a repeating decimal of a rational number
Alternating Permutations
SecantNumber
— compute the secant number
S
k
, also referred to a zig number
TangentNumber
— compute the tangent numbers, also referred to as zag numbers
TechNotes
▪
Combinatorics
RelatedGuides
▪
Functions I Understand in combinatorics
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com