FixedPoints
The number of fixed points of : positions with .
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Fixed point (mathematics)MathWorldFixedPointWikidataQ217608Encyclopedia of Mathematicsfixed_pointnLabfixed pointBritannicascience/invariant-pointFindStatSt001903via ParkingFunction✓St000022via Permutation✓FixedPoints(p)the fixed-point count of a one-line permutation SageMath
enumeratio_stat("Permutation", p, "FixedPoints")Typed signatures
| Type | Package | Applies |
|---|---|---|
(permutation) -> integer | combinatorics | always |
Details
- A permutation with no fixed points is a derangement (see Derangements)
- Averaged over the count is exactly , independent of
- Defined over
Permutationas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
Permutationand nothing else — it reads values against their positions, or walks the orbits, so it needs the bijection. Applying it to a bare list is a type error, not a wrong answer.
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
0 if Length(_x) < 1 else Count(Filter(
Range(1, Length(_x)),
Function(_x[i] == i, i),
))Examples
Basic #
Properties #
About
| Examples | 10 |
|---|---|
| Checked against | SageMath 8 agreemathlib4 5 agree |
| Crosswalk | WikipediaMathWorldWikidataEncyclopedia of MathematicsnLabBritannicaFindStat ×2SageMath |
Implementation
mapped
sagepackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.tsA 1-based one-line permutation list, rebuilt as an Equiv.Perm (Fin n) (a list that is not a permutation prints "not a permutation"); fixed points counted over Fin n
See also: Derangements, CycleCount, SymmetricGroup