Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**naturewild****Member**- Registered: 2005-12-04
- Posts: 30

Find the total number of ways to go from A to B, if each way is the shortest route.

This is a rough sketch of 2 by 2 by 2 object.

I have to find the number of ways for x by x by x object and x by y by z object.

I tried doing it for 1 by 1 by 1 and 2 by 2 by 2 based on manual calcualting. However I cannot find a general formula for this.

I'm thinking x + y + z, but that's just a pure guess. I tried it on a paper, but it's too hard to show what I tried in this forum.

*Last edited by naturewild (2006-06-18 13:39:18)*

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,659

I imagine you have to stick to the walls, and can't just draw a line between A and B?

This is the "spider walkng" problem. So I can describe it, I will say A is at the top left of the near wall and the spider wants to travel to the bottom right of the far wall (B). I think (one of the equal) shortest distance is to travel along the near wall to a point half way down the right hand side, then along the right wall to B. Equivalently the spider could travel along the ceiling to a point half way along where the ceiling joins the right wall, and the third way is along the left wall, then the far wall.

The distance is √(1²+2²) × 2 = 4.47 units

If the path was diagonally down to the bottom corner then straight along the distance would be √(2²+2²) + 2 = 4.83

For odd-shaped "rooms", it gets a little harder, but I think the solution is to ignore the "3D" element, and look at it as a net. For example, plot point A and B on this Cube Net and it becomes more obvious.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**naturewild****Member**- Registered: 2005-12-04
- Posts: 30

Ahh... it seems I misinterpret the question wrongly, or I didnt word it correctly.

It was under my impression that they want to find the number of ways to reach A and B if you have to move along the lines. So for example, you can go RIGHT from A to the right most, DOWN, then UP.

Or UP, DOWN, RIGHT.

Hmm...

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

If you reduce it to one dimension, a line of length A units, then there is one combination to get across.

Simply A moves.

Then if you have two dimensions, a rectangle of size A by B units, then the usage of going either in the x or y directions is totally independent, so you can inject the B y-moves into the (A+1) positions whereever you would like. I don't have a formula for this yet.

Then after that, you go to 3-D, and inject the C z-moves into the (A+1+B) spots available to do so.

That's as far as I got, sorry I can't help more yet...

So for 3-D don't forget to do your injecting into all of the 2-D combinations simultaneously, so just multiply the

C z-moves injected into (A + 1 + B) spots by the answer to 2-D # of combinations.

And for 4-D, which is not asked for, you multiply your answer for 3-D by the 4-D side length injected into (A + 1 + B + C) spots.

If you are wondering where I get the A+1 from or the A+1+B from, draw three apples in a row and notice there are four spots to insert oranges: before and after the three apples, or in the two middle positions, or four spots.

*Last edited by John E. Franklin (2006-06-18 17:40:13)*

**igloo** **myrtilles** **fourmis**

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

Oh, I just found out the injection formula is a well known one under a different name.

So the number of ways for x,y,z 3-D is simply

Here is the link I learned it from:

http://mathforum.org/library/drmath/view/56180.html

*Last edited by John E. Franklin (2006-06-18 23:41:35)*

**igloo** **myrtilles** **fourmis**

Offline

Pages: **1**