Skip to content

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
TypePackageApplies
(integer<0..>, integer<0..>) -> indexed_collection<labeled_graph>combinatoricsalways

Domain: Combinatorics

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 0

unrank(_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 False

tables(_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").

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

Enumeration

About