A combination selects objects or values when the order of the selected elements does not matter. A Golden State starting lineup remains the same regardless of announcement order. section 9.4
Distinguish a combination from a permutation by asking whether arrangement changes the result:
- Treat a selection as a combination when rearranging its elements leaves the outcome unchanged, such as selecting five starting players. section 9.4
- Treat it as a permutation when order changes the outcome, such as final division standings or a locker combination. section 9.4 section 9.1
- Check replacement separately: repeated values are allowed in some ordered selections, while an NBA lottery cannot select the same team twice. section 9.4
NBA scheduling analysis
When comparing prior days off for home and away teams, order matters: two home-rest days and one away-rest day differs from the reverse. Those ordered pairs are permutations, not combinations, and repeated values are allowed when both teams have the same rest. section 9.4
n = 5
r = 2
permutationsCount = n^r
paste0("The permuation count equals: ", permutationsCount)
## [1] "The permuation count equals: 25"
R computes 25 ordered selections from five values taken two at a time; use this output as a contrast with order-independent combinations. section 9.4


