LabeledGraphsByEdges
A name from the enumeratio catalogue with no kernel of its own yet; this page carries its crosswalk only.
Graphs on [n] with exactly m edges — the (n,m) refinement of labeled_graphs.
LabeledGraphsByEdges(...)Graphs on [n] with exactly m edges — the (n,m) refinement of labeled_graphs.Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer<0..>, integer<0..>) -> indexed_collection<labeled_graph> | combinatorics | always |
Definition
Epsil, as the implementation runs it.
count(_n, _m)
Binomial(Binomial(_n, 2) if 0 <= 2 && 2 <= _n else 0, _m) if 0 <= _m && _m <=
(Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) else 0unrank(_n, _m, _r)
Apply(
(bd: list<integer>) => Map(Function(Apply(
(bu_k: integer) => Apply((bu_u: integer) => Apply(
(bu_v: integer) => [bu_v, bu_u] if False else [bu_u, bu_v],
bu_k -
((Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) -
(Binomial(_n - bu_u +
1, 2) if 0 <= 2 &&
2 <=
_n - bu_u +
1 else 0)) +
bu_u,
), _tables[bu_k]),
bd[bi + 1] + 1,
), bi), Range(1, _m, 1)),
Apply(
(bd_st_init: list<integer>) => Fold((bd_st: list<integer>, bd_i) => Apply(
(bd_st_next: list<integer>) => bd_st_next,
Apply((bd_left: integer) => Apply(
(bd_found: integer) => ReplaceAt(ReplaceAt(bd_st, 1, bd_left -
_tables[(Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) +
bd_found *
(Max(0, Min(_m, Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0)) +
1) +
bd_i +
1]), bd_i + 1, bd_found),
Fold(
Function(bd_c if _tables[(Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) +
bd_c *
(Max(0, Min(_m, Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0)) +
1) +
bd_i +
1] <=
bd_left else bd_best, bd_best, bd_c),
bd_i - 1,
Range(
bd_i - 1,
((Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) if bd_i == _m else bd_st[bd_i + 2]) -
1,
1,
),
),
), bd_st[1]),
), bd_st_init, Range(_m, 1, -1)),
Join([_r], Map(Function(0, bd_z), Range(1, _m, 1))),
),
)rank(_n, _m, _x)
Apply(
(bx: list<integer>) => Fold(Function(br + _tables[(Binomial(_n, 2) if 0 <=
2 &&
2 <=
_n else 0) +
(bx[bi] - 1) *
(Max(
0,
Min(
_m,
Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0,
),
) + 1) + bi + 1], br, bi), 0, Range(1, Length(_x), 1)),
Sort(Map(Function((Binomial(_n, 2) if 0 <= 2 && 2 <= _n else 0) -
(Binomial(_n - Min(_x[bj][1], _x[bj][2]) + 1, 2) if 0 <=
2 &&
2 <=
_n -
Min(_x[bj][1], _x[bj][2]) +
1 else 0) + (Max(_x[bj][1], _x[bj][2]) - Min(
_x[bj][1],
_x[bj][2],
)), bj), Range(
1,
Length(_x),
1,
))),
)valid(_n, _m, _x)
Fold(Function(ok_wb && 1 <= _x[wb][1] && _x[wb][1] <= _n && 1 <= _x[wb][2] &&
_x[wb][2] <= _n && _x[wb][1] != _x[wb][2], ok_wb, wb), True, Range(1, Length(_x), 1)) && Fold(
Function(ok_wj &&
Fold(
Function(ok_wi &&
(Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) -
(Binomial(_n -
Min(_x[wi][1], _x[wi][2]) +
1, 2) if 0 <= 2 &&
2 <=
_n -
Min(_x[wi][1], _x[wi][2]) +
1 else 0) +
(Max(_x[wi][1], _x[wi][2]) -
Min(_x[wi][1], _x[wi][2])) !=
(Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0) -
(Binomial(_n -
Min(_x[wj][1], _x[wj][2]) +
1, 2) if 0 <= 2 &&
2 <=
_n -
Min(_x[wj][1], _x[wj][2]) +
1 else 0) +
(Max(_x[wj][1], _x[wj][2]) -
Min(_x[wj][1], _x[wj][2])), ok_wi, wi),
True,
Range(1, wj - 1, 1),
), ok_wj, wj),
True,
Range(1, Length(_x), 1),
) if Length(_x) ==
_m &&
Fold(
Function(ok_wp &&
Length(_x[wp]) == 2, ok_wp, wp),
True,
Range(1, Length(_x), 1),
) else Falsetables(_n, _m)
Join(
Fold(Function(
Join(et, Map(Function(eu, ez), Range(1, _n - eu, 1))),
et,
eu,
), [], Range(1, _n - 1, 1)),
Fold(
Function(Join(
bp_t,
Fold(
Function(ReplaceAt(
bp_row,
bp_c + 1,
1 if bp_c == 0 else bp_t[(bp_s -
1) *
(Max(
0,
Min(_m, Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0),
) +
1) +
(bp_c -
1) +
1] +
bp_t[(bp_s -
1) *
(Max(
0,
Min(_m, Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0),
) +
1) +
bp_c +
1],
), bp_row, bp_c),
Map(
Function(0, bp_z),
Range(
0,
Max(
0,
Min(
_m,
Binomial(_n, 2) if 0 <= 2 &&
2 <=
_n else 0,
),
) + 1 - 1,
1,
),
),
Range(0, Max(
0,
Min(
_m,
Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0,
),
) + 1 - 1, 1),
),
), bp_t, bp_s),
Fold(Function(
ReplaceAt(bp_row, bp_c + 1, 1 if bp_c == 0 else 0),
bp_row,
bp_c,
), Map(
Function(0, bp_z),
Range(0, Max(
0,
Min(
_m,
Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0,
),
) + 1 - 1, 1),
), Range(0, Max(
0,
Min(
_m,
Binomial(_n, 2) if 0 <= 2 &&
2 <= _n else 0,
),
) + 1 - 1, 1)),
Range(1, Max(Binomial(_n, 2) if 0 <= 2 && 2 <= _n else 0, 1) - 1, 1),
),
)Statistics
On LabeledGraph, called as CombinatorialStat(x, "Name").
- AlbertsonIndexSt001351The sum over the edges of the difference of the degrees of its ends.
- BridgeCountSt001479The edges whose deletion leaves more components.
- ChromaticNumberSt000098The fewest colors for the vertices so that adjacent vertices differ.
- CliqueNumberSt000097The most vertices that are pairwise adjacent.
- ComplementComponentCountSt000286The connected components of the complement graph.
- ConnectedInducedSubgraphCountSt001441The nonempty sets of vertices that induce a connected subgraph.
- CutVertexCountSt000552The vertices whose deletion leaves more components.
- CyclomaticNumberSt001311The edges less the vertices plus the components: the independent cycles.
- DegreeTwoVertexCountSt000313The vertices with exactly two edges.
- DistanceFourPairCountSt000449The pairs of vertices at distance 4.
- DistanceThreePairCountSt000447The pairs of vertices at distance 3.
- DistanceTwoPairCountSt000448The pairs of vertices at distance 2.
- EvenDegreeVertexCountSt000309The vertices with an even number of edges.
- FirstZagrebIndexSt000465The sum of the squares of the degrees.
- ForgottenIndexSt000571The sum of the cubes of the degrees.
- FourCliqueCountSt001309The sets of four vertices that are pairwise adjacent.
- GraphComponentCountSt000287The connected components: the vertices that are the first of their component.
- GraphEdgeCountSt000081The edges of the graph.
- GraphLeafCountSt000312The vertices with exactly one edge.
- HosoyaIndexSt000468The sets of edges with no two sharing a vertex, the empty set included.
- IndependenceNumberSt000093The most vertices that are pairwise non-adjacent.
- IndependentSetCountSt000300The sets of vertices, the empty set included, with no two adjacent.
- InducedPathOnThreeVerticesCountSt001308The sets of three vertices that induce a path: exactly two of the three edges.
- IsolatedVertexCountSt000315The vertices with no edge.
- MatchingNumberSt000387The most edges with no two sharing a vertex.
- MaximalIndependentSetCountSt001304The independent sets of vertices that no vertex can be added to.
- MaximumDegreeSt000171The greatest number of edges at one vertex.
- MaximumDegreeVertexCountSt001368The vertices whose degree is the greatest.
- MaximumDistanceSt000259The greatest distance between two vertices: the diameter.
- MinimumDegreeSt000310The fewest edges at one vertex.
- MinimumEccentricitySt000260The least eccentricity of a vertex, the greatest distance from it to another vertex: the radius.
- OddDegreeVertexCountSt000311The vertices with an odd number of edges.
- OreDegreeSt000915The greatest sum of the degrees of the two ends of an edge.
- SecondZagrebIndexSt000361The sum over the edges of the product of the degrees of its ends.
- TotalIrregularitySt001522The sum over the unordered pairs of vertices of the difference of their degrees.
- TriangleCountSt000095The triples of vertices that are pairwise adjacent.
- TriangleVertexCountSt001995The vertices on a triangle.
- VertexCoverNumberSt000362The fewest vertices that meet every edge: the vertices less the independence number.
- WienerIndexSt000265The sum of the distances over the pairs of vertices that are joined by a path.
Maps
Into and out of LabeledGraph, called as CombinatorialMap(x, "Name"). Properties are the laws we state and what FindStat records.
28 more in FindStat, not implemented here
- Mp00011BinaryTree → LabeledGraphGraded mapto graph
- Mp00037LabeledGraph → IntegerPartitionSurjectionGraded mapto partition of connected components
- Mp00046OrderedTree → LabeledGraphGraded mapto graph
- Mp00074Posets → LabeledGraphGraded mapto graph
- Mp00111LabeledGraph → LabeledGraphBijectionGraded mapInvolutioncomplement
- Mp00117LabeledGraph → LabeledGraphIdempotentGraded mapOre closure
- Mp00147LabeledGraph → LabeledGraphGraded mapsquare
- Mp00152LabeledGraph → IntegerCompositionSurjectionGraded mapLaplacian multiplicities
- Mp00154LabeledGraph → LabeledGraphIdempotentcore
- Mp00156LabeledGraph → LabeledGraphline graph
- Mp00157LabeledGraph → LabeledGraphGraded mapInvolutionconnected complement
- Mp00160Permutation → LabeledGraphGraded mapgraph of inversions
- Mp00184IntegerComposition → LabeledGraphInjectionGraded mapto threshold graph
- Mp00198Posets → LabeledGraphGraded mapincomparability graph
- Mp00203LabeledGraph → LabeledGraphInjectionGraded mapcone
- Mp00243LabeledGraph → Posetsweak duplicate order
- Mp00247LabeledGraph → LabeledGraphIdempotentde-duplicate
- Mp00250LabeledGraph → LabeledGraphclique graph
- Mp00251LabeledGraph → IntegerPartitionclique sizes
- Mp00259LabeledGraph → LabeledGraphInjectionGraded mapvertex addition
- Mp00264LabeledGraph → LabeledGraphIdempotentdelete endpoints
- Mp00266LabeledGraph → Latticesconnected vertex partitions
- Mp00274LabeledGraph → LabeledGraphblock-cut tree
- Mp00275LabeledGraph → IntegerPartitionSurjectionto edge-partition of connected components
- Mp00276LabeledGraph → IntegerPartitionto edge-partition of biconnected components
- Mp00318LabeledGraph → LabeledGraphInvolutiondual on components
- Mp00324LabeledGraph → IntegerCompositionGraded mapchromatic difference sequence
- Mp00335Lattices → LabeledGraphzero-divisor graph