Open In App

GATE | GATE CS 2018 | Question 56

Like Article
Like
Save
Share
Report

Let G be a graph with 100! vertices, with each vertex labelled by a distinct permutation of the numbers 1, 2, …, 100. There is an edge between vertices u and v if and only if the label of u can be obtained by swapping two adjacent numbers in the label of v. Let y denote the degree of a vertex in G, and z denote the number of connected components in G. Then y + 10z = _______ . 

Note –This was Numerical Type question.

(A)

109

(B)

110

(C)

119

(D)

None of these


Answer: (A)

Explanation:

There is an edge between vertices u and v if the label of u can be obtained by swapping two adjacent numbers in the label of v. 
Then the set of swapping numbers will be {(1, 2), (2, 3), ………..(9, 9)} 
There will be 99 such sets, i.e. number of edges = 99 
and each vertex will have 99 edges corresponding to it.  

Say graph with 3! vertices, then vertices will be like {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}… Let\’s pick vertex {123}, degree will be 2 since it will be connected with two other vertices {213} and {132}. 
We can conclude that for n, degree will be n-1.

SO, degree of each vertex = 99 (as said y) 
As the vertices are connected together, the number of connected components formed will be 1 (as said z).

 y+10z = 99+10(1) = 109


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 09 Mar, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads