Question: This question involves the problem of maze generation. That is , generating a random network of paths as a maze that fills an n m
This question involves the problem of maze generation. That is generating a random network of
paths as a maze that fills an grid, where corresponds to the number of rows and the
number of columns. In this problem, generated mazes must be fully connected and contain no
loops. Shown below is a grid and examples of valid mazes:
The following are examples of invalid mazes:
a Give an efficient algorithm to generate a random maze. The algorithm must be
capable of generating all possible valid mazes, where a valid maze is fully connected,
contains no loops, and fills an grid.
b Analyze the runtime of your algorithm.
c Give a strategy to select a valid entrance and exit.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
