GATE 2006
191 questions
MCQ 1911-mark 191
Questions 16–20 of 191
Which of the following is the correct decomposition of the directed graph given below into its strongly connected components?
Answer: (B)
Edges: P to Q, P to R, Q to R, Q to V, Q to T, V to T, R to T, R to S, T to S, T to U, S to U, S to P.
Big component: the cycle P to Q to V to T to S to P contains P, Q, V, T and S. The cycle P to R to S to P adds R. So P, Q, R, S, T and V all reach each other and form one strongly connected component.
U: U has no outgoing edge, so it cannot reach anything. It is a component by itself.
So the components are {P, Q, R, S, T, V} and {U}. Option C is wrong because it leaves R out, but R is on the cycle P to R to S to P. Option A is wrong because T and V are on a cycle with P, Q and S. Option D is wrong because U cannot reach the others.
Answer: (B)
Big component: the cycle P to Q to V to T to S to P contains P, Q, V, T and S. The cycle P to R to S to P adds R. So P, Q, R, S, T and V all reach each other and form one strongly connected component.
U: U has no outgoing edge, so it cannot reach anything. It is a component by itself.
So the components are {P, Q, R, S, T, V} and {U}. Option C is wrong because it leaves R out, but R is on the cycle P to R to S to P. Option A is wrong because T and V are on a cycle with P, Q and S. Option D is wrong because U cannot reach the others.
Answer: (B)
Consider the undirected graph G defined as follows. The vertices of G are bit strings of length n. We have an edge between vertex u and vertex v if and only if u and v differ in exactly one bit position (in other words, v can be obtained from u by flipping a single bit). The ratio of the chromatic number of G to the diameter of G is,
Answer: (C)
This graph is the n-dimensional hypercube. Two vertices are joined when their bit strings differ in exactly one position.
Chromatic number: each edge flips one bit, so it changes the number of 1s by exactly one, and the parity of the number of 1s changes. Colour the strings with an even number of 1s with colour 1 and the others with colour 2. Every edge joins different colours. There is at least one edge, so one colour is not enough. The chromatic number is 2.
Diameter: the shortest path between two strings has length equal to the number of positions where they differ. The most different pair is 00...0 and 11...1, which differ in all n positions. So the diameter is n.
Ratio .
Answer: (C)
Chromatic number: each edge flips one bit, so it changes the number of 1s by exactly one, and the parity of the number of 1s changes. Colour the strings with an even number of 1s with colour 1 and the others with colour 2. Every edge joins different colours. There is at least one edge, so one colour is not enough. The chromatic number is 2.
Diameter: the shortest path between two strings has length equal to the number of positions where they differ. The most different pair is 00...0 and 11...1, which differ in all n positions. So the diameter is n.
Ratio .
Answer: (C)
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a
Answer: (D)
- Hamiltonian cycle This is a cycle. A cycle connects all vertices, but it has edge more than needed. We can remove that edge and still connect all vertices with a lower cost "subset of edges". So this option is FALSE.
- grid A grid graph has cycles, so this is FALSE for the same reason as option A.
- Hypercube A hypercube graph also has cycles. So this is also FALSE.
- Tree A cheapest connecting set cannot contain a cycle: with positive weights, removing one edge of a cycle keeps all vertices connected and lowers the total weight. So it has no cycle and is connected, which means it is a tree (in fact a minimum spanning tree). This is TRUE.
Answer: (D)
The vertices of graph G correspond to all subsets of a set of size n, for . Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly two elements.
The number of connected components in G is
The number of connected components in G is
Answer: (B)
Isolated vertices: two sets are adjacent only if they share two elements, so a set with fewer than 2 elements has no neighbour. The empty set and the n single-element sets are isolated. That gives components.
All other sets are in one component.
- A set A with is adjacent to {x, y} for any two elements x, y of A, because has exactly 2 elements. So every set of size 3 or more is joined to a 2-element set.
- Two 2-element sets {x, y} and {x, z} are joined through {x, y, z}: and , each of size 2. Any two 2-element sets, such as {a, b} and {c, d}, are joined by the chain {a, b}, {b, c}, {c, d}.
So all sets with 2 or more elements form one component.
Total .
Answer: (B)
All other sets are in one component.
- A set A with is adjacent to {x, y} for any two elements x, y of A, because has exactly 2 elements. So every set of size 3 or more is joined to a 2-element set.
- Two 2-element sets {x, y} and {x, z} are joined through {x, y, z}: and , each of size 2. Any two 2-element sets, such as {a, b} and {c, d}, are joined by the chain {a, b}, {b, c}, {c, d}.
So all sets with 2 or more elements form one component.
Total .
Answer: (B)
The vertices of graph G correspond to all subsets of a set of size n, for . Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly two elements.
The maximum degree of a vertex in G is
The maximum degree of a vertex in G is
Answer: (C)
Let a vertex be a set A with . Its neighbours are the sets B with .
- Choose which 2 elements of A are in B: ways.
- The other elements of A must not be in B.
- Each of the elements outside A can be in B or not: ways.
So the degree is (for the set A itself is counted once, which only lowers that degree by 1 and does not matter for the maximum).
Compare values: , , , . In general , which is at least 1 only for , so f grows up to and then falls. The maximum is .
Option D, , is larger than this and is not reached by any vertex.
Answer: (C)
- Choose which 2 elements of A are in B: ways.
- The other elements of A must not be in B.
- Each of the elements outside A can be in B or not: ways.
So the degree is (for the set A itself is counted once, which only lowers that degree by 1 and does not matter for the maximum).
Compare values: , , , . In general , which is at least 1 only for , so f grows up to and then falls. The maximum is .
Option D, , is larger than this and is not reached by any vertex.
Answer: (C)