Skip to content
GATEiit

GATE CSE 2018 Q53: Degree plus ten times components in adjacent-swap permutation graph

Syllabus topic: Graphs: connectivity, matching and colouring

Question

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= _____.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 109 (official GATE 2018 final answer key)

Concept used: A permutation of n items has n − 1 adjacent positions to swap, and adjacent transpositions generate every permutation, so the graph is connected.

Concept notes

Loading notes…

First step: Count the adjacent pairs in a sequence of 100 numbers to get y, then ask whether any permutation can be reached from any other by adjacent swaps (think of bubble sort) to get z.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Graphs: connectivity, matching and colouring

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key