Vertex Coloring Multiple Choice Questions and Answers (MCQs)

This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Vertex Coloring”.

1. Which of the following is not a type of graph in computer science?
a) undirected graph
b) bar graph
c) directed graph
d) weighted graph
View Answer

Answer: b
Explanation: According to the graph theory a graph is the collection of dots and lines. A bar graph is not a type of graph in computer science.

2. What is vertex coloring of a graph?
a) A condition where any two vertices having a common edge should not have same color
b) A condition where any two vertices having a common edge should always have same color
c) A condition where all vertices should have a different color
d) A condition where all vertices should have same color
View Answer

Answer: a
Explanation: The condition for vertex coloring of a graph is that two vertices which share a common edge should not have the same color. If it uses k colors in the process then it is called k coloring of graph.

3. How many edges will a tree consisting of N nodes have?
a) Log(N)
b) N
c) N – 1
d) N + 1
View Answer

Answer: c
Explanation: In order to have a fully connected tree it must have N-1 edges. So the correct answer will be N-1.
advertisement
advertisement

4. Minimum number of unique colors required for vertex coloring of a graph is called?
a) vertex matching
b) chromatic index
c) chromatic number
d) color number
View Answer

Answer: c
Explanation: The minimum number of colors required for proper vertex coloring of graph is called chromatic number whereas the minimum number of colors required for proper edge coloring of graph is called chromatic index of a graph.

5. How many unique colors will be required for proper vertex coloring of an empty graph having n vertices?
a) 0
b) 1
c) 2
d) n
View Answer

Answer: b
Explanation: An empty graph is a graph without any edges. So the number of unique colors required for proper coloring of the graph will be 1.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. How many unique colors will be required for proper vertex coloring of a bipartite graph having n vertices?
a) 0
b) 1
c) 2
d) n
View Answer

Answer: c
Explanation: A bipartite graph is a graph such that no two vertices of the same set are adjacent to each other. So the number of unique colors required for proper coloring of the graph will be 2.

7. Which of the following is an NP complete problem?
a) Hamiltonian cycle
b) Travelling salesman problem
c) Calculating chromatic number of graph
d) Finding maximum element in an array
View Answer

Answer: c
Explanation: Calculating the chromatic number of a graph is an NP complete problem as a chromatic number of an arbitrary graph cannot be determined by using any convenient method.
advertisement

8. How many unique colors will be required for proper vertex coloring of a line graph having n vertices?
a) 0
b) 1
c) 2
d) n
View Answer

Answer: d
Explanation: A line graph of a simple graph is obtained by connecting two vertices with an edge. So the number of unique colors required for proper coloring of the graph will be n.

9. How many unique colors will be required for proper vertex coloring of a complete graph having n vertices?
a) 0
b) 1
c) n
d) n!
View Answer

Answer: c
Explanation: A complete graph is the one in which each vertex is directly connected with all other vertices with an edge. So the number of unique colors required for proper coloring of the graph will be n.
advertisement

10. Minimum number of colors required for proper edge coloring of a graph is called?
a) Chromatic color
b) Chromatic index
c) Edge matching
d) Color number
View Answer

Answer: b
Explanation: The minimum number of colors required for proper edge coloring of graph is called chromatic index. It is also known as edge chromatic number.

11. What will be the chromatic number of the following graph?
The chromatic number of the following graph is 2 & require 2 unique colors
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: The given graph will only require 2 unique colors so that no two vertices connected by a common edge will have the same color. All nodes will have the same color except the central node.

12. How many unique colors will be required for vertex coloring of the following graph?
The graph will require 4 unique colors so that no two vertices connected by common edge
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: c
Explanation: The given graph will require 4 unique colors so that no two vertices connected by a common edge will have the same color. So its chromatic number will be 4.

13. How many unique colors will be required for vertex coloring of the following graph?
Graph will require 3 unique colors because two diagonal vertex are connected to each other
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: b
Explanation: The given graph will require 3 unique colors because two diagonal vertex are connected to each other directly. So its chromatic number will be 3.

14. Vertex coloring and chromatic number are one and the same.
a) True
b) False
View Answer

Answer: b
Explanation: Vertex coloring of a graph is an assignment of colors to the vertices of a graph such that no two adjacent vertices have the same color. Whereas chromatic number refers to the minimum number of unique colors required for vertex coloring of the graph.

Sanfoundry Global Education & Learning Series – Data Structures & Algorithms.

To practice all areas of Data Structures & Algorithms, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.