hp
toc

Mostly Misaligned Mirrors

2019-05-18, post № 215

mathematics, PIL, programming, Python, #paths, #random, #simulation, #stochastic

Recently, my stochastic professor introduced me to a problem he has been pondering for over two decades: on the two-dimensional integer lattice \mathbb{Z}^2 one shall flip a three-sided coin for each point and uniformly place one of three mirrors, \{\diagup,\,\cdot\,,\diagdown\}, where \,\cdot\, denotes not placing a mirror. After having populated the world, one picks their favorite integer tuple and points a beam of light in one of the four cardinal directions. With what probability does the light fall into a loop, never fully escaping?

mostly-misaligned-mirrors-5_scaled.png
A cycle which includes the origin.

With me almost surely not being able to solve this problem through proof, I took the route of silicon-assisted problem analysis: simulation. However, even on very large lattice segments, the beam often either escapes or exists only for a very short time — as seen above.
Source code: mostly-misaligned-mirrors_visualize.py, mostly-misaligned-mirrors_simulate.py

An example of a rather intricate path which eventually escapes the chosen view:

mostly-misaligned-mirrors-12.png
The beam escapes on a 𝟣𝟢𝟢𝟢 ⨉ 𝟣𝟢𝟢𝟢 board.

After seeing the beams often escape my view frames, I decided to also simulate the problem without visualization — both to potentially get a performance increase as well as to lift the constraints of finite imagery. My results for running ten simulations are as follows:

$ python mostly-misaligned-mirrors_simulate.py 10
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[.] Visited 5110 mirrors before falling into a loop.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[.] Visited 4 mirrors before falling into a loop.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[X] Exceeded the maximum visited mirrors threshold of 1000000.
[X] Exceeded the maximum visited mirrors threshold of 1000000.

One can clearly see that whilst some paths are of minuscule lengths, others far exceed those, traversing over a million mirrors until getting stopped as to not fry my machine.

My professor’s conjecture states that any given mirror configuration almost surely — meaning with probability 𝟣 — causes the beam of light to fall into a cycle. In some sense it appears intuitively clear — escaping requires an infinite amount of mirrors to be placed correctly, however: could the beam also find a sneaky way around a lot (in the sense of being of non-vanishing measure) of configurations, squeezing elegantly and indefinitely around all obstacles? After running my simulations doubts in the former increase, leaving me cluelessly in the dark, waiting for a proper proof to be formalized.

Jonathan Frech's blog; built 2024/12/19 23:13:08 CET