Combinatorica`
Combinatorica`
RandomComposition
RandomComposition[n,k]
constructs a random composition of integer into parts.
Details and Options
- To use RandomComposition, you first need to load the Combinatorica Package using Needs["Combinatorica`"].