What are the possible routes from A to D in a 2D grid?

  • Thread starter Thread starter cronuscronus
  • Start date Start date
  • Tags Tags
    2d Grid
Click For Summary
SUMMARY

The discussion focuses on calculating the number of valid routes from point A to point D in a 2D grid, considering various constraints. The total routes from A to D are calculated using the combination formula, specifically 22 choose 13, resulting in 497,420 possible routes. The participants also explore routes that avoid point B, pass through both B and C, and pass through B while avoiding C. The correct calculations for these scenarios involve understanding the combinations of moves and applying the multiplication principle for routes through intermediate points.

PREREQUISITES
  • Understanding of combinatorial mathematics, specifically binomial coefficients.
  • Familiarity with grid-based pathfinding concepts.
  • Knowledge of the multiplication principle in counting routes.
  • Ability to visualize and analyze 2D grids and movements within them.
NEXT STEPS
  • Study the concept of binomial coefficients in depth, focusing on their applications in combinatorial problems.
  • Learn about grid pathfinding algorithms and their implementations in programming.
  • Explore advanced combinatorial techniques, such as the inclusion-exclusion principle for counting paths with constraints.
  • Practice solving similar grid-based route problems to reinforce understanding of the concepts discussed.
USEFUL FOR

Mathematicians, computer scientists, educators, and students interested in combinatorial mathematics and pathfinding algorithms in grid structures.

  • #31
Thanks for sticking with me.

So, A to D is 497420 options.
A to B is 35 options.
B to D is 10 down, 5 right. 15choose5 = 3003.

Now we want to know how many routes through B, so we can "avoid" that.

The routes through B is (35 * 3003). Which equals 105,105.

So, 497420-105105 = 392,315 possible routes from A to D while avoiding B.
 
Physics news on Phys.org
  • #32
cronuscronus said:
Thanks for sticking with me.

So, A to D is 497420 options.
A to B is 35 options.
B to D is 10 down, 5 right. 15choose5 = 3003.

Now we want to know how many routes through B, so we can "avoid" that.

The routes through B is (35 * 3003). Which equals 105,105.

So, 497420-105105 = 392,315 possible routes from A to D while avoiding B.

Ok. That's good. Now, using the concepts you have used so far, see if you can do (c) and (d). I won't be back to this thread until later today or maybe tomorrow.
 
  • #33
Thanks again for the help.

For c, we want to know how many routes pass through both B and C.
I think this is more straight forward. Can simply multiply our way through this.
A to B is 35.
For B to C, we have 5 down, and 2 right required to get to C. So, we can calculate 7choose2, which equals 21.
For C to D, we have 5 down, and 3 right required to get to D. So we can calculate 8choose3, which equals 56.

So, 35*21*56 = 41,160 routes going through B and C.

For d we want to know how many routes must go through B, and must avoid C.
Here are our steps to each point:
A to B = 35
B to C = 21
C to D = 56
A to C is 8 down, 6 across. 14choose8 = 3003 (interesting).
B to D is also 3003
I would compute 35*3003 - 21*3003 = 42,042 routes which must pass through B and avoid C.
 
  • #34
I think part d has an error.

We need to calculate (A to B * B to D) - (B to C * C to D), which equals
(35*3003) - (21*56)
105105 - 1176 = 103,929
 
  • #35
cronuscronus said:
Thanks again for the help.

For c, we want to know how many routes pass through both B and C.
I think this is more straight forward. Can simply multiply our way through this.
A to B is 35.
For B to C, we have 5 down, and 2 right required to get to C. So, we can calculate 7choose2, which equals 21.
For C to D, we have 5 down, and 3 right required to get to D. So we can calculate 8choose3, which equals 56.

So, 35*21*56 = 41,160 routes going through B and C.

Correct.
 
  • #36
cronuscronus said:
I think part d has an error.

We need to calculate (A to B * B to D) - (B to C * C to D), which equals
(35*3003) - (21*56)
105105 - 1176 = 103,929

That is ALMOST correct. Think about what the 35 should multiply.
 
  • Like
Likes   Reactions: 1 person
  • #37
It looks like we need to calculate (A to B * B to D) - (B to C * C to D * A to B)
so
(35*3003)-(21*56*35) = 63,945 routes for part d.
 
  • #38
cronuscronus said:
It looks like we need to calculate (A to B * B to D) - (B to C * C to D * A to B)
so
(35*3003)-(21*56*35) = 63,945 routes for part d.

Yes. It might have been better to express it as
(A to B)*(B to D - BtoCtoD)

I think you have it now and hopefully you understand it well enough that you could explain to others how to do it.
 
  • #39
I am going to explain to a friend tonight. If you're ever in San Diego I'll buy you a beer :)
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
1K
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
6
Views
2K
  • · Replies 46 ·
2
Replies
46
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
12
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
5K