Skip to content

NestingNumber ​

The largest number of arcs that mutually nest.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt001589via PerfectMatching✓St000254via SetPartition✓
NestingNumber(partition)The largest number of arcs that mutually nest.
Typed signatures
TypePackageApplies
(set_partition) -> numbercombinatoricsalways

Domain: Set partition statistics

Details
  • Defined over SetPartition as an expression in _x, evaluated by compute-engine — the definition IS the implementation.
  • Takes a SetPartition and 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.
  • FindStat's St000254.

Definition

Epsil, as the implementation runs it.

on SetPartition, over _x

0 if Length(Flatten(Map(Function(Most(b), b), _x))) < 1 else Apply(
                                                                    (arcLefts: list<integer>) => Apply(
                                                                                                        (arcRights: list<integer>) => Apply(
                                                                                                                                             (ends: list<integer>) => Max(Fold(
                                                                                                                                                                                Function(Map(
                                                                                                                                                                                              Function((1 +
                                                                                                                                                                                                        Max(Map(
                                                                                                                                                                                                                 Function(0 if u == 0 else a[u + 1] if ends[u] > 0 &&
                                                                                                                                                                                                                                                       ends[u] > ends[b] else 0, u),
                                                                                                                                                                                                                 Range(0, b - 1, 1),
                                                                                                                                                                                                               )) if ends[b] > 0 else 0) if w ==
                                                                                                                                                                                                                                   b + 1 else a[w], w),
                                                                                                                                                                                              Range(1, Sum(Map(Function(Length(b), b), _x)) +
                                                                                                                                                                                                       1, 1),
                                                                                                                                                                                            ), a, b),
                                                                                                                                                                                Map(
                                                                                                                                                                                     Function(0, w),
                                                                                                                                                                                     Range(1, Sum(Map(Function(Length(b), b), _x)) +
                                                                                                                                                                                              1, 1),
                                                                                                                                                                                   ),
                                                                                                                                                                                Range(1, Sum(Map(Function(Length(b), b), _x)), 1),
                                                                                                                                                                              )),
                                                                                                                                             Map(
                                                                                                                                                  Function(arcRights[IndexOf(arcLefts, e)] if Contains(arcLefts, e) else 0, e),
                                                                                                                                                  Range(1, Sum(Map(Function(Length(b), b), _x)), 1),
                                                                                                                                                ),
                                                                                                                                           ),
                                                                                                        Flatten(Map(Function(Rest(b), b), _x)),
                                                                                                      ),
                                                                    Flatten(Map(
                                                                                 Function(Most(b), b),
                                                                                 _x,
                                                                               )),
                                                                  )

Examples

Basic #

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

live ↗
InNestingNumber(SetPartition⁡([[1,3],[2]]))\mathrm{NestingNumber}({\operatorname{SetPartition}}([[1, 3], [2]]))Out11

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

live ↗
InNestingNumber(SetPartition⁡([[1],[2,4],[3]]))\mathrm{NestingNumber}({\operatorname{SetPartition}}([[1], [2, 4], [3]]))Out11
Properties #

FindStat's value for {{1,2}}

live ↗
InCombinatorialStat(SetPartition⁡([[1,2]]),NestingNumber)\mathrm{CombinatorialStat}({\operatorname{SetPartition}}([[1, 2]]), \text{NestingNumber})Out11

Known value · FindStat St000254

FindStat's value for {{1,2,3}}

live ↗
InCombinatorialStat(SetPartition⁡([[1,2,3]]),NestingNumber)\mathrm{CombinatorialStat}({\operatorname{SetPartition}}([[1, 2, 3]]), \text{NestingNumber})Out11

Known value · FindStat St000254

FindStat's value for {{1},{2}}

live ↗
InCombinatorialStat(SetPartition⁡([[1],[2]]),NestingNumber)\mathrm{CombinatorialStat}({\operatorname{SetPartition}}([[1], [2]]), \text{NestingNumber})Out00

Known value · FindStat St000254

About
Examples5
CrosswalkFindStat ×2