Monday 13 December 2021

Calendar puzzle

This year I am participating again on Advent of Code. So far, so good, let´s see how many stars I manage to get in the end. However this post is not about AoC, but about another puzzle I came across.

It´s a calendar with eight pieces that can hide months and days on table below, so the remaining cells show the date. Apparently you can find a combination for each day of the year (rotating and flipping pieces is allowed). However brute forcing won´t work. I calculated the amount of different positions and it´s a lot of combinations. Looking at the pieces below, there are 96 different ways in which you can place piece A, 98 for B, 82 for C, 154 for D, 151 for E, 80 for F, 196 for G and 154 for H (pieces with simmetries have less possible locations).

So brute forcing this problem would require to loop through each of the 98 positions possible for A, for each one then loop over whatever positions are still possible from the original 82 for B, etc, etc. 

I will give it a try but I wonder if there is a more elegant approach. Hints are welcome.








No comments: