TopologicallyConnectedComponents
The topologically connected components of the arc diagram: blocks joined when an arc of one crosses an arc of the other.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000924via PerfectMatching✓St000925via SetPartition✓TopologicallyConnectedComponents(partition)The topologically connected components of the arc diagram: blocks joined when an arc of one crosses an arc of the other.Typed signatures
| Type | Package | Applies |
|---|---|---|
(set_partition) -> number | combinatorics | always |
Details
- Defined over
SetPartitionas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
SetPartitionand 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 St000925. A singleton, which has no arc, is a component of its own.
Definition
Epsil, as the implementation runs it.
on SetPartition, over _x
Length(_x) if Length(Flatten(Map(Function(Most(b), b), _x))) < 1 else Apply(
(owner: list<integer>) => Apply(
(arcOwner: list<integer>) => Apply(
(crossing: list<list<integer>>) => Apply(
(labels: list<integer>) => Count(Filter(Range(1, Length(_x), 1), Function(labels[c] == c, c))),
Apply((start: list<integer>) => Fold((a: list<integer>, b) => Apply(
(pass: list<integer>) => pass,
Apply(
(reach: list<integer>) => Map(Function(Min(Map(
Function(a[c] if i == 0 else reach[i] if arcOwner[i] == c else Length(_x) + 1, i),
Range(0, Length(Flatten(Map(Function(Most(b), b), _x))), 1),
)), c), Range(1, Length(_x), 1)),
Map(Function(Min(Map(
Function(Length(_x) + 1 if j == 0 else a[arcOwner[j]] if crossing[i][j] == 1 else Length(_x) + 1, j),
Range(0, Length(Flatten(Map(Function(Most(b), b), _x))), 1),
)), i), Range(1, Length(Flatten(Map(Function(Most(b), b), _x))), 1)),
),
), start, Range(1, Length(_x), 1)), Range(1, Length(_x), 1)),
),
Map(Function(Map(
Function(1 if [Max(
Flatten(Map(Function(Most(b), b), _x))[i],
Flatten(Map(Function(Most(b), b), _x))[j],
) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) &&
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) <
(Flatten(Map(Function(Rest(b), b), _x))[j] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[i]), Max(
Flatten(Map(Function(Most(b), b), _x))[i],
Flatten(Map(Function(Most(b), b), _x))[j],
) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) &&
(Flatten(Map(Function(Rest(b), b), _x))[j] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[i]) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j])][1] else 0, j),
Range(1, Length(Flatten(Map(Function(Most(b), b), _x))), 1),
), i), Range(1, Length(Flatten(Map(Function(Most(b), b), _x))), 1)),
),
Map(
Function(owner[Flatten(Map(Function(Most(b), b), _x))[i]], i),
Range(1, Length(Flatten(Map(Function(Most(b), b), _x))), 1),
),
),
Map(
Function(Min(Filter(
Range(1, Length(_x), 1),
Function(Contains(_x[k], e), k),
)), e),
Range(
1,
Sum(Map(Function(Length(b), b), _x)),
1,
),
),
)Examples
Properties #
About
| Examples | 5 |
|---|---|
| Crosswalk | FindStat ×2 |