liveBook · Manning

Permutation

A permutation is a bijective rearrangement of the elements of a finite set, equivalently an ordering in which each element appears exactly once.

How 9 Manning books explain it

Statistics Every Programmer Needs

A permutation without replacement is an ordered arrangement in which each item may be selected at most once.

How it is used
Counts possible outcomes when a probability problem selects items in a meaningful order.
How deep it goes
Defines order and replacement, derives the factorial count through shrinking choices, and computes an example in Python.
Examples
Uses briefcase-lock sequences and a five-item, three-position calculation yielding 60 arrangements.
What you can do after
Apply it via Python’s math.perm to count ordered selections without replacement and check whether repetition is allowed.

Read how Statistics Every Programmer Needs explains permutation →

Statistics Slam Dunk

A permutation without replacement is an ordered arrangement in which a selected element cannot be selected again.

How it is used
Frames NBA rest analysis by determining whether prior-days-off groupings require permutations or combinations.
How deep it goes
Defines ordering and replacement, distinguishes formulas conceptually, and computes or prints arrangements without developing formal derivations.
Examples
Uses NBA lineups, standings, lottery selections, coach play calls, and home-away rest pairings.
What you can do after
Apply it via gtools to count and print ordered arrangements for an NBA data analysis.

Read how Statistics Slam Dunk explains permutation →

Optimization Algorithms: AI techniques for design, planning, and control problems

A permutation is an ordered arrangement of elements in which each element appears exactly once.

How it is used
Frames permutations as discrete decision structures for combinatorial optimization and route-ordering problems.
How deep it goes
Defines order and repetition, then works through permutation encoding, tour-cost calculation, and optimizer parameters.
Examples
Uses fitness-plan selections, city tours, distance matrices, Python functions, and a twenty-city PSO route.
What you can do after
Apply it via PySwarms by encoding candidate orders, evaluating tour distances, and converting the best position into a route.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains permutation →

Fabulous Adventures in Data Structures and Algorithms

A permutation is an ordering of all elements of a sequence or set.

How it is used
Uses reorderings to generate test cases, shuffle sequences, and study finite combinatorial structures.
How deep it goes
Defines permutations, derives n! growth, compares generation strategies, and demonstrates direct application while deferring full algorithm details.
Examples
Uses integer sequences, operation-order test cases, card shuffling, and a generic animal-list reordering.
What you can do after
Apply via a C# extension method, generate test orderings, and choose an appropriate permutation-generation strategy.

Read how Fabulous Adventures in Data Structures and Algorithms explains permutation →

Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

A permutation is an ordering of the elements of a collection in which each element appears exactly once.

How it is used
Uses exhaustive orderings to evaluate candidate routes in the traveling salesman problem.
How deep it goes
Explains recursive swapping, base cases, in-place mutation, and backtracking, without developing permutation theory or performance analysis.
Examples
Demonstrates permutations with three letters, Vermont cities, distance tables, and closed traveling-salesman routes.
What you can do after
Build all permutations in Swift and apply them to exhaustive route evaluation or constrained word generation.

Read how Classic Computer Science Problems in Swift: Essential techniques for practicing programmers explains permutation →

Advanced Algorithms and Data Structures

A permutation is an arrangement of the elements of a sequence in which each element occurs exactly once.

How it is used
Models candidate routes for traveling-salesperson optimization and encodes solutions for simulated annealing and genetic algorithms.
How deep it goes
Defines the representation, cost calculation, symmetry pruning, initialization, and transition operators, but not permutation theory beyond optimization.
Examples
Uses six-city and ten-vertex tours, explicit city sequences, cost landscapes, random initialization, swaps, and random-permutation transitions.
What you can do after
Build candidate TSP solutions, calculate closed-tour costs, prune equivalent arrangements, and select search transitions.

Read how Advanced Algorithms and Data Structures explains permutation →

Real-World Cryptography

A permutation is a reversible one-to-one mapping of a set of elements onto itself.

How it is used
Clarifies reversible mappings underlying SHA-3 and keyed block-cipher encryption.
How deep it goes
Defines one-to-one reversibility and connects it to SHA-3 and AES, but stops short of designing the underlying permutations.
Examples
Uses four shapes, all possible 8-bit strings, and 128-bit AES plaintext-ciphertext mappings.
What you can do after
Understand how reversible mappings support hashing and encryption constructions.

Read how Real-World Cryptography explains permutation →

Quantum Programming in Depth

A permutation is an arrangement containing each member of a finite set exactly once.

How it is used
Reduces the candidate space for a Grover-based N queens solver by excluding repeated column indices.
How deep it goes
Contrasts N^N with N!, quantifies the N = 4 improvement, and notes the harder state preparation without deriving its circuit.
Examples
Uses column-index encodings for N queens and compares the four-queen spaces of 256 unrestricted inputs and 24 permutations.
What you can do after
Evaluate/understand how permutation-based encodings reduce Grover iterations while complicating equal-superposition preparation.

Read how Quantum Programming in Depth explains permutation →

Get Programming: Learn to code with Python

A permutation is an arrangement of selected items in which order distinguishes the arrangement.

How it is used
Uses permutations to reason about differently ordered lists and possible arrangements of Scrabble tiles.
How deep it goes
Defines permutations with list examples and exercises, but stops short of implementing the permutation-checking function.
Examples
Uses integer lists with reordered and repeated values, plus Scrabble tiles whose letters could form valid words.
What you can do after
Apply the concept by checking whether two lists contain identical elements with identical counts despite different ordering.

Read how Get Programming: Learn to code with Python explains permutation →

Related concepts

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.