Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5 ( 2 0 pts . ) Greedy maze You are in a 2 - dimensional maze, looking for the exit. You know your current
pts Greedy maze
You are in a dimensional maze, looking for the exit. You know your current position in the
maze and the position of the exit in terms of Cartesian coordinates. At each cell of the maze,
you can observe only the neighboring cells. If there is no wall preventing your move, you may
move up down, left or right by a cell.
See the example above. You are at cell marked trying to get the exit marked Among
the options, the cell to your right is blocked by a wall. Cells marked are unobservable
from your current position. This means any cell with might reveal a wall later on
Consider the following greedy heuristic for exiting the maze. From your current position, you
always move to an available cell that minimizes the distance from the exit. For the example
above, this implies either moving up or down. Moving left would increase the distance to
Assume that when there are multiple permissible moves, one will be picked randomly.
Answer the following for this algorithm.
a pts Argue that this algorithm indeed is greedy.
b pts Assuming there is one, does this strategy always yield a solution? Prove mathe
matically or disprove by with a counterexample.
c pts Is this strategy optimal? Prove mathematically or disprove by with a counter
example.
In parts b and c if you pick to prove with a counterexample, give a full configuration
including to starting position the exit and all the walls.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started