# AI代写 | Past Year Primary Exam Quiz

Question 1
Breadth first search (BFS) and depth first search (DFS) are two basic search
algorithms. Give one advantage and one disadvantage of BFS and DFS
respectively.

Subway Network
The following diagrams shows the subway network of a city, where the points
labelled with a letter represent stations, while the lines connecting points indicate
the availability of connections between stations.

The time to travel (in minutes) between directly connected stations are given in the
following matrix (blank cell indicates no direct connections):

Question 2
Give one fundamental property of the matrix introduced in Subway Network
above.

Referring to Subway Network above:
Given a start station and an end station, you would like to write a program that can
compute a sequence of connected stations that will allow you to travel between
the start station and end station.
For example, given A (start station) and C (end station), a possible sequence is A-
F-G-D-C.
What is the branching factor of the search tree to accomplish this task?

Referring to Subway Network above:
In the program to compute the sequence of connected stations between a start
station and an end station, you would also like to minimise the travel duration
along the sequence.
Can BFS guarantee finding this sequence with shortest travel duration? Briefly
explain your answer.
Assume that the time to transfer between different trains at each station to be zero
(0) minutes. E-mail: itcsdx@outlook.com  微信:itcsdx 