NumberOfPermutationsByInversions[n, k] gives the number of permutations of length n with exactly k inversions. NumberOfPermutationsByInversions[n] gives a table of the number ...
NumberOfTableaux[p] uses the hook length formula to count the number of Young tableaux with shape defined by partition p.
OddGraph[n] returns the graph whose vertices are the size-(n - 1) subsets of a size-(2 nTraditionalForm\`\[Dash]1) set and whose edges connect pairs of vertices that ...
OrientGraph[g] assigns a direction to each edge of a bridgeless, undirected graph g, so that the graph is strongly connected.
OutDegree[g, n] returns the out-degree of vertex n in directed graph g. OutDegree[g] returns the sequence of out-degrees of the vertices in directed graph g.
PairGroup[g] returns the group induced on 2-sets by the permutation group g. PairGroup[g, Ordered] returns the group induced on ordered pairs with distinct elements by the ...
ParentsToPaths[l, i, j] takes a list of parents l and returns the path from i to j encoded in the parent list. ParentsToPaths[l, i] returns the paths from i to all vertices.
PartitionQ[p] yields True if p is an integer partition. PartitionQ[n, p] yields True if p is a partition of n.
PerfectQ[g] yields True if g is a perfect graph, meaning that for every induced subgraph of g the size of a largest clique equals the chromatic number.
PermutationWithCycle[n, {i, j, ...}] gives a size-n permutation in which {i, j, ...} is a cycle and all other elements are fixed points.