Hello

I need to count the number of ways,from start to end,without passing through the red spots.

you can move one step at a time:forward or to the right.

thanks.

Printable View

- Dec 5th 2006, 09:11 AMparallelCounting pathways
Hello

I need to count the number of ways,from start to end,without passing through the red spots.

you can move one step at a time:forward or to the right.

thanks. - Dec 5th 2006, 12:05 PMQuick
There are 49 paths.

The numbers in each box of the excel spreadsheet in the attachments shows how many paths can go through each point. Do you see how it was made? Or would you like an explanation. - Dec 5th 2006, 12:17 PMparallel
I would appreciate it if you could give me an explanation,in a combinatorial way i.e n choose k

thanks - Dec 5th 2006, 12:21 PMQuick
- Dec 5th 2006, 12:29 PMTriKri
Say is the number of paths to a specific square. For the bottom left square, and , and for the upper right square, and . Then

You can get to a square from only two other squares. The sum of the number of paths to dose squares is the number of paths to that square.

Then, if you turn it all clockwise, you will se it's starting to look like Pascal's triangle. And if it hadn't been for those two blocked squares would have been . Cause has almost the same properties as has in this case. You do know that ? Let's say that if (x, y) is outside the triangle, . I don't know if I'm the best to explain why, but in this case

.

Since and in the top right square,

Now i got it right, I forgot to use zero indexing. - Dec 5th 2006, 12:46 PMparallel
i'm sorry but it's getting too complicated for me,we just started with this.

the first question was to solve this without any limitation on the squares.

so the way I did it was like that:

I can go RRRRRUUUUU from the start to the end.

(R-right, U-up)

so now I just computed the number of ways to arrange the letters.

could you try and explain it to me,with this kind of thinking(sorry for the trouble) - Dec 5th 2006, 12:53 PMTriKri
Take a look at Quick's excel diagram. What it does is that it simulates the number of paths by calculating the number square by square. If you wan't to use a mathematical non-iterating formula, you will have to use the combination function as I just did in my last post.

- Dec 5th 2006, 01:12 PMTriKri
I will have to get back on this one. I don't seem to get the formula right. :(

- Dec 5th 2006, 01:17 PMparallel
I dont blame ya :)

- Dec 5th 2006, 01:39 PMThePerfectHacker
I believe this is a graph theory related question (but because I am barely familar with it I cannot help you).

Basically you want to find all the possible**paths**(that is how Graph theorist call them). And not**walks**(going over the same edge).

So you set up a graph with 25 vertices. And you draw an edge between any two which you are allowed to move. (That means the pink dots are isolated from the rest of the graph). And there is a special techinque of how to solve this problem.*)

*)One way is the adjancey matrix but it gets huge.

**)Another way, there are certain algorithms related to graphs that enable to find the solution. (Again not familar with them). - Dec 5th 2006, 02:53 PMtopsquark
I hate to be a pain, but there are an infinite number of paths. The problem doesn't specify a maximum path length, nor that you can't, for example, take a backward step. I'm assuming either one or both of the two previous thoughts are correct, but the problem statement should have a mention of some kind of limitation of this kind.

-Dan - Dec 5th 2006, 02:58 PMTriKri
- Dec 5th 2006, 03:03 PMtopsquark
- Dec 5th 2006, 03:07 PMPlato
There are 70 ways to arrange 4-R’s & 4-U’s. That is the total number of paths from start to finish without regard to the forbidden squares.

There are 4 ways to go from start to the left most forbidden square and 4 ways to go from that square to finish. Thus, there are 16 ways to go from start to finish passing through the first forbidden square.

Now likewise, there are 5 ways to go from start to finish passing through the right most forbidden square.

Now note that 70-(16+5)=49. That take the forbidden paths from the total. - Dec 5th 2006, 03:42 PMTriKri