(Choose 1 answer)
Suppose the graph G = (V.E) satisfies the conditions for the existence of an Eulerian cycle. The following is an algorithm for finding Euler cycle from the vertex X using stack:
declare a stack S of characters (a vertex is labeled by a character)declare an empty array E (which will contain Euler cycle)push the vertex X to S
while(S is not empty){ch = top element of the stack S if ch is isolated then remove it from the stack and put it to E else
select the first vertex Y (by alphabet order), which is adjacent to ch.push Y to S and remove the edge (ch. Y) from the graph
} the last array E obtained is an Euler cycle of the graph
Suppose a multigraph G is given below (view picture). Which of the followings is the Euler cycle from the vertex B. created by above algorithm?
A. B. A, C, D, B
B. B, C, D, A, B
C. B. D. C, B, A, B
D. B, A, B, D, C, B
E. B, C, D, B, A, B
Exit 32