We will entertain your mind, enhance your brain, expand your lifestyle.

# Day and Night

## Unsolvable puzzle

Every puzzle idea has a meaning in the form of the correct answer, and the solution for that is also decided.

The puzzle under consideration is a picture with two sides, such as “day and night” or “moon and sun”. It is divided into several pieces, and while turning over according to a certain rule, it changes everything from one picture to the other.

The idea came quickly and we created a program, but we couldn’t find the solution to reach the correct answer. There are many combinations, and we don’t know if there is a correct combination.

## Brute force

We can’t adopt something that can’t be solved, so we examined the logic to solve it, ran a C # program on Unity, and verified it by brute force. As a result, a combination of the two correct answers is found, and now we can safely adopt the puzzle.

## Postscript

When we were searching for the correct combination by hand, sometimes we encountered situation thet “Only one piece left !”

This means that another way of playstyle is possible, turn over everything else, leaving only one piece and turning over everything else.

So we modified the above program a little and tried to verify if there is a solution that leaves only one piece.

As a result, out of all 15 pieces, 4 pieces have no solution and 11 pieces have a solution, and there are 2 ways of solving each. In addition, it was necessary to turn over the solution 4 turns at the minimum and 11 turns at the maximum.

Recommend