Question: Given undirected graph with nodes: [0, 1, 2, 3, 4, 5] and edges: [(0, 2), (0, 5), (1, 2), (1, 5), (2, 4), (3, 5),

Given undirected graph with nodes: [0, 1, 2, 3, 4, 5] and edges: [(0, 2), (0, 5), (1, 2), (1, 5), (2, 4), (3, 5), (4, 5)] perform Breadth First Search algorithm starting from vertex 0. Choose correct statements:

1.Distances of visited nodes are: {0: 0, 1: 2, 2: 2, 3: 2, 4: 3}

2.The order of visited nodes is [0, 2, 5, 1, 4, 3]

3.Classes of visited edges are: {(0, 2): 'T', (0, 5): 'B', (1, 2): 'T', (1, 5): 'B', (2, 4): 'B', (3, 5): 'C', (4, 5): 'T'}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!