Sale!

CSE-40049 Homework 8

$30.00 $18.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (1 vote)

In this assignment you will write an algorithm that determines whether there is a path through a
maze. A maze will be represented as an undirected graph with each room represented as a vertex
and each corridor represented as a pair of edges. Each room will be uniquely identified by a single
character label.

Here are two sample mazes that will be used to test your implementation (notice that maze #1 has
a path from the entrance to exit but maze #2 does not):

a) (9 points) Implement the following function:
int isExitReachable(Graph *pMaze, char entrance, char exit);

• This function should return whether a path exists from entrance to exit. A non-zero return
value indicates that a path exists; a zero return value indicates that no path exists.

Demonstrate your function working with mazes #1 & #2. Note, your implementation must be
generic (i.e. work with any maze) even though you are only required to demonstrate success with
mazes #1 & #2.

b) (1 point) Make sure your source code is well-commented, consistently formatted, uses no
magic numbers/values, follows programming best-practices, and is ANSI-compliant.

Turn in all source code, program output, diagrams, and answers to questions in a single
Word or PDF document.