Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the chromatic number of compliment of line graph of bipartite graph?(a) 0(b) 1(c) 2(d) 3please answer, I need the answer asap.

Answer» RIGHT OPTION is (C) 2

The BEST I can explain: The perfect BIPARTITE graph has chromatic number 2. So the Compliment of Line Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and every Bipartite Graph has chromatic number 2.
2.

How many spanning trees does a complete bipartite graph contain?(a) n^m(b) m^n-1 * n^n-1(c) 1(d) 0I have been asked this question in an online interview.The doubt is from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct answer is (B) m^n-1 * n^n-1

The best I can explain: Spanning TREE of a given graph is defined as the subgraph or the tree with all the given VERTICES but having minimum number of edges. So, there are a total of m^n-1 * n^n-1 spanning TREES for a complete bipartite graph.

3.

Is it true that every complete bipartite graph is a modular graph.(a) True(b) FalseThe question was asked by my college director while I was bunking the class.The doubt is from Bipartite Graphs topic in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct ANSWER is (a) True

For explanation: Yes, the modular graph in graph THEORY is defined as an UNDIRECTED graph in which all three VERTICES have at LEAST one median vertex. So all complete bipartite graph is called modular graph.

4.

Which of the following is not an Eigen value of the Laplacian matrix of the complete bipartite graph?(a) n + m(b) n(c) 0(d) n*mThe question was posed to me in semester exam.My question is based upon Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right option is (d) N*m

Explanation: The LAPLACIAN matrix is used to represent a finite GRAPH in the mathematical field of Graph Theory. Therefore, the Eigen values for the complete BIPARTITE graph is found to be n + m, n, m, 0.

5.

What is the multiplicity for the laplacian matrix of the complete bipartite graph for n Eigen value?(a) 1(b) m-1(c) n-1(d) 0I got this question in exam.I want to ask this question from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right answer is (b) m-1

For explanation: The laplacian matrix is used to represent a finite graph in the MATHEMATICAL field of Graph Theory. The multiplicity of the laplacian matrix of COMPLETE BIPARTITE graph with EIGEN Value n is m-1.

6.

What is the multiplicity for the adjacency matrix of complete bipartite graph for 0 Eigen value?(a) 1(b) n + m – 2(c) 0(d) 2I have been asked this question during an interview.My question is from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT option is (B) n + m – 2

The EXPLANATION is: The adjacency matrix is a square matrix that is USED to REPRESENT a finite graph. The multiplicity of the adjacency matrix off complete bipartite graph with Eigen Value 0 is n + m – 2.
7.

Is every complete bipartite graph a Moore Graph.(a) True(b) FalseThis question was addressed to me by my college professor while I was bunking the class.The question is from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct ANSWER is (a) True

The explanation is: In GRAPH theory, Moore graph is DEFINED as a REGULAR graph that has a degree d and DIAMETER k. therefore, every complete bipartite graph is a Moore Graph.

8.

Which complete graph is not present in minor of Outer Planar Graph?(a) K3, 3(b) K3, 1(c) K3, 2(d) K1, 1The question was asked in an online interview.This intriguing question comes from Bipartite Graphs topic in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct OPTION is (c) K3, 2

Best explanation: Minor graph is formed by deleting CERTAIN number of edges from a graph or by deleting certain number off vertices from a graph. Hence Outer PLANAR graph cannot CONTAIN K3, 2 as a minor graph.

9.

Which of the following is not an Eigen value of the adjacency matrix of the complete bipartite graph?(a) (nm)^1/2(b) (-nm)^1/2(c) 0(d) nmThis question was addressed to me during an interview.Asked question is from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (d) nm

For explanation: The adjacency MATRIX is a square matrix that is used to represent a finite GRAPH. Therefore, the Eigen values for the complete BIPARTITE graph is found to be (nm)^1/2, (-nm)^1/2, 0.

10.

Which graph cannot contain K3, 3 as a minor of graph?(a) Planar Graph(b) Outer Planar Graph(c) Non Planar Graph(d) Inner Planar GraphI had been asked this question in semester exam.Query is from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct option is (a) Planar GRAPH

For explanation: Minor graph is formed by deleting certain number of EDGES from a graph or by deleting certain number off VERTICES from a graph. HENCE Planar graph cannot contain K3, 3 as a minor graph.

11.

What is testing of a complete bipartite subgraph in a bipartite graph problem called?(a) P Problem(b) P-Complete Problem(c) NP Problem(d) NP-Complete ProblemThis question was posed to me in homework.I'd like to ask this question from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct CHOICE is (d) NP-Complete PROBLEM

To explain: NP stands for nondeterministic polynomial time. In a bipartite graph, the TESTING of a complete bipartite subgraph in a bipartite graph is an NP-Complete Problem.

12.

Which graph is used to define the claw free graph?(a) Bipartite Graph(b) Claw Graph(c) Star Graph(d) Cartesian GraphI got this question in exam.Question is taken from Bipartite Graphs topic in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct answer is (b) Claw Graph

For EXPLANATION: Star is a complete bipartite graph with one INTERNAL node and K leaves. Star with three edges is CALLED a claw. Hence this graph is USED to define claw free graph.

13.

How many edges does a n vertex triangle free graph contains?(a) n^2(b) n^2 + 2(c) n^2 / 4(d) n^3I have been asked this question during an interview.My doubt stems from Bipartite Graphs topic in division Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT choice is (C) n^2 / 4

The best explanation: A n vertex triangle free graph contains a total of n^2 / 4 NUMBER of EDGES. This is stated by Mantel’s Theorem which is a SPECIAL case in Turan’s theorem for r=2.
14.

Which term defines all the complete bipartite graph that are trees?(a) Symmetric(b) Anti – Symmetric(c) Circular(d) StarsThe question was asked in a job interview.My question comes from Bipartite Graphs topic in portion Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT option is (d) Stars

Best explanation: STAR is a complete bipartite GRAPH with one INTERNAL node and k leaves. Therefore, all complete bipartite graph which is TREES are known as stars in graph theory.
15.

Which structure can be modelled by using Bipartite graph?(a) Hypergraph(b) Perfect Graph(c) Hetero Graph(d) Directed GraphThis question was addressed to me during a job interview.Origin of the question is Bipartite Graphs topic in division Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT answer is (a) HYPERGRAPH

For explanation: A combinatorial structure such as Hypergraph can be MADE using the bipartite graphs. A hypergraph in graph theory is a type of graph in which EDGE can join any NUMBER of vertices.
16.

Which graph is also known as biclique?(a) Histogram(b) Complete Bipartite(c) Cartesian(d) TreeThis question was posed to me in an interview for job.This is a very interesting question from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct ANSWER is (b) COMPLETE BIPARTITE

Easy explanation - A graph is KNOWN as complete bipartite graph if and only if it has all the vertex of FIRST set connected to all the vertex of second set. Complete Bipartite graph is also known as Biclique.

17.

Which type of graph has all the vertex of the first set connected to all the vertex of the second set?(a) Bipartite(b) Complete Bipartite(c) Cartesian(d) PieThis question was addressed to me during an interview.Question is taken from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (b) Complete Bipartite

For explanation: The graph is known as Bipartite if the graph does not contain any ODD LENGTH cycle in it. The complete bipartite graph has all the vertex of first SET CONNECTED to all the vertex of SECOND set.

18.

Every Perfect graph has forbidden graph characterization.(a) True(b) FalseThe question was posed to me during an interview for a job.Query is from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

The CORRECT answer is (a) True

For explanation: Berge THEOREM proves the FORBIDDEN graph characterization of every perfect GRAPHS. Because of that REASON every bipartite graph is perfect graph.

19.

It is possible to have a negative chromatic number of bipartite graph.(a) True(b) FalseThis question was addressed to me by my college director while I was bunking the class.My doubt is from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct option is (B) False

For explanation: A graph is known as bipartite graph if and only if it has the TOTAL chromatic number less than or equal to 2. The smallest number of graphs needed to color the graph is the chromatic number. But the chromatic number cannot be NEGATIVE.

20.

What is the clique size of the line graph of bipartite graph?(a) 0(b) 1(c) 2(d) 3The question was posed to me during a job interview.This interesting question is from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (c) 2

Explanation: The perfect bipartite graph has CLIQUE SIZE 2. So the clique size of COMPLIMENT of LINE Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and EVERY Bipartite Graph is 2.

21.

What is the chromatic number of compliment of line graph of bipartite graph?(a) 0(b) 1(c) 2(d) 3The question was asked during an interview.This interesting question is from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right answer: (C) 2

The perfect bipartite GRAPH has CHROMATIC NUMBER 2. So the COMPLIMENT of Line Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and every Bipartite Graph has chromatic number 2.

22.

Which of the following has maximum clique size 2?(a) Perfect graph(b) Tree(c) Histogram(d) CartesianThe question was asked during an interview.I would like to ask this question from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right ANSWER is (a) PERFECT graph

The best I can explain: The perfect bipartite graph has clique size 2. ALSO, the clique size of COMPLIMENT of LINE Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and every Bipartite Graph is 2.

23.

Which of the following graphs don’t have chromatin number less than or equal to 2?(a) Compliment of Line Graph of Bipartite Graph(b) Compliment of Bipartite Graph(c) Line Graph of Bipartite Graph(d) Wheel graphThis question was posed to me by my school principal while I was bunking the class.The query is from Bipartite Graphs topic in division Bipartite Graphs of Data Structures & Algorithms II

Answer» RIGHT choice is (d) Wheel graph

The best I can explain: The perfect bipartite graph has CHROMATIC number 2. Also, the COMPLIMENT of Line Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and every Bipartite Graph is known as perfect graph in graph theory. Wheel graph Wn has chromatin number 3 if n is odd and 4 if n is even.
24.

Which of the following is not a property of perfect graph?(a) Compliment of Line Graph of Bipartite Graph(b) Compliment of Bipartite Graph(c) Line Graph of Bipartite Graph(d) Line GraphI have been asked this question during an interview.This intriguing question comes from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (d) LINE GRAPH

To explain: TThe COMPLIMENT of Line Graph of Bipartite Graph, Compliment of Bipartite Graph, Line Graph of Bipartite Graph and EVERY Bipartite Graph is known as a perfect graph in graph theory. Normal line graph is not a perfect graph WHEREAS line perfect graph is a graph whose line graph is a perfect graph.

25.

Which theorem gives the relation between the minimum vertex cover and maximum matching?(a) Konig’s Theorem(b) Kirchhoff’s Theorem(c) Kuratowski’s Theorem(d) Kelmans TheoremThis question was posed to me in exam.Asked question is from Bipartite Graphs in division Bipartite Graphs of Data Structures & Algorithms II

Answer»

The CORRECT option is (a) Konig’s Theorem

Explanation: The Konig’s theorem given the EQUIVALENCE relation between the minimum vertex cover and the maximum matching in graph THEORY. BIPARTITE graph has a SIZE of minimum vertex cover equal to maximum matching.

26.

Which graph has a size of minimum vertex cover equal to maximum matching?(a) Cartesian(b) Tree(c) Heap(d) BipartiteI have been asked this question at a job interview.The origin of the question is Bipartite Graphs in division Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT option is (d) BIPARTITE

Explanation: The Konig’s theorem given the equivalence relation between the minimum vertex cover and the MAXIMUM matching in graph theory. Bipartite graph has a SIZE of minimum vertex cover equal to maximum matching.
27.

Which one of the following is the chromatic number of bipartite graph?(a) 1(b) 4(c) 3(d) 5The question was posed to me during an internship interview.My doubt stems from Bipartite Graphs topic in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct choice is (a) 1

The best I can explain: A graph is known as bipartite graph if and only if it has the total CHROMATIC number less than or equal to 2. The SMALLEST number of graphs NEEDED to COLOR the graph is the chromatic number.

28.

Which of the following is not a property of the bipartite graph?(a) No Odd Cycle(b) Symmetric spectrum(c) Chromatic Number Is Less Than or Equal to 2(d) Asymmetric spectrumI had been asked this question in semester exam.This interesting question is from Bipartite Graphs topic in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right option is (d) Asymmetric spectrum

Easiest explanation - A graph is known to be bipartite if it has ODD length cycle number. It also has symmetric spectrum and the bipartite graph CONTAINS the total CHROMATIC number less than or equal to 2.

29.

Which of the following is the correct type of spectrum of the bipartite graph?(a) Symmetric(b) Anti – Symmetric(c) Circular(d) ExponentialI had been asked this question by my school principal while I was bunking the class.My question is based upon Bipartite Graphs topic in division Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right option is (a) Symmetric

To EXPLAIN: The spectrum of the bipartite graph is symmetric in nature. The spectrum is the property of graph that are related to polynomial, Eigen VALUES, Eigen VECTORS of the matrix related to graph.

30.

What type of graph has chromatic number less than or equal to 2?(a) Histogram(b) Bipartite(c) Cartesian(d) TreeI have been asked this question in a job interview.My question comes from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right answer is (B) Bipartite

Explanation: A GRAPH is known as bipartite graph if and only if it has the total chromatic number less than or equal to 2. The smallest number of GRAPHS needed to COLOR the graph is chromatic number.

31.

Which type of graph has no odd cycle in it?(a) Bipartite(b) Histogram(c) Cartesian(d) PieI have been asked this question during an online interview.This intriguing question originated from Bipartite Graphs topic in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right OPTION is (a) BIPARTITE

For EXPLANATION: The GRAPH is known as Bipartite if the graph does not contain any odd length cycle in it. Odd length cycle MEANS a cycle with the odd number of vertices in it.

32.

A graph is found to be 2 colorable. What can be said about that graph?(a) The given graph is eulerian(b) The given graph is bipartite(c) The given graph is hamiltonian(d) The given graph is planarI have been asked this question in semester exam.My enquiry is from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct option is (b) The given graph is bipartite

The best I can explain: A graph is said to be colorable if two vertices connected by an EDGE are never of the same COLOR. 2 colorable MEAN that this can be ACHIEVED with just 2 COLORS.

33.

Can there exist a graph which is both eulerian and is bipartite?(a) Yes(b) No(c) Yes if it has even number of edges(d) Nothing can be saidI got this question by my school teacher while I was bunking the class.My doubt is from Bipartite Graphs topic in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right choice is (a) Yes

For explanation: If a graph is such that there exists a path which visits every EDGE ATLEAST once, then it is said to be EULERIAN. Taking an example of a square, the GIVEN question EVALUATES to yes.

34.

Given that a graph contains no odd cycle. Is it enough to tell that it is bipartite?(a) Yes(b) NoThe question was asked at a job interview.Question is from Bipartite Graphs in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct OPTION is (a) Yes

Explanation: It is REQUIRED that the graph is CONNECTED also. If it is not then it cannot be CALLED a bipartite graph.

35.

A graph has 20 vertices. The maximum number of edges it can have is? (Given it is bipartite)(a) 100(b) 140(c) 80(d) 20This question was posed to me in examination.Question is taken from Bipartite Graphs in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Correct CHOICE is (a) 100

To explain: Let the given bipartition X have x vertices, then Y will have 20-x vertices. We NEED to MAXIMIZE x*(20-x). This will be maxed when x=10.

36.

Are trees bipartite?(a) Yes(b) No(c) Yes if it has even number of vertices(d) No if it has odd number of verticesThe question was asked in an interview for internship.I would like to ask this question from Bipartite Graphs in division Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right CHOICE is (a) Yes

For EXPLANATION: Condition NEEDED is that there should not be an odd cycle. But in a tree there are no CYCLES at all. Hence it is bipartite.

37.

When is a graph said to be bipartite?(a) If it can be divided into two independent sets A and B such that each edge connects a vertex from to A to B(b) If the graph is connected and it has odd number of vertices(c) If the graph is disconnected(d) If the graph has at least n/2 vertices whose degree is greater than n/2This question was addressed to me by my college professor while I was bunking the class.This question is from Bipartite Graphs in chapter Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct choice is (a) If it can be DIVIDED into two independent SETS A and B such that each edge CONNECTS a vertex from to A to B

For EXPLANATION: A graph is said to be bipartite if it can be divided into two independent sets A and B such that each edge connects a vertex from A to B.

38.

A complete bipartite graph is a one in which each vertex in set X has an edge with set Y. Let n be the total number of vertices. For maximum number of edges, the total number of vertices hat should be present on set X is?(a) n(b) n/2(c) n/4(d) data insufficientThe question was posed to me in an online quiz.Query is from Bipartite Graphs topic in portion Bipartite Graphs of Data Structures & Algorithms II

Answer» CORRECT option is (b) n/2

To EXPLAIN: We can prove this by calculus. Let x be the TOTAL number of vertices on set X. Therefore set Y will have n-x. We have to maximize x*(n-x). This is TRUE when x=n/2.
39.

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.

40.

A k-regular bipartite graph is the one in which degree of each vertices is k for all the vertices in the graph. Given that the bipartitions of this graph are U and V respectively. What is the relation between them?(a) Number of vertices in U=Number of vertices in V(b) Number of vertices in U not equal to number of vertices in V(c) Number of vertices in U always greater than the number of vertices in V(d) Nothing can be saidThe question was posed to me in unit test.Question is from Bipartite Graphs topic in portion Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right CHOICE is (a) NUMBER of vertices in U=Number of vertices in V

Easiest EXPLANATION - We KNOW that in a bipartite graph sum of DEGREES of vertices in U=sum of degrees of vertices in V. Given that the graph is a k-regular bipartite graph, we have k*(number of vertices in U)=k*(number of vertices in V).

41.

Given G is a bipartite graph and the bipartitions of this graphs are U and V respectively. What is the relation between them?(a) Number of vertices in U = Number of vertices in V(b) Sum of degrees of vertices in U = Sum of degrees of vertices in V(c) Number of vertices in U > Number of vertices in V(d) Nothing can be saidThe question was asked in a job interview.Enquiry is from Bipartite Graphs topic in section Bipartite Graphs of Data Structures & Algorithms II

Answer»

The correct answer is (b) Sum of degrees of vertices in U = Sum of degrees of vertices in V

Easiest explanation - We can prove this by INDUCTION. By adding one edge, the degree of vertices in U is EQUAL to 1 as well as in V. Let us assume that this is true for n-1 edges and ADD one more edge. Since the given edge ADDS exactly once to both U and V we can tell that this statement is true for all n vertices.