Skip to content

ArcRepresentation ​

Each position linked to the next in its block, or to itself when last.

ArcRepresentation(SetPartition)Each position linked to the next in its block, or to itself when last.
Typed signatures
TypePackageApplies
(set_partition) -> endofunctioncombinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a SetPartition and returns a Endofunction — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • The statistics frontier calls this the arc representation: within each block, consecutive elements (b1,b2), (b2,b3), .... Encoding it as an endofunction rather than a bare list of pairs keeps it a typed carrier — Crossings, Nestings and CrossingNestingTotal (@enumeratio/statistics) read the arcs off this without needing a carrier of their own.

Examples

Basic #

the set partition {1,3}∣{2}∣{4}\{1,3\} \mid \{2\} \mid \{4\}

live ↗
InArcRepresentation(SetPartition⁡([[1,3],[2],[4]]))\mathrm{ArcRepresentation}({\operatorname{SetPartition}}([[1, 3], [2], [4]]))OutEndofunction⁡([3,2,3,4]){\operatorname{Endofunction}}([3, 2, 3, 4])
About
Examples1