Consider the ‘traverse the maze problem’ that we discussed in the…
Question Answered step-by-step Consider the ‘traverse the maze problem’ that we discussed in the… Consider the ‘traverse the maze problem’ that we discussed in the first lecture.Suppose:• The maze is a n Å~ n rectangle stored in a two-dimensional array M[0..n − 1][0..n − 1],rows and columns are numbered from 0 to n − 1;• M[i][j] = 1 indicates (i, j) is an accessible position, M[i][j] = 0 indicates we cannot stayor pass through (i, j);• The starting point is (0, 0), the goal point is (n − 1, n − 1);• We can traverse the maze by moving up/down/left/right each step, providing that weare moving into an accessible position.(a) Explain, in English, how we may model this problem using a graph. Your answer shouldat least include what is considered to be a vertex/edge in the graph, how to store thegraph, etc.(b) Explain, in English, how to determine whether there is a path from the starting pointto the goal point. Use Big-Oh notation to express the worst case complexity of yourapproach, in terms of n.(c) Explain, in English, how to find a shortest path (minimal number of movements) fromthe starting point to the goal point. Computer Science Engineering & Technology Python Programming Share QuestionEmailCopy link Comments (0)


