Description
Check square-lattice endpoint reachability for an exact step count.
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.
Check square-lattice endpoint reachability for an exact step count.
When to use this tool
Use Combinatorics: Lattice Path Endpoint Parity Check when checking one supplied path, tree, matching or rook-placement condition.
How to use the tool and how it works
- Enter startX, startY, endX, endY, steps. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Check square-lattice endpoint reachability for an exact step count. Require bounded integer coordinates and nonnegative whole steps; Manhattan distance is abs(dx)+abs(dy), reachable requires distance <= steps and matching parity.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| startX | Start X | Required. Safe integer. |
| startY | Start Y | Required. Safe integer. |
| endX | End X | Required. Safe integer. |
| endY | End Y | Required. Safe integer. |
| steps | Steps | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned calculated value or nested object under the stated output convention. | Required. Object. |
| result.parityCompatible | Parity Compatible | Calculated result member: boolean. |
| result.reachable | Reachable | Calculated result member: boolean. |
| result.manhattanDistance | Manhattan Distance | Calculated result member: number. |
{
"input": {
"startX": 0,
"startY": 0,
"endX": 2,
"endY": 1,
"steps": 4
},
"output": {
"result": {
"parityCompatible": false,
"reachable": false,
"manhattanDistance": 3
}
}
} Limitations and assumptions
- This assumes unrestricted unit horizontal/vertical moves on an infinite lattice, without obstacles or path-count enumeration.
- Outputs are nested inside result. 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.
- Dyck Prefix Next Step Feasibility
Return next-step feasibility from supplied Dyck-prefix counts.