Loop the loops - Easy

In the world of pencil puzzles, there are many puzzle types where you have to draw a loop on a lattice grid, including Country Road , Masyu , Pure Loop , Slalom , and Yajilin . In most of these puzzles (and all of the linked above), the loop visits some of the cells, passing through the cells' centers, and may not use a cell more than once (which also means no intersections, no touching itself, etc).

Formally, on a polyomino P P , a loop is a sequence of n 4 n \ge 4 squares ( a 1 , a 2 , a 3 , , a n ) (a_1, a_2, a_3, \ldots, a_n) such that all squares a i a_i are in P P , a i a_i and a i + 1 a_{i+1} share a side for all valid i i , a n a_n and a 1 a_1 also share a side, and all squares in the loop are distinct. Loops are cyclic (it can start from any square in the loop) and don't have any orientation (reversing the loop doesn't matter), thus ( a 1 , a 2 , a 3 , a 4 ) , ( a 2 , a 3 , a 4 , a 1 ) , ( a 4 , a 3 , a 2 , a 1 ) (a_1, a_2, a_3, a_4), (a_2, a_3, a_4, a_1), (a_4, a_3, a_2, a_1) all describe the same loop.

There is 1 1 loop on a 2 × 2 2 \times 2 square, 3 3 loops on a 2 × 3 2 \times 3 rectangle, and 13 13 loops on a 3 × 3 3 \times 3 square. Determine the number of loops on a 3 × 4 3 \times 4 rectangle.

Want a harder challenge? Try the medium difficulty .


The answer is 40.

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

Ivan Koswara
Aug 12, 2015

The board is small enough to discover all the possible loops, especially since you're also told a few examples to help double-checking your loops.

We know that there are 13 13 loops on 3 × 3 3 \times 3 square, so we immediately have several loops: there are 13 13 that doesn't use the bottom row, and there are 13 13 that doesn't use the top row. However, there are 3 3 loops that don't use both the top and the bottom rows (those that fit in a 2 × 3 2 \times 3 rectangle), and they are counted twice, so we need to subtract it. We have a current total of 13 + 13 3 = 23 13 + 13 - 3 = 23 loops. Now we need to count the number of loops that use both the top and the bottom rows.

There are 3 ways to use the top rows, labeled "left", "all", and "right" respectively:

Likewise, there are also 3 ways to use the bottom rows. Thus in total there are 9 9 cases to consider. It shouldn't be difficult if you're careful enough, and noticing the symmetry can help:

  • Left and left: 2
  • Left and all: 2
  • Left and right: 1
  • All and left: 2
  • All and all: 3
  • All and right: 2
  • Right and left: 1
  • Right and all: 2
  • Right and right: 2

This gives a total of 17 17 additional loops, for a grand total of 23 + 17 = 40 23+17 = \boxed{40} .

Of course, it's easier to use programming for this, which is the task of the medium difficulty...

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...