You are on page 1of 1

Question 7 [6 points] Consider the graph below and its adjacency list representation.

Taking
into account the order of the vertices in each adjacency list (which follows a decreasing
order of edge weights) and starting from vertex A,

Vertex list of adjacent vertices

g) iron
PORTENT

:#
*:
.

A B C
B E A C D
C F D E B A
D F G C E B this ORDER
E B C D F

F
F D C G E
G D F


1. (1 point) give, in order, the list of visited vertices in the case of a depth-first search;

A ,
B
,
E
,
C
,
F
,
D
,
G

2. (1 point) give, in order, the list of visited vertices in the case of a breath-first search.

A / B C I E D I I
G

LAGAN tent
COPYRIGHT
Mount /

You might also like