MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the number of vertices of degree 2 in a path graph having n vertices, here n>2.
A
n
B
n-2
C
0
D
2
Explanation: 

Detailed explanation-1: -6. What is the number of vertices of degree 2 in a path graph having n vertices, here n>2. Explanation: Only the first and the last vertex would have degree 1, others would be of degree 2. 7.

Detailed explanation-2: -Simple Graph The number of simple graphs possible with ā€˜nā€™ vertices = 2nc2 = 2n(n-1)/2.

Detailed explanation-3: -A graph has an Euler path if and only if there are at most two vertices with odd degree.

Detailed explanation-4: -Solution: The sum of the degrees of the vertices is 610 = 60. According to the Handshaking Theorem, it follows that 2e = 60, so there are 30 edges.

There is 1 question to complete.