Description
Subtract one from both degree and vertex count and mark parentBecomesLeaf when the new degree is exactly one.
A rooted tree organizes vertices by parent, children, and distance from a root. Root status changes local degree relationships, and height or leaf formulas assume the supplied structure really satisfies the tree model.
Subtract one from both degree and vertex count and mark parentBecomesLeaf when the new degree is exactly one.
When to use this tool
Use Tree Leaf Removal Degree Budget when you need a local rooted-tree count or bound from supplied structural facts.
How to use the tool and how it works
- Enter parentDegree, vertices. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read parentDegree, vertices, parentBecomesLeaf. Inspect parentBecomesLeaf before interpreting the associated values.
Require at least two vertices and parentDegree from one through vertices-1. Subtract one from both degree and vertex count and mark parentBecomesLeaf when the new degree is exactly one.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| parentDegree | Parent Degree | Required. Safe integer; minimum 1. |
| vertices | Vertices | Required. Safe integer; minimum 2. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| parentDegree | Parent Degree | Required. Safe integer. |
| vertices | Vertices | Required. Safe integer. |
| parentBecomesLeaf | Parent Becomes Leaf | Required. Boolean. |
{
"input": {
"parentDegree": 2,
"vertices": 5
},
"output": {
"parentDegree": 1,
"vertices": 4,
"parentBecomesLeaf": true
}
} Limitations and assumptions
- Under this flag convention a remaining singleton has degree zero and is not marked a leaf; actual leaf identity, tree validity, and pruning are not inspected or changed.
- 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 a verified tree to derive parent, depth, and leaf data directly. A formula using claimed degrees or depths cannot independently establish connectedness, acyclicity, or a valid root.
References
Similar or alternative tools
- Tree Root Nonroot Child Degree Budget
Return degree for a root or degree minus one as children.
- Tree Pruned Leaf Height Bound
Return max(0, height-1) as lowerBound and either that same value when allDeepestLeavesRemoved or originalHeight as upperBound.