Description
Return next-step feasibility from supplied Dyck-prefix counts.
Graph and lattice counts depend on the allowed moves, edges and geometric or incidence assumptions. A necessary count identity or local conflict test may hold even when no valid complete object with the requested structure has been supplied.
Return next-step feasibility from supplied Dyck-prefix counts.
When to use this tool
Use Dyck Prefix Next Step Feasibility when checking one supplied path, tree, matching or rook-placement condition.
How to use the tool and how it works
- Enter up, down, pairs. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read canUp, canDown, height. Inspect canUp, canDown before interpreting the associated values.
Return next-step feasibility from supplied Dyck-prefix counts. Require valid whole pairs, up in [0,pairs] and down in [0,up]; canUp means up < pairs, canDown means down < up, height = up-down.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| up | Up | Required. Safe integer; minimum 0. |
| down | Down | Required. Safe integer; minimum 0. |
| pairs | Pairs | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| canUp | Can Up | Required. Boolean. |
| canDown | Can Down | Required. Boolean. |
| height | Height | Required. Safe integer. |
{
"input": {
"up": 2,
"down": 1,
"pairs": 3
},
"output": {
"canUp": true,
"canDown": true,
"height": 1
}
} Limitations and assumptions
- Counts do not verify the actual order or prefix validity of any supplied word, because no word is provided.
- 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
Inspect or construct the complete graph/path and apply all relevant structural constraints for a full validity or counting result.
References
Similar or alternative tools
- Combinatorics: Dyck Word Up Down Balance
Check Dyck-word balance and prefix nonnegativity.
- Combinatorics: Lattice Path Endpoint Parity Check
Check square-lattice endpoint reachability for an exact step count.