A two dimensional array of red and green entries represents a maze. Green entries are passable and red entries are blocked (like a wall). Two special green entries en and ex denote the entrance and exit of the maze. (1) Abstract the problem as a graph; (2) Design an efficient algorithm (pseudo code) to find a shortest path from en to ex if it exists and then print out the path. Analyze the complexity of your algorithm.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter18: Deterministic Dynamic Programming
Section18.4: Resource-allocation Problems
Problem 3P
icon
Related questions
Question

A two dimensional array of red and green entries represents a maze. Green entries are passable and red entries are blocked (like a wall). Two special green entries en and ex denote the entrance and exit of the maze.

(1) Abstract the problem as a graph;

(2) Design an efficient algorithm (pseudo code) to find a shortest path from en to ex if it exists and then print out the path. Analyze the complexity of your algorithm.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Polynomial time
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole