Skip to content

Main content

Digraph In Out Degree Imbalance

Subtract explicit in-degree from out-degree and report local balance without asserting Eulerian connectivity.

Loading tool…

Description

Calculate a directed vertex's out-degree minus in-degree and report balance.

Graph records separate vertex/edge identities, direction, degree counts and weighted-entry conventions. A zero weight differs from no edge, and local degree balance or endpoint continuity does not establish a whole graph’s connectivity or a valid traversal. Parallel edges need an explicit occurrence convention.

Calculate a directed vertex's out-degree minus in-degree and report balance.

When to use this tool

Use Digraph In Out Degree Imbalance when checking the stated graph degree, walk, key or entry-presence convention.

How to use the tool and how it works

  1. Enter inDegree, outDegree. 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 outMinusIn, balanced. Inspect balanced before interpreting the associated values.

Require nonnegative whole incoming/outgoing degrees. Return outDegree-inDegree and balanced when they are equal.1

Input fieldMeaning and unitsAccepted input
inDegreeIn DegreeRequired. Safe integer; minimum 0.
outDegreeOut DegreeRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
outMinusInOut Minus InRequired. Safe integer.
balancedBalancedRequired. Boolean.
json
{
  "input": {
    "inDegree": 3,
    "outDegree": 5
  },
  "output": {
    "outMinusIn": 2,
    "balanced": false
  }
}

Limitations and assumptions

  • A local balanced vertex does not establish an Eulerian graph, global connectivity or a valid degree sequence.
  • 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

Use the complete graph and appropriate structural/traversal algorithms for realizability, connectivity, Eulerian properties and globally unique edge handling.

References

  1. Calculation and input contract: graph/digraph-in-out-degree-imbalance — tool.io

Similar or alternative tools