Magic castle maze
Source: Canada Repêchage 2015/8
June 18, 2016
combinatorics
Problem Statement
A magical castle has identical rooms, each of which contains doors arranged in a line. In room there is one door that will take you to room , and in room there is one door that takes you out of the castle. All other doors take you back to room . When you go through a door and enter a room, you are unable to tell what room you are entering and you are unable to see which doors you have gone through before. You begin by standing in room and know the values of and . Determine for which values of and there exists a strategy that is guaranteed to get you out of the castle and explain the strategy. For such values of and , exhibit such a strategy and prove that it will work.