Home > Games
God and the Devil (Posted on 2005-02-08) |
|
God and the Devil decide to play a game. God will start by picking an infinite sequence of moves of the form "left", "right", "up", and "down". The Devil responds by creating a finite maze with an exit and by placing God somewhere inside. God then follows His pre-selected sequence to traverse the maze. Unmakable moves are ignored; for example, if the next move is "left" and there is a wall to the left of the current square, God goes on to the next move in the sequence without moving.
If God escapes the maze in finite time, He wins. Otherwise, the Devil wins.
Assuming both agents act optimally, who will win?
(assume that the maze is formed by deleting some edges from a rectangular grid, and that it has no isolated regions; i.e., it is always possible to get to the exit from any point inside the maze)
|
Submitted by David Shin
|
Rating: 3.6842 (19 votes)
|
|
Solution:
|
(Hide)
|
Naturally, God will emerge the winner. To see this, we first prove a lemma:
Lemma: For any given finite maze, there is a finite sequence of moves that God can take to escape the maze, no matter what His starting position is.
Proof: Place an army of angels in the maze, one in each possible starting position. Construct the sequence by moving the entire army in unison until all the angels leave the maze. Note that multiple angels may occupy any one square during this sequence. God can take the resulting sequence to escape the maze from any starting position, since He will be starting where some angel started in this construction, and since that angel escaped with this sequence.
With this lemma, God's strategy is simply to perform all 1-move sequences, then all 2-move sequences, then all 3-move sequences, etc. This infinite sequence has the property that every finite sequence occurs as a subsequence of it. Then, regardless of what maze the Devil selects, God will arrive at a subsequence which allows Him to escape that particular maze no matter where God currently is within that maze. |
Comments: (
You must be logged in to post comments.)
|
|
Please log in:
Forums (1)
Newest Problems
Random Problem
FAQ |
About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On
Chatterbox:
|