Quantcast
Channel: Poco – Notions
Viewing all articles
Browse latest Browse all 16

Impossible Escape Possible

$
0
0

A reddit post, linking to this article got me thinking about a solution to the the problem. Click the link for more details. Don’t read past the first bit if you don’t want the solution.

It took me some thinking to figure out the solution and it ended up being incredibly simple. Not satisfied with just proving it to myself I decided to implement it in Javascript.

Click on the board below to be taken to the interactive version.

chessboardcoins

The red highlight is the square that is currently identified. hint: there is always an identified square since the whole point of the exercise is to identify one of the squares with some board layout. If the final layout identifies one square then the initial layout will likely identify a different square.

The green highlight is the square that will be identified if you flip the coin where the mouse cursor is. As you move the mouse around the board you can see how flipping each square will change the result.

Taking it a step further I have added 2×2, 4×4, and 16×16 board layouts demonstrating the same solution. **SPOILER** The entire change for different board sizes was changing the constant 64 to another square power of 2. I expect that it would easily work for a 32×32 board too.**SPOILER**

For the solution look at the page source and the function “calculateValue”.

The post Impossible Escape Possible appeared first on Notions.


Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles



Latest Images