563 views
2 votes
2 votes

1 Answer

Best answer
3 votes
3 votes

I have taken a small example here.

Lets consider K4,3

The attached diagram shows the graph and the BFS tree.

Height = 2

Explanation: In a bipartite graph, the vertex set can be partitioned into two disjoint sets. Lets consider the two partitions as U and V. Lets take a vertex from partition U as source. Then the BFS tree will contain all the nodes of partition V in height 1, since the source is connected to all the vertices of V. Now, we take a vertex from V which appears in the BFS queue after the source. Since it is connected to all the vertices of U, we include all the vertices of U in height 2. 

selected by

Related questions

0 votes
0 votes
2 answers
1
viral8702 asked Sep 21, 2023
287 views
The Total Combinations Possible of Min heap with 8 Distinct elements are ?
0 votes
0 votes
0 answers
2
Pranavpurkar asked Sep 27, 2022
595 views
DOUBT 1: if head = P → link.is performed then what will happen to the nodes containing values a and b? will they get removed as no link is pointing them?and we will ...
0 votes
0 votes
1 answer
3
iamdeepakji asked Jan 27, 2019
278 views
If there is negative edge cycle then dijkstra algorithm will give correct path or not same thing about bellman ford also?Bellman ford always halts or not?
0 votes
0 votes
1 answer
4
iamdeepakji asked Dec 27, 2018
404 views
Please solve this by taking some exampleBack edgecross edgetree edgeThankyou.