Description
Return nested for non-strict containment and proper only when nested and parentStart is strictly earlier.
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.
Return nested for non-strict containment and proper only when nested and parentStart is strictly earlier.
When to use this tool
Use Rooted Tree Preorder Parent Interval Check when you need a local rooted-tree count or bound from supplied structural facts.
How to use the tool and how it works
- Enter parentStart, parentEnd, childStart, childEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read nested, proper. Inspect nested, proper before interpreting the associated values.
Require nonnegative integer starts and strictly later ends for parent and child intervals. Return nested for non-strict containment and proper only when nested and parentStart is strictly earlier.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| parentStart | Parent Start | Required. Safe integer; minimum 0. |
| parentEnd | Parent End | Required. Safe integer. |
| childStart | Child Start | Required. Safe integer; minimum 0. |
| childEnd | Child End | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| nested | Nested | Required. Boolean. |
| proper | Proper | Required. Boolean. |
{
"input": {
"parentStart": 0,
"parentEnd": 10,
"childStart": 2,
"childEnd": 5
},
"output": {
"nested": true,
"proper": true
}
} Limitations and assumptions
- Intervals use the supplied traversal convention; equal terminal boundaries are allowed and no actual preorder traversal, parent edge, ancestry, or tree validity is checked.
- 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 Parent Edge Deficit
Return vertices-rootCount as expectedParentEdges and subtract parentEdges for deficit.
- Tree Root Depth Parent Step
Return zero for a root or parentDepth+1 otherwise.