The greatest challenge a vampire hunter can take on is to bring sunlight into a vampire's lair. You’ve stealthily descended into the darkness of a vampire cave, setting a sequence of mirrors as you go. When the sun reaches the right angle in the sky, a focused beam of light will ricochet along the mirrors, strike your diffuser, and illuminate the great chamber where the vampires sleep.
Największe wyzwanie łowcy wampirów to doprowadzenie światła do ich kryjówki. Trafiasz cichaczem do ciemnej jaskini wampirów, zostawiając za sobą po drodze lustra. Kiedy słońce będzie na niebie pod odpowiednim kątem, skupiona wiązka światła odbije się rykoszetem od luster, dotrze do dyfuzora i oświetli wielką komnatę, w której śpią wampiry.
You set the final mirror and sneak through an opening in the corner of the great chamber. The diffuser must be wall-mounted, but the walls are crowded with coffins, which you don’t dare disturb. The only open spots are in the other three corners of the room.
Ustawiasz ostatnie lustro i wślizgujesz się przez otwór w rogu wielkiej komnaty. Dyfuzor trzeba przyczepić do ściany, ale na nich są trumny, których nie odważysz się dotknąć. Jedyne wolne miejsca to trzy pozostałe rogi komnaty.
The light will enter through the southwest corner at a 45 degree angle and bounce off the perfectly smooth metallic walls until it hits one of the other three corners. But which corner will it hit? You know the room is a rectangle 49 meters wide and 78 meters long.
Światło wpadnie pod kątem 45 stopni przez południowo-zachodni róg, odbije się od perfekcyjnie gładkich metalicznych ścian i dotrze do jednego z trzech rogów. Ale do którego? Komnata jest prostokątem o szerokości 49 metrów i długości 78 metrów.
You could probably find the answer by drawing a scale model of the room and tracing the path of the light, but the sun will be in its place in just minutes, and you’ve got no time to spare. Fortunately, there’s a different way to solve this puzzle that’s both simple and elegant.
Można znaleźć odpowiedź, rysując model pokoju i śledząc ścieżkę światła, ale słońce będzie w odpowiednim miejscu już za kilka minut i nie ma czasu do stracenia. Na szczęście jest inny sposób na rozwiązanie tej zagadki, zarówno prosty, jak i sprytny.
So in which corner should you place the diffuser to flood the vampire lair with sunlight?
W którym rogu komnaty umieścisz dyfuzor, żeby zalać światłem kryjówkę wampirów?
Pause the video if you want to figure it out for yourself.
[Zatrzymaj nagranie i rozwiąż zagadkę samodzielnie.]
Answer in 2
[Odpowiedź za 2]
Answer in 1
[Odpowiedź za 1]
You could tackle this problem by examining smaller rooms, and you’d find a lot of interesting patterns. But there’s one insight that can unravel this riddle in almost no time at all.
Problem można rozwiązać, badając mniejsze pokoje i znaleźć wiele ciekawych wzorów. Dzięki spostrzegawczości zagadkę można rozwiązać prawie od razu.
Let’s draw the chamber on a coordinate grid, with the Southwest corner at the point (0,0). The light passes through grid points with coordinates that are either both even or both odd. This is true even after it bounces off one or more walls. Another way of thinking about it is this: since the light travels at a 45 degree angle, it always crosses the diagonal of a unit square. Traveling 1 meter horizontally changes the x coordinate from even to odd or vice versa. Traveling 1 meter vertically changes the y coordinate from even to odd or vice versa. Traveling diagonally – as the light does here – does both at once, so the x and y coordinates of any points the light passes through must be both even, or both odd. This observation is more powerful than it seems. In particular, it means that we have a way to identify the kinds of points the light won’t ever go through If one of the coordinates is even and the other is odd, the light will miss them. That means it’ll miss the top two corners of the room, since those points have one even and one odd coordinate. The Southeast corner is the only option for the diffuser.
Narysujmy komnatę na siatce współrzędnych z południowo-zachodnim rogiem w punkcie (0,0). Światło przechodzi przez punkty siatki o współrzędnych, obu parzystych albo obu nieparzystych. Dzieje się tak nawet po odbiciu od jednej lub kolejnych ścian. Jest też inny sposób myślenia. Światło podróżuje pod kątem 45 stopni, więc zawsze przekracza przekątną kwadratu jednostkowego. Podróżując 1 metr w poziomie, zmienia współrzędną x z parzystej na nieparzystą i odwrotnie. Podróżując 1 metr w pionie, zmienia współrzędną y z parzystej na nieparzystą i odwrotnie. W podróży światła po przekątnej dzieje się to jednocześnie, więc współrzędne x i y punktów, przez które przechodzi światło, muszą być obie parzyste albo nieparzyste. To spostrzeżenie jest ważniejsze, niż się zdaje. Można tak znaleźć punkty, od których światło się nigdy nie odbije. Jeśli jedna ze współrzędnych jest parzysta, a druga nieparzysta, światło je ominie. Oznacza to, że światło ominie dwa górne rogi pokoju, bo te punkty mają jedną parzystą i jedną nieparzystą współrzędną. Południowo-wschodni róg to jedyne miejsce na ustawienie dyfuzora.
And indeed, when that precious beam of sunlight enters the hall, it bounces between the walls and strikes the Southeast corner, spot on. The vampires, sensing the intrusion, burst from their coffins and turn to dust in the light. It was a “high stakes” test, and you passed with flying colors.
Kiedy cenna wiązka światła słonecznego wpada do komnaty, odbija się od ścian i uderza dokładnie w południowo-wschodni róg. Wampiry, wyczuwając wtargnięcie, wyskakują z trumien i zmieniają się w pył. To była gra o dużą stawkę. Udało się ją wygrać śpiewająco.