217,022 views
20 votes
20 votes
Marvin the fly starts at $(0,0).$ Each step, Marvin moves one unit right or one unit up. He is trying to get to the point $(5,7)$. However, at $(4,4)$ there is a frog that will eat him if he goes through that point. In how many ways can Marvin reach $(5,7)$?

User ShivanKaul
by
2.7k points

2 Answers

26 votes
26 votes

Final answer:

Marvin the fly has 722 different paths to get from (0,0) to (5,7) without passing through (4,4), where a frog is present.

Step-by-step explanation:

The question asks how many different paths Marvin the fly can take to get from point (0,0) to (5,7) while avoiding point (4,4) where a frog is present. To solve this, we must calculate the total number of paths without any restrictions and then subtract the number of paths that go through the dangerous point (4,4).

The total unrestricted paths from (0,0) to (5,7) is a combination problem, which can be calculated using binomial coefficients. Marvin has to move 5 units right and 7 units up, making a total of 12 moves. The number of ways to choose which 5 of those moves are to the right is given by C(12,5), the combination of 12 items taken 5 at a time.

To find the number of paths going through (4,4), we calculate the number of ways to reach (4,4) from (0,0), which is C(8,4), and multiply by the number of ways to get from (4,4) to (5,7). The latter involves making one move right and three moves up, which can only happen in one way since Marvin must go right first to avoid the frog. Thus, there is 1 way to get from (4,4) to (5,7).

Now, we subtract the dangerous paths from the total:
total paths = C(12,5) - C(8,4) × 1

The value of C(12,5) is 792, and the value of C(8,4) is 70, so:
total paths without going through the frog = 792 - 70 = 722.

Therefore, Marvin has 722 different paths to get from (0,0) to (5,7) without passing through (4,4).

User Kingkupps
by
2.9k points
15 votes
15 votes

You need to know the number of routes that could get Marvin to 5,7, and the number that could get him to 4,3. Then take one from the other.So, to get to 5,7 Marvin make 5 steps right and 7 in any order. Similarly to get to 4,3 he does 4 right and 3 up.in any order.Now, think of a right step as a red counter and an up step as a blue counter. How many ways are they to rearrange 5 red counter and 7 blue ones?I'd I had 2 red and 3 blue I'd do 5!/2!3!….There you go, I've started you off

User DennisVA
by
3.4k points