### Puzzles and math

(Aloysius here.) I love doing many things, and two of those things are mathematics and puzzles. There are puzzles that use basic mathematics, such as Kakuro or Tomtom puzzles that require summation/basic mathematics.

But there are several puzzles that require other tricks that are reminiscent of Math Olympiad techniques, and in this post I will be giving several examples.

Note these some of the ideas presented here only apply to a very specific puzzle/set of puzzles that will not be seen often, e.g. in contests.

## The puzzles

If you want to try the puzzles without explanation, here are the puzzles referenced in this post.

Do try and solve these logically without too much bashing/bifurcating. Happy solving!

### Idea 1

Shade some cells and draw a simple loop going through the remaining unshaded squares. Shaded squares are not edge adjacent and each clue gives the number of shaded squares in that direction. Draw a simple loop. Black clues are not in the loop while white clues are. Each numbered clue gives the total length of loop segments in the given direction.### Idea 2

Shade some cells such that they are not adjacent and that there is no row/column on continuous unshaded squares that contains 2 bold segments. Each clue gives the number of shaded cells in the region. Shade some cells such that they are not adjacent. The unshaded cells form a connected maze with no loops. Indicated arrows (there are none in this puzzle) give the direction of travel towards the star and are unshaded. Question marks indicate an arrow in some direction.### Idea 3

Shade some cells such that shaded cells are connected to the boundary of the grid and unshaded cells are connected. Each clue gives the number of unshaded squares in the 4 cardinal directions that are unblocked by shaded cells (including the cell with the number). Numbered cells are unshaded. Put a black/white circle in each cell such that the squares of black circles are connected, and so are squares of white circles. No 2 by 2 square has circles of the same colour.### Others

Shade some cells such that there are no vertical/horizontal 1 by 4 of the same colour. Numbers indicate the number of shaded squares in the region. Place n stars in each row, column and region such that no stars touch at an edge or vertex. Here n=10 (as indicated).If somehow the site (puzsq) wants you to see it in Japanese and you want it in English instead, click the 3 horizontal lines on the top right and click "To English".

Ideas (which are hints) are below.

## Other puzzles

But why restrict it to only Nikoli puzzles with no variants? There are also many puzzles in hunts that involve mathematics, and these sometimes require some programming too. Here are a few examples:

and another* set of examples:

You will notice this has many Mystery Hunt 2024 puzzles... simply because I took part in it.

## Idea 1: Parity

Here I have 2 puzzle types that use this:

- Yajilin - number of crossings of the loop with some fixed loop must be even
- Castle Loop - number of crossings of the loop with a line from the given clue to the boundary is odd/even depending on whether the clue is inside/outside the loop

## Idea 2: Double Counting

On the same site, there are several puzzles that use a number of shaded squares close to the maximum to force where these shaded squares go and what properties they must have. This is primarily done by double counting the number of adjacencies between unshaded squares. Recalling that the unshaded cells must form a connected region gives some good properties the shaded squares should aim to obey. Generally it boils down to this:

- Shaded squares at the corner of the grid
- Shaded squares at the edge of the grid
- Unshaded squares should not form loops

Now this idea gives a good result for the 5 star Guide Arrow as well.

## Idea 3: Jordan Curve Theorem

OK the name is misleading, but that's what I recall it as.

It is the fact that in some puzzles, such as Cave/Bag and Yin Yang, a 2 by 2 coloured in checkerboard fashion is not allowed, due to connectivity requirements of the unshaded and shaded squares.

In Cave/Bag the unshaded squares' connectivity is slightly different, but once you see the boundary as a ring of unshaded squares, you see that it is simply a condition of connectivity too.

## Others

Firstly, the Aqre puzzle. There's only 24 unshaded squares to ensure there are no 1 by 4 shaded rows/columns. That's only possible because 100 can't be tiled by 1 by 4s, but this closeness also forces many squares to be shaded...

Secondly, the Star Battle puzzle. Aren't the dimensions very small? In fact they are just right! Here's a question: how many ways are there to put the stars, if you ignore the regions? (Hint: rather few!)

P.S. The final 2 puzzles that look like math are very much not math.

## Comments

## Post a Comment