Skip to content

CrossingNumber ​

The largest number of arcs that mutually cross.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt001590via PerfectMatching✓St000253via SetPartition✓
CrossingNumber(partition)The largest number of arcs that mutually cross.
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 St000253. A set of arcs mutually crosses when all start before any ends; the longest such chain is found at each point between starts and ends.

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(Map(
                                                                                                                                                                               Function(Max(Fold(
                                                                                                                                                                                                  Function(Map(
                                                                                                                                                                                                                Function((1 +
                                                                                                                                                                                                                          Max(Map(Function(0 if u == 0 else a[u + 1] if u <= m &&
                                                                                                                                                                                                                                                                        ends[u] > m &&
                                                                                                                                                                                                                                                                        ends[u] < ends[b] else 0, u), Range(0, b - 1, 1))) if b <= m &&
                                                                                                                                                                                                                              ends[b] > m 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),
                                                                                                                                                                                                )), m),
                                                                                                                                                                               Range(1, Sum(Map(Function(Length(b), b), _x)) -
                                                                                                                                                                                        1, 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 ↗
InCrossingNumber(SetPartition⁡([[1,3],[2]]))\mathrm{CrossingNumber}({\operatorname{SetPartition}}([[1, 3], [2]]))Out11

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

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

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

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

Known value · FindStat St000253

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

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

Known value · FindStat St000253

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

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

Known value · FindStat St000253

About
Examples5
CrosswalkFindStat ×2