1.

There are four students in a class namely A, B, C and D. A tells that a triangle is a bipartite graph. B tells pentagon is a bipartite graph. C tells square is a bipartite graph. D tells heptagon is a bipartite graph. Who among the following is correct?(a) A(b) B(c) C(d) DThe question was asked in class test.I'm obligated to ask this question of Bipartite Graphs topic in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (c) C

The best explanation: We can prove it in this following way. Let ‘1’ be a vertex in bipartite set X and let ‘2’ be a vertex in the bipartite set Y. Therefore the bipartite set X contains all odd numbers and the bipartite set Y contains all even numbers. Now let us CONSIDER a graph of odd cycle (a triangle). There exists an edge from ‘1’ to ‘2’, ‘2’ to ‘3’ and ‘3’ to ‘1’. The latter case (‘3’ to ‘1’) makes an edge to EXIST in a bipartite set X itself. Therefore telling us that graphs with odd cycles are not bipartite.



Discussion

No Comment Found

Related InterviewSolutions