Counting Shortest Paths in a Square Grid

AI Thread Summary
The discussion focuses on calculating the number of paths in a grid, specifically from the lower left corner to the upper right corner, while only allowing movements to the right or upward. The key point is that the number of shortest paths from point (0,0) to point (m,n) can be determined using the binomial coefficient formula, represented as (m+n) choose n. However, the challenge lies in summing all possible paths, including partial paths to various intersections on the grid. A solution for summing paths within a triangular area of the grid is mentioned, where the total can be calculated as 2^10 - 1, leveraging properties of Pascal's triangle. This highlights an efficient method for counting paths in a structured grid layout.
Bartholomew
Messages
527
Reaction score
0
Is there a concise, easily calculable way to count the sum of all the paths from the lower left corner of a square of integer size to the upper right corner where you only move up or right in steps of 1 unit, PLUS all the partial paths? i.e. if you have a city with roads in a 10x10 grid (100 intersections/corners) how many shortest paths are there from one corner of the grid to any other intersection or corner on the grid?
 
Physics news on Phys.org
Bartholomew said:
Is there a concise, easily calculable way to count the sum of all the paths from the lower left corner of a square of integer size to the upper right corner where you only move up or right in steps of 1 unit, PLUS all the partial paths? i.e. if you have a city with roads in a 10x10 grid (100 intersections/corners) how many shortest paths are there from one corner of the grid to any other intersection or corner on the grid?

Why stop there? There's an easy solution for any point on a grid like that.


To get to the point m,n from 0,0 there are (m+n) choose n paths.
[/color]
 
I know that. Adding them all up concisely is a harder problem.
 
It's easy to sum the paths in the triangle bounded by (and including) the line y = x + 10--that's 2^10 - 1 since each diagonal row of intersections/corners (with negative slope) in that triangle corresponds to a row of Pascal's triangle, so you get 2^0 + 2^1 + ... + 2^9 which is 1111111111 in binary.
 
Last edited:
Similar to the 2024 thread, here I start the 2025 thread. As always it is getting increasingly difficult to predict, so I will make a list based on other article predictions. You can also leave your prediction here. Here are the predictions of 2024 that did not make it: Peter Shor, David Deutsch and all the rest of the quantum computing community (various sources) Pablo Jarrillo Herrero, Allan McDonald and Rafi Bistritzer for magic angle in twisted graphene (various sources) Christoph...
Thread 'My experience as a hostage'
I believe it was the summer of 2001 that I made a trip to Peru for my work. I was a private contractor doing automation engineering and programming for various companies, including Frito Lay. Frito had purchased a snack food plant near Lima, Peru, and sent me down to oversee the upgrades to the systems and the startup. Peru was still suffering the ills of a recent civil war and I knew it was dicey, but the money was too good to pass up. It was a long trip to Lima; about 14 hours of airtime...
Back
Top