GATE 2008
185 questions
MCQ 1851-mark 52 · 2-mark 133
Questions 41–45 of 185
Answer: (C)
The n vertices are split into at most 4 colour classes, so the largest class has at least vertices. A colour class has no edges inside it, so it is an independent set.
The vertices outside an independent set form a vertex cover (every edge has an end outside it). So there is a vertex cover of size at most . This holds for every planar graph, so (C) is true.
(A) is false: two vertices with no edge form a planar graph that is not connected.
(B) is false: a single edge (n = 2) is planar, but both vertices have odd degree 1, so there is no Euler circuit.
(D) is false: is planar and its largest independent set has size 1, which is less than .
Answer: (C)
Answer: (C)
The graph has edges M-N, N-O, M-Q, N-Q, M-R, Q-P and O-P. In BFS, the neighbours of the start node come first, then the new neighbours of those nodes, in the order in which those nodes were queued.
A. MNOPQR: start at M. Its neighbours N, Q and R must be the next three nodes, but O comes third. Not BFS.
B. NQMPOR: start at N. Its neighbours M, O and Q must be the next three nodes, but P comes fourth and O is after it. Not BFS.
C. QMNPRO: start at Q. Queue after Q: M, N, P (Q's neighbours). Visit M: its new neighbour R is added, queue N, P, R. Visit N: its new neighbour O is added, queue P, R, O. Then P (nothing new), R, O. The order is Q, M, N, P, R, O. This is valid.
D. QMNPOR: after Q the queue is M, N, P. M is ahead of N, so M's neighbour R must be queued before N's neighbour O. So R must come before O. Not BFS.
Answer: (C)
Answer: (C)
Run DFS (or BFS) from any unvisited vertex, mark everything it reaches, and repeat from the next unvisited vertex. The number of times a new search is started is the number of connected components.
Each vertex is visited once and each edge is examined a constant number of times (twice, once from each end), so the total time is .
No cheaper bound works. Isolated vertices are components of their own, so all vertices must be looked at, which rules out when . Every edge must also be read, because a single edge can join two parts, which rules out . is slower than needed.
Answer: (C)
Answer: (D)
Start with the expression:
Take common from the first two terms:
Use :
By De Morgan's law, :
A set joined with its complement is the universal set: .
Answer: (D)
The function is
Answer: (A)
Groups from the K-map:
(2, 3, 6, 7):
(2, 3, 10, 11):
(8, 9, 12, 13):
These cover all ten minterms, so
The variable D does not appear in any term, while A, B and C do. So f is independent of exactly one variable, D.
Answer: (A)