Explore grid routes using formulas and dynamic counting. Test blocked cells, checkpoints, and exact coordinates. See totals instantly with charts, tables, and clean exports.
| Example | Grid | Start | End | Checkpoints | Blocked Points | Expected Interpretation |
|---|---|---|---|---|---|---|
| Basic shortest path | 4 × 4 | (0,0) | (4,4) | None | None | Uses direct combinatorics only. |
| Checkpoint route | 6 × 5 | (0,0) | (6,5) | (2,1), (4,3) | None | Multiplies segment path counts. |
| Blocked route | 8 × 6 | (0,0) | (8,6) | (2,1), (6,5) | (3,2), (4,2), (5,4) | Uses dynamic programming around blocked points. |
1) Basic shortest lattice paths
When movement is limited to right and down, total shortest paths from a start point to an end point are:
C(dx + dy, dx) = (dx + dy)! / (dx! × dy!)
Here, dx = end_x - start_x and dy = end_y - start_y.
2) Checkpoint paths
If every route must pass through checkpoints in valid forward order, the total count becomes the product of each segment count:
Total = Π C(dx_i + dy_i, dx_i)
3) Blocked points
When blocked coordinates exist, the calculator uses dynamic programming:
ways[x][y] = ways[x-1][y] + ways[x][y-1]
A blocked point contributes zero ways. This approach counts only valid shortest paths that avoid blocked coordinates.
x,y format.This calculator assumes shortest-path motion with only rightward and downward steps. It is ideal for combinatorics exercises, grid planning, routing demonstrations, and probability setup work.
It counts shortest paths on a rectangular coordinate grid. You can include blocked points and mandatory checkpoints, then compare unrestricted counts with valid route counts.
It allows only rightward and downward shortest moves. That matches the standard lattice path model used in combinatorics and dynamic programming examples.
Shortest right-and-down routes cannot move backward. A checkpoint placed behind a previous point would require reverse movement, so no valid shortest path would exist.
The combination formula works when there are no blocked points. It also works segment by segment when checkpoints exist but every segment remains unobstructed.
Dynamic programming efficiently counts valid shortest routes when blocked points are present. It builds counts cell by cell and avoids repeatedly recalculating subproblems.
It can handle many practical classroom and project examples. Extremely large grids may create huge counts or heavier memory usage, especially with blocked-point analysis.
Unrestricted paths ignore obstacles and checkpoints. Final paths reflect all active conditions, including mandatory checkpoints and blocked points, so they represent the actual valid route count.
The chart compares unrestricted paths, checkpoint-adjusted paths without blocks, and final valid paths after blocked points are applied. It gives a quick visual reduction summary.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.