This case produces M-Tuples of N items. That is, all length M vectors with all possibilities of N items in each position, N*M rows all together.
- M labeled balls (1), N labeled boxes (1), any # balls per box (1)
- Sensitive to ⎕IO
- Counted result is an integer scalar
- Generated result is an integer matrix.
The count for this function is NM (↔ N*M).
For example:
If we have 2 labeled balls (❶❷) and 3 labeled boxes (123) with any # of balls per box, there are 9 (↔ 3*2) ways to meet these criteria:
The diagram above corresponds to
110 1‼2 3
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
⍝ M-tuples of N items
⍝ Labeled balls & boxes, any # Balls per Box
111 0‼3 2
8
111 1‼3 2
1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
2 2 2