liveBook · Manning

Combination

A combination is a selection of elements in which the order of selection does not matter.

How 4 Manning books explain it

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.

Read how Statistics Slam Dunk explains combination →

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

What to know first

Related concepts

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.