Grid how many ways




















Combinations Again, we both responded. First, Doctor Anthony: A. Just to supplement Dr. I got the same answer. Incidentally, the method equivalent to Dr. Anthony's calculations give these same numbers without actually counting. Obviously you have to be pretty careful! The addends should look familiar! A bigger bottleneck: summing combinations A similar question came from Jeremy, later in Counting Paths With Factorials I want to solve a problem using factorials instead of labelling using Pascal's Triangle.

The question: How many possible ways are there to get from point A to point B. I want to solve it with factorials, i. I think I am stuck with splitting the figures up because if you do so, there will be too many squares that share a side.

I've been told that it is possible to solve it using factorials. It can be solved with repeated use of the concept of 'n choose r', which involves factorials I first verified your answer by using the old Pascal's triangle method. Then I tried several different ways to come up with that same answer; most of these ways involved starting with the total number of ways to make the trip if the missing corner squares were NOT missing C 12,5 and counting the number of paths that can't be used because they ARE missing.

All of these approaches proved too awkward. He ends up using a bottleneck method: Then I finally hit upon a relatively simple solution using C n,r. How many different paths can it take to point B? I'm not sure how to solve this problem without explicitly counting all the routes. I answered, referring to the long discussion above: Hi, Anuj.

You should choose the way that exercises whichever kind of skill you are meant to be learning! The other involves nothing more than a quick way to count. The second example is particularly like yours. Now, you seem to be suggesting a third way , starting from a larger rectangle and subtracting , rather than adding and multiplying smaller sets of paths. So in your example if you are traversing squares then there are 5 right steps and 1 down step so:.

If you panic during the test, consider just drawing it as a Pascal's triangle. So we can say that we have to take total 8 numbers of step. You can check it by your own that we must take 8 steps to reach at Y starting from X poit. And now we can make our main observation on this problem So what is it? See, you have to take total of 8 steps and all of them are the combination of R and D's ok?

And we just logically made a connection between these two problems and it is clear that if we can calculate the combination of 2 PLACES for D's OR 6 R's from total 8 steps it will be enough!! So, the answer is : 8C2 or 8C6 note that both are same!! Check this handcrafted portable network graphic :.

Next, note that a different ordering of these steps will always result in a different path. Then, the question simply becomes how many ways there are to arrange 6 "right steps" and 2 "down steps" from first to last. As,from x to y,there are 2 downward steps and 6 horizontal,rightward steps, so,going by the general formula. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from point A to point B using the shortest possible path.

Note: A and B point are fixed i. Attention reader! In the above image, the path shown in the red and light green colour are the two possible paths to reach from point A to point B. Skip to content. Change Language. Related Articles. Viewed times. Parcly Taxel Add a comment. Active Oldest Votes. Parcly Taxel Parcly Taxel Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.



0コメント

  • 1000 / 1000