Skip to content

Main content

Edge Contraction Selfloop Count Delta Tool

Count local loops after merging endpoints; explicitly select whether contracted inter-endpoint edges survive as loops.

Loading tool…

Description

Add edgesBetween to loop count only when keepContractedEdges, otherwise preserve existingLoops.

Connected components partition a graph by reachability. Removing bridges creates an edge-connectivity partition; this differs from vertex-biconnected decomposition, which concerns articulation vertices and has different blocks.

Add edgesBetween to loop count only when keepContractedEdges, otherwise preserve existingLoops.

When to use this tool

Use Edge Contraction Selfloop Count Delta when you need a component or bridge-related count under the specified undirected graph model.

How to use the tool and how it works

  1. Enter edgesBetween, existingLoops, keepContractedEdges. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read loops, delta. Use the output convention below.

Require positive integer edgesBetween and nonnegative existingLoops. Add edgesBetween to loop count only when keepContractedEdges, otherwise preserve existingLoops.1

Input fieldMeaning and unitsAccepted input
edgesBetweenEdges BetweenRequired. Safe integer; minimum 1.
existingLoopsExisting LoopsRequired. Safe integer; minimum 0.
keepContractedEdgesKeep Contracted EdgesRequired. Boolean.
Output fieldInterpretationReturned shape
loopsLoopsRequired. Safe integer.
deltaDeltaRequired. Safe integer.
json
{
  "input": {
    "edgesBetween": 3,
    "existingLoops": 2,
    "keepContractedEdges": true
  },
  "output": {
    "loops": 5,
    "delta": 3
  }
}

Limitations and assumptions

  • This is a supplied contraction convention; the selected vertices, actual edge multiplicity, other loop creation, graph simplification, and mutation are not evaluated.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Traverse the supplied graph for an independently derived partition. Use articulation-point and vertex-biconnected algorithms when vertex removal, rather than edge removal, is the relevant failure model.

References

  1. Calculation and input contract: graph/edge-contraction-selfloop-count-delta — tool.io

Similar or alternative tools