# Humans, vampires and mirrors part 2: the triangular mirrors

Find part 1 (without triangular mirrors) here.

Here is a room composed of $$10 \times 10$$ squared cells. Each cell can be empty (𝑋) or contain one of the following:

• a double-faced mirror ( / or \ );
• a triangular mirror (which comes in four variants: ◁, ▷, △ or ▽) where all the edges of the triangle are mirrors and exactly one edge (the so called base) is parallel to one of the room edge;
• one human (𝐻);
• one vampire (𝑉);

All the mirrors reflect the light with an angle which is parallel to two room edges and perpendicular to the other two.

The numbers on the borders indicate how many different creatures must be visible along your line of sight if you step on one number and look directly into the grid from that position, along a row or column. Humans can be seen both directly and when reflected by a mirror while Vampires can be seen only directly. You can always see all the creatures along your line of sight, not just the first one. In reflections you can see Humans through Vampires.

If you look at the triangular mirrors (both directly and because of the reflection of another mirror)

• from the base: you just see the reflections of all the creatures that you have already seen along your line of sight.
• from the opposite direction to the one of the base: you see the reflections of all the creatures reflected by both the non-base edges of the mirror.
• from one of the two other edges: the triangular mirror just behaves like a regular mirror.

Here is an example of how the reflections in the △ mirror work.

Complete the grid by filling each cell with one of 𝑋, 𝐻 or 𝑉 using the rules above and knowing that:

• The four central cells are empty.
• If looking in some direction the same cell can be seen two or more times: the creature on it (if any) must be counted only once.
• There are 22 vampires in the room.

Enjoy!

• @randalthor no problem. The solution must be unique Apr 5 '20 at 18:49
• I’m curious why you decided seeing the head-on part of a triangle mirror only shows each entity once. In HMM puzzles where a line of sight visits the same cell twice, the entity is counted (if visible) for each pass, so it seems like the flat side of the triangle should behave similarly. Apr 6 '20 at 1:16
• @davidMillar that's because this puzzle is not inspired by the HMM ones. I found this kind of puzzle on an Italian magazine and then I invented my own grids. I didn't even know HMM before you mentioned it. Apr 6 '20 at 6:39

## Preliminaries

Notation: I use $$X$$ for an empty cell (no vampires or humans), $$V$$ for a vampire, $$H$$ for a human, and (in the process of solving the puzzle) $$n$$ for "either X or V" and $$s$$ for "either V or H".

A general note:

Any "line of sight" that goes directly from one number $$p$$ to another number $$q$$, bouncing off mirrors on the way, can be divided into (up to) three sections: (A) between $$p$$ and first mirror; (B) between mirrors (may be empty); (C) between last mirror and $$q$$. Anything in (B) counts equally for both $$p$$ and $$q$$, and so does any Human on the path. So the difference between $$p$$ and $$q$$ is precisely the difference between the number of Vampires in (A) and in (C).

## Step by step

First the "obvious" deductions, from the 0s and a couple of easy 1s:

(Some other things are also easy to see right away: e.g. the first six cells of the bottom row must contain two $$V$$, one $$H$$, three $$X$$; and the first four cells of the third row must contain at least three $$V$$; but those aren't so easily shown with the notation.)

Now consider the $$4,3$$ at the top (fifth and sixth columns), the $$5$$ at the bottom, and the $$5$$ on the left.

All four cells that $$4$$ can see must be filled ($$s$$), and the two by the $$3$$ must be $$H$$.
By the "general note" at the beginning, all four cells above the bottom $$5$$ must be $$V$$, and the two cells past the mirror must be one $$H$$ and one $$X$$.
The left $$5$$ can only see six cells, past a mirror, and one of those is $$n$$, so all the others must be $$H$$. From the $$6$$ in the bottom left, the last one must be $$V$$. Now the left $$1$$ in the fifth row is done, and we can fill in a bunch of $$X$$ and $$n$$ for that.

Now consider the $$3,2$$ path at the bottom right, and the paths around the top right triangle.

That $$3$$ (bottom row, third from the end) can only see three cells, so they must all be filled, and the two on the right must be $$H$$ and the bottom one $$V$$.
Now, comparing the $$9,6$$ path, and using the "general note" at the beginning, all four cells starting from the $$9$$ must be $$V$$, and the other two beside the $$6$$ are either $$H$$ or $$X$$. (The one next to the $$6$$ must be $$X$$ because of the $$2$$ below, and we can also fill in a lot of $$n$$ because of that $$2$$.)
Around the top right triangle, there is a path which starts from a $$2$$ (seventh on the right) and then splits to go to a $$1$$ (second on the right) and another $$2$$ on the top. On the lower part of the path (four cells along the right edge) there must be one $$H$$ and three $$n$$. The other part just has two cells; one is already $$X$$, so the other one must be $$H$$.
Now consider the $$2,1$$ path starting from the $$2$$ at the top of the right edge. There's already one $$H$$ on this path, so everything else must be $$n$$, which means the top right cell must be $$V$$, and the ones near the $$1$$ must be $$X$$.

Now consider the top row, and the paths around the bottom right triangle.

The $$3$$, seventh at the top, can only see Humans, so there must be three $$H$$ among the first six cells in the top row, and there's now only three which can be $$H$$. Now the other $$3$$, sixth at the top, can already see three $$H$$, so the $$s$$ below one of them must be $$V$$.
Also, consider again the $$9,6$$ path. The $$9$$ can see four $$V$$, so it must also see five $$H$$ beyond the mirrors, and there's now only five which can be $$H$$.
Now consider the $$3$$ in the bottom row second from the end. It can now see three $$H$$, so everything else on its path must be $$n$$. Then the $$2$$ on the right, fifth from the bottom, can see only $$n$$, one $$H$$, and the thing closest to it, which must therefore be $$s$$.

Let's also remember that the four central cells are empty, and consider again the $$6$$ on the right of the fifth row.

By the "general note" at the beginning, that $$6$$ must see at least two $$V$$ directly, since it's on a path with the $$4$$ above it. So we can place two $$V$$ in that row, and the cell next to the $$4$$ must be either $$X$$ or $$H$$.
Now I want to label some empty cells:

From the $$6,4$$ path, we know that exactly two of $$a,b,d,e$$ must be $$H$$. Assume it's not $$e$$; then it must be $$b$$ and exactly one of $$a,d$$, by the $$3,3$$ path around the lower left. Then the $$3$$ on the left of the seventh row can already see three things directly, so the $$f$$ cell is $$X$$ and the $$c$$ cell is $$n$$. But then the $$7$$ at the top can see at most six things, contradiction.
So the $$e$$ cell is $$H$$, which means the $$s$$ below it must be $$V$$.
In fact, the above contradiction can arise just from assuming that one of $$a,d$$ is $$H$$. So both of those must be $$n$$, and then the $$6,4$$ path tells us the $$b$$ cell is $$H$$.
Now the $$7$$ tells us that either $$c$$ is $$H$$ or $$f$$ is $$s$$; the $$3,3$$ path tells us it's not both, so that means both the $$n$$ on the $$7$$ path must be $$V$$.
Then the $$4$$ on the left of the second row is done, so we can fill in three $$X$$ there.

Now we're almost done, and deductions are falling like dominoes. I'm just making this pause for a breather between spoilertags.

Top of the first column: that $$4$$ can only be filled by a $$V$$ in the top left and an $$H$$ in the lower right.
Left of the first row: that $$4$$ is done, so we fill an $$X$$.
Top of the fourth column: that $$3$$ can only be filled by $$V$$ lower down.
Bottom of the second column: that $$4$$ can only be filled by $$V$$ just there and $$H$$ in the cell we called $$c$$ before.
Left of the bottom row: that $$3$$ is done, so we fill two $$X$$.
$$3,3$$ path in lower left: the left $$3$$ is done, so we fill two $$X$$, and then another $$V$$ for the bottom $$3$$.
Bottom of the sixth column: that $$4$$ can only be filled by $$V$$ above it.

Now we've filled all the $$H$$, and everything that can be deduced directly. I've emptied the $$n$$ squares so they stand out more clearly (there's nine of them):

Finally, since there's 22 Vampires in total, every blank square must be $$X$$ and we get the final solution.

• This doesn't work. The three on the bottom (column 5) sees four creatures Apr 6 '20 at 7:10
• @melfnt Ye gods, this is a tricky puzzle :-) I see the error in my logic now ... working on an edit. Apr 6 '20 at 8:17
• @melfnt Whew, now done, hopefully correctly this time. Apr 6 '20 at 8:47
• This time it is correct, I accepted your answer! When checking if this grid is solvable from scratch after having designed it I was able to find the solution without guessing (as you did in the seventh spoiler block). Well done anyway! Apr 6 '20 at 10:00