Combination
A combination is a selection of elements in which the order of selection does not matter.
Statistics Every Programmer Needs
A combination is a selection of items in which order does not matter.
- How it is used
- Uses order-independent selection to structure counting and probability calculations.
- How deep it goes
- Explains order, replacement conditions, formulas, Pascal’s triangle, and Python implementations through worked small examples.
- Examples
- Uses a basketball lineup, Pascal’s triangle, and Python calculations with n = 5 and r = 3.
- What you can do after
- Apply it via Python’s math module to count order-independent selections with or without replacement.
Read how Statistics Every Programmer Needs explains combination →
Fabulous Adventures in Data Structures and Algorithms
A combination is a subsequence or subset selected from a sequence without changing the original element order.
- How it is used
- Uses combinations to generate cases where sequence items are skipped and to select items from arbitrary lists through their indices.
- How deep it goes
- Develops mutable and recursive enumeration, counting identities, an iterative Choose implementation, and direct retrieval by position.
- Examples
- Works through ABCDE with k = 3, selecting foods by index, and advancing the four-index combination 1245 to 0345.
- What you can do after
- Build it from scratch: enumerate combinations, count them with Choose, or retrieve one directly by its position.
Read how Fabulous Adventures in Data Structures and Algorithms explains combination →
Statistics Slam Dunk
A combination is a selection of objects or values in which the order of the selected elements does not matter.
- How it is used
- Frames combinations as a classification step before counting possibilities or analyzing NBA scheduling data.
- How deep it goes
- Defines order-independent selection and contrasts it with permutations, but does not develop a combination-counting formula.
- Examples
- Uses a Warriors starting lineup, locker numbers, division standings, and NBA teams’ prior days off.
- What you can do after
- Evaluate whether a counting problem requires combinations or permutations before computing it in R.
Timeless Algorithms, The Foundational Ideas
A combination is a selection or grouping in which order does not matter.
- How it is used
- Uses order-insensitive counting to distinguish grouped outcomes from particular sequences and to count coin-change solutions.
- How deep it goes
- Defines the distinction, gives a coin-counting recurrence, and works through tabulation and verification for amount 12.
- Examples
- Uses mixed heads-and-tails sequences and coin denominations {1, 5, 10} to illustrate order-insensitive counting.
- What you can do after
- Apply a dynamic-programming recurrence to count coin combinations and verify the count by enumerating cases.
Read how Timeless Algorithms, The Foundational Ideas explains combination →
Also covered in
- Optimization Algorithms: AI techniques for design, planning, and control problems
- Learn C++ by Example
What to know first
- integerAn integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part.
Related concepts
- permutationcontrasts with · A permutation is a bijective rearrangement of the elements of a finite set, equivalently an ordering in which each element appears exactly once.
- binary stringalternative to · A binary string is a finite, ordered sequence of binary digits, each having the value zero or one.
- binomial coefficientequivalent to · A binomial coefficient is the number of ways to select a specified number of elements from a finite set, without regard to order.
- combination with replacementincludes · A combination with replacement is a selection in which order does not matter and selected items may be selected again.
- combination without replacementincludes · A combination without replacement is a selection in which order does not matter and selected items cannot be selected again.
Questions about combination
What is combination?
A combination is a selection of elements in which the order of selection does not matter.
Which Manning books explain combination?
Statistics Every Programmer Needs, Fabulous Adventures in Data Structures and Algorithms, Statistics Slam Dunk and Timeless Algorithms, The Foundational Ideas.
What should I know before learning combination?
Manning books that teach combination usually introduce integer first.
What is the difference between combination and permutation?
A combination is a selection of elements in which the order of selection does not matter. A permutation is a bijective rearrangement of the elements of a finite set, equivalently an ordering in which each element appears exactly once.
What kinds of combination are there?
Kinds of combination include combination with replacement and combination without replacement.
What is combination a kind of?
Combination is a kind of subsequence. A subsequence is a sequence formed by selecting elements from another sequence while preserving their original relative order, without requiring adjacency.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



