Answer
We can use a graph to model the connecting relationships in the floor plan.
Work Step by Step
We can use a graph to model the connecting relationships in the floor plan. Each vertex represents a room (or the outside, which is represented by vertex G) and each edge represents a connecting door shared by a pair of rooms.