Description
Validate a nonempty degree list with each degree within 0 to n-1.
A graph has vertices, edges, and a convention for direction, loops, and repeated edges. A local condition such as an edge count or degree sum may be necessary for a structure without proving that the full graph has that structure.
Validate a nonempty degree list with each degree within 0 to n-1.
When to use this tool
Use Tree Degree Excess Check when you need one graph-record component or necessary structural check.
How to use the tool and how it works
- Enter degrees. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read degreeSum, requiredDegreeSum, residual, necessaryCondition. Inspect necessaryCondition before interpreting the associated values.
Validate a nonempty degree list with each degree within 0 to n-1. Compare its sum with 2(n-1), returning residual and necessaryCondition, additionally requiring positive degrees when n > 1.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| degrees | Degrees | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| degreeSum | Degree Sum | Required. Safe integer. |
| requiredDegreeSum | Required Degree Sum | Required. Safe integer. |
| residual | Residual | Required. Safe integer. |
| necessaryCondition | Necessary Condition | Required. Boolean. |
{
"input": {
"degrees": [
1,
3,
1,
1
]
},
"output": {
"degreeSum": 6,
"requiredDegreeSum": 6,
"residual": 0,
"necessaryCondition": true
}
} Limitations and assumptions
- This inspects a degree sequence, not actual edges; it does not verify that a supplied graph is connected, simple, or acyclic.
- 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.
Alternative or Complementary methods
Validate the complete graph, including connectivity and edge conventions, before drawing a structural conclusion.
References
Similar or alternative tools
- Path Edge Count From Vertex Count
Return vertexCount edges for closed traversal or max(0, vertexCount - 1) for open traversal.
- Set Inclusion Counterexample
Deduplicate subset and return its elements absent from superset as counterexamples.