Your research team has found a prehistoric virus preserved in the permafrost and isolated it for study. After a late night working, you're just closing up the lab when a sudden earthquake hits and knocks out the power. As the emergency generators kick in, an alarm confirms your worst fears: all the sample vials have broken. The virus is contained for now, but unless you can destroy it, the vents will soon open and unleash a deadly airborne plague. Without hesitation, you grab your HazMat suit and get ready to save the world. The lab is a four by four compound of 16 rooms with an entrance on the northwest corner and an exit at the southeast. Each room is connected to the adjacent ones by an airlock, and the virus has been released in every room except the entrance. To destroy it, you must enter each contaminated room and pull its emergency self-destruct switch. But there's a catch. Because the security system is on lockdown, once you enter the contaminated room, you can't exit without activating the switch, and once you've done so, you won't be able to go back in to that room. You start to draw out possible routes on a pad of paper, but nothing seems to get you to the exit without missing at least one room. So how can you destroy the virus in every contaminated room and survive to tell the story? Pause here if you want to figure it out for yourself. Answer in: 3 Answer in: 2 Answer in: 1 If your first instinct is to try to graph your possible moves on a grid, you've got the right idea. This puzzle is related to the Hamiltonian path problem named after the 19th century Irish mathematician William Rowan Hamilton. The challenge of the path problem is to find whether a given graph has a Hamiltonian path. That's a route that visits every point within it exactly once. This type of problem, classified as NP-complete, is notoriously difficult when the graph is sufficiently large. Although any proposed solution can be easily verified, we have no reliable formula or shortcut for finding one, or determining that one exists. And we're not even sure if it's possible for computers to reliably find such solutions, either. This puzzle adds a twist to the Hamiltonian path problem in that you have to start and end at specific points. But before you waste a ton of graph paper, you should know that a true Hamiltonian path isn't possible with these end points. That's because the rooms form a grid with an even number of rooms on each side. In any grid with that configuration, a Hamiltonian path that starts and ends in opposite corners is impossible. Here's one way of understanding why. Consider a checkerboard grid with an even number of squares on each side. Every path through it will alternate black and white. These grids will all also have an even total number of squares because an even number times and even number is even. So a Hamiltonian path on an even-sided grid that starts on black will have to end on white. And one that starts on white will have to end on black. However, in any grid with even numbered sides, opposite corners are the same color, so it's impossible to start and end a Hamiltonian path on opposite corners. It seems like you're out of luck, unless you look at the rules carefully and notice an important exception. It's true that once you activate the switch in a contaminated room, it's destroyed and you can never go back. But there's one room that wasn't contaminated - the entrance. This means that you can leave it once without pulling the switch and return there when you've destroyed either of these two rooms. The corner room may have been contaminated from the airlock opening, but that's okay because you can destroy the entrance after your second visit. That return trip gives you four options for a successful route, and a similar set of options if you destroyed this room first. Congratulations. You've prevented an epidemic of apocalyptic proportions, but after such a stressful episode, you need a break. Maybe you should take up that recent job offer to become a traveling salesman.
당신의 연구팀이 영구 동토층에서 선사시대의 바이러스를 찾았고 연구를 위해 이를 격리해 두었습니다. 당신이 밤 늦게까지 일하고 연구실을 닫으려던 찰나에 갑작스런 지진으로 전력이 차단되었습니다. 비상 전력이 들어 온 순간, 최악의 상황을 알리는 경보가 울립니다. 샘플 담아 둔 병들이 모두 깨진 것입니다. 당장은 바이러스들이 보존되어 있지만 그 바이러스들을 모두 없애지 않으면 곧 환기구가 열리고, 치명적인 전염병이 공기중으로 퍼질 것입니다. 당신은 주저없이 방호복을 입고 세상을 구할 준비를 서두릅니다. 연구실은 가로 세로 4개, 총 16개의 방으로 이루어져 있고 북동쪽 코너에 입구가 있으며 남서쪽에 출구가 있습니다. 서로 인접하는 방 사이에는 공기 차단기가 설치되어 있고 바이러스는 입구 방을 제외한 모든 방에 이미 퍼져있습니다. 바이러스를 없애기 위해 당신은 각각의 오염된 방으로 들어가서 비상 자동폐쇄 버튼을 눌러야 합니다. 하지만 여기엔 함정이 있습니다. 모든 보안 시스템이 잠겨있기 때문에 일단 오염된 방에 들어가면 비상 버튼을 누르기 전에는 방을 나갈 수 없습니다. 그리고, 버튼을 누르고 방을 나가면 다시 그 방으로 되돌아 갈 수 없죠. 당신은 종이에 가능한 방법을 그려보지만 모든 방을 빠짐없이 지나서 출구로 가는 방법은 없어보입니다. 그렇다면, 당신은 어떻게 모든 방의 바이러스를 없애고 살아남아서 이 이야기를 전할 수 있을까요? [스스로 정답을 찾고 싶다면 여기서 일시정지하세요!] 3초 뒤 정답, 2초 1초 만약 당신이 본능적으로 격자를 만들고 방법을 그려보려 했다면 옳은 방법입니다. 이 수수께끼는 해밀턴 경로 문제와 관련이 있는데 그 명칭은 19세기 아일랜드 수학자인 윌리엄 로완 해밀턴을 딴 것이죠. 이 경로 문제들의 어려운 점은 주어진 미로에 해밀턴 경로가 적용되는지 확인해야 한다는 것입니다. 바로, 한 장소를 단 한 번만 지나야 한다는 것이죠. 이런 방식의 문제를 'NP-완성 문제'라고 하는데 이는 미로가 클수록 엄청나게 어려워집니다. 일단 해법이 제시되면 쉽게 증명할 수는 있지만 답을 얻을 수 있는 믿을 만한 공식이나 지름길도 없고 답이 있다고 확신할 수도 없죠. 심지어 컴퓨터 마저도 해결책을 찾을 수 있을지 확신할 수 없습니다. 이 문제의 경우, 해밀턴 경로 문제를 응용한 것으로서 시작 지점과 종료 지점이 이미 정해져 있죠. 하지만 격자를 그린 종이를 수없이 낭비하지 않고도 양 끝점이 정해진 이런 경우에는 해밀턴 경로가 존재하지 않음을 알 수 있습니다. 왜냐하면 격자를 구성하는 가로 세로의 방들이 같은 수로 놓여있기 때문이죠. 이렇게 배열된 격자 미로에서는 해밀턴 경로로 서로 반대쪽 구석에서 시작하고 끝나는 것이 불가능합니다. 그 이유를 알 수 있는 방법이 있죠. 가로 세로가 짝수의 격자로 된 체스판을 생각해 볼까요. 칸을 하나 지날 때 마다 흑백이 바뀌겠죠. 이 격자의 전체 칸수도 짝수가 되는데 이는 짝수와 짝수를 곱하면 짝수가 되기 때문입니다. 그래서 해밀턴 경로를 이용해 짝수 면에서 검은 칸부터 출발하면 흰 칸에서 끝나게 됩니다. 그리고 흰 칸에서 출발한다면 검은 칸에서 끝나게 되죠. 그런데, 짝수인 면을 가진 모든 격자는 서로 반대쪽 끝이 같은 색이죠. 따라서 양쪽 구석에서 시작하고 끝나는 해밀턴 경로를 찾는 것은 불가능합니다. 방법이 없는 것으로 보이지만 문제를 자세히 살펴보면 중요한 예외사항을 발견할 수 있습니다. 일단 오염된 방의 폐쇄 버튼을 누르면 다시 그 방에 들어갈 수 없다고 했죠. 하지만 오염되지 않은 방 하나가 있죠. 바로 입구입니다. 이 말은 즉, 폐쇄 버튼을 누르지 않고 방을 나갔다가 이들 방 두 개 중 하나를 폐쇄시킨 후 다시 돌아올 수 있다는 뜻입니다. 이 방은 공기차단기가 열려 바이러스로 오염되어 있겠네요. 하지만 상관없습니다. 다시 돌아와서 다른 방으로 갈 때 입구를 폐쇄할 수 있기 때문이죠. 이렇게 다시 돌아오는 방법을 이용하니 성공할 수 있는 4가지 경로가 보이고 다른 방을 먼저 폐쇄한다 해도 비슷한 방법들을 찾을 수 있습니다. 축하드립니다! 전염병 재앙을 막는 데 한 건 했네요. 이 일로 지친 당신에게 휴식이 필요하겠군요. 얼마 전에 받은 여행사 영업부 근무 제안을 받아들이는 건 어떤가요?