Skip to content

Main content

Combinatorics: Lattice Path Endpoint Parity Check Tool

Check necessary and sufficient reachability for unrestricted four-neighbor square-lattice walks of a supplied length, not obstacle-aware pathfinding.

Loading tool…

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

  1. Enter startX, startY, endX, endY, steps. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
startXStart XRequired. Safe integer.
startYStart YRequired. Safe integer.
endXEnd XRequired. Safe integer.
endYEnd YRequired. Safe integer.
stepsStepsRequired. Safe integer.
Output fieldInterpretationReturned shape
resultReturned calculated value or nested object under the stated output convention.Required. Object.
result.parityCompatibleParity CompatibleCalculated result member: boolean.
result.reachableReachableCalculated result member: boolean.
result.manhattanDistanceManhattan DistanceCalculated result member: number.
json
{
  "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

  1. Calculation and input contract: combinatorics/lattice-path-endpoint-parity-check — tool.io

Similar or alternative tools