On the matrix, a 1 represent the existence of a street between two buildings while a 0 indicates the absence of a street between any two building.
Let:
F represent the Fire department
S represent the School
H represent the Hospital
A represent the Apartment Building.
The heading by the side of the matrix is the <em>ith</em> entry while the headings on top is the <em>jth</em> entry. Movement is from ith position to jth position.
From the given matrix, the directed graph is presented in the attachment below.
From the graph, the following buildings have two-way streets between them.