Keep moving!

You are in (1,1) cell of a 5 × 5 grid . In each step, you can move either one cell right, one cell left, one cell up or one cell down . You have to reach cell (2, 4) in exactly 4 moves. You can't put your leg on cell (1, 3) as it is dangerous. Find number of ways of reaching the destination.

You also can't get out of the grid. There are no other restrictions.


Difficulty: \dagger \color{grey}{}\dagger \dagger \dagger \color{grey}{\dagger}

5 2 6 1 7 3 8 4

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Aryan Sanghi
Jun 14, 2020

You have to move 3 steps up and 1 step right to reach out to your destination. This accounts for four moves, and you have exactly that many.

So, you can't afford moving a step left or down in any move.

So, let U denote a move one cell up and R denote a move one cell right.

The possibile combinations are

  • UUUR

  • UURU

  • URUU

  • RUUU

Out of the four combinations, 1 s t ^{st} and 2 n d ^{nd} are eliminated as they require us to step on the (1, 3) cell, which isn't allowed.

So, the answer is 2 \boxed{2}

There is no way to move right, so the answer is 0 \boxed{0} .

Vinayak Srivastava - 12 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...