Twelvefold way
Functions from N to X, up to a permutation of N

This case is equivalent to counting multisets with n elements from X (also called n - multicombinations). The reason is that for each element of X it is determined how many elements of N are mapped to it by f, while two functions that give the same such "multiplicities" to each element of X can always be transformed into another by a permutation of N. The formula counting all functions N → X is not useful here, because the number of them grouped together by permutations of N varies from one function to another. Rather, as explained under combinations, the number of n -multicombinations from a set with x elements can be seen to be the same as the number of n -combinations from a set with x + n − 1 elements. This reduces the problem to another one in the twelvefold way, and gives as result

Example:

X = { a, b, c }, N = { 1, 2 }, then {\displaystyle X=\{a,b,c\},N=\{1,2\}{\text{, then }}}

| { { a, a }, { a, b }, { a, c }, { b, b }, { b, c }, { c, c } } | = 3 2 ¯ 2 ! = 4 × 3 2 = 6 {\displaystyle \left\vert \{\{a,a\},\{a,b\},\{a,c\},\{b,b\},\{b,c\},\{c,c\}\}\right\vert ={\frac {3^{\overline {2}}}{2!}}={\frac {4\times 3}{2}}=6}
change_case:english_lowercase