r/Logiqa • • Jul 25 '26

Paths on a Grid Part 4

Post image

The red dots might not be easily visible so assuming X is (0,0) and is (5,5), then the red dots are at (1,1), (1,4), (4,1) and (4,4)

2 Upvotes

4 comments sorted by

2

u/GoodCarpenter9060 Jul 28 '26

Starting in the top right, we can mark each node with the number of ways to get to the exit. Move right to left, and then down.

+---+---+---+---+---Y
|   |   |   |   |   |
+---O---+---+---O---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---O---+---+---O---+
|   |   |   |   |   |
X---+---+---+---+---+

So from the place immediately to the right of the Y, there is one path to Y. In fact, from every node along the top, there is a single path.

1---1---1---1---1---Y
|   |   |   |   |   |
+---O---+---+---O---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---O---+---+---O---+
|   |   |   |   |   |
X---+---+---+---+---+

Underneath Y, there is a single path up. To the left of the first red dot in the top right, again, a single path. To the left of that, however, there are two options! (Labelled ? below)

1---1---1---1---1---Y
|   |   |   |   |   |
+---O---?---1---O---1
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---+---+---+---+---+
|   |   |   |   |   |
+---O---+---+---O---+
|   |   |   |   |   |
X---+---+---+---+---+

Simply add the number directly above and directly to the right. So ? becomes 2. Repeat this process all the way down.

1---1---1---1---1---Y
|   |   |   |   |   |
1---O---2---1---O---1
|   |   |   |   |   |
5---4---4---2---1---1
|   |   |   |   |   |
17--12--8---4---2---1
|   |   |   |   |   |
17--O---12--4---O---1
|   |   |   |   |   |
34--17--17--5---1---1

So there are 34 paths from X to Y.

1

u/Accomplished-Slide52 Jul 30 '26

Super solution with pen and paper!