Skip to content

Arrangements ​

Ordered selections of kk distinct elements from {1,…,n}\{1, …, n\} — the kk-permutations of nn.

Arrangements(n, k)Ordered selections of kk distinct elements from {1,…,n}\{1, …, n\} — the kk-permutations of nn
Typed signatures
TypePackageApplies
(integer<0..>, integer<0..>) -> indexed_collection<arrangement>combinatoricsalways

Domain: Collections

Details
  • Count is the falling factorial nk‾=n!/(n−k)!n^{\underline{k}} = n!/(n-k)!.
  • Each element is a length-kk one-line word with distinct entries from {1,…,n}\{1, …, n\}.

Examples

1 more kept as data, checked against the oracles
Basic #

Count(Arrangements(4,2))=12Count(Arrangements(4, 2)) = 12

live ↗
InCount(Arrangements(4,2))\mathrm{Count}(\mathrm{Arrangements}(4, 2))Out1212

The first element in enumeration order

live ↗
InArrangements(4,2)[1]\mathrm{Arrangements}(4, 2)[1]OutArrangement⁡([1,2]){\operatorname{Arrangement}}([1, 2])
About
Examples3
CrosswalkOEIS ×2Wolfram LanguageSageMathSymPymathlib4

See also: SymmetricGroup, Subsets, Binomial