Given integers n and r where r <= n, generate
all P(n, r) permutations (corresponding to selecting r out of n distinct objects without repetition)
all n^r permutations (corresponding to selecting r out of n distinct objects with repetition)
in which the order is relevant; and
all C(n, r) combinations (corresponding to selecting r out of n distinct objects without repetition)
all C(r+n-1, r) combinations (corresponding to selecting r out of n distinct objects with repetition)
in which the order is irrelevant.