GATE 2008
185 questions
MCQ 1851-mark 52 · 2-mark 133
Questions 26–30 of 185
.
What is ?
Answer: (B)
Answer: (B)
Answer: (C)
We need the chance of studying CS on Wednesday.
Required probability:
The answer is option C.
1.a b e f d g c
2.a b e f c g d
3.a d g e b c f
4.a d b c g e f
A Depth First Search (DFS) is started at node a. The nodes are listed in the order they are first visited. Which of the above is/are possible output(s)?
Answer: (B)
1. a b e f d g c: after f, the unvisited neighbours of f are c and g. d is not a neighbour of f, so this is not possible.
2. a b e f c g d: a-b, b-e, e-f, f-c are edges. All neighbours of c (b, e, f) are visited, so c is a dead end and the search goes back to f. Then f-g is an edge, and g-d is an edge. This is possible.
3. a d g e b c f: a-d, d-g, g-e, e-b, b-c, c-f are all edges, and each node is a new neighbour of the one before it. This is possible.
4. a d b c g e f: after c, the unvisited neighbours of c are e and f. g is not a neighbour of c, so this is not possible.
So 2 and 3 only.
Answer: (B)
i.
ii.
iii.
iv.
Which all of the above represent a lattice?
Answer: (A)
(i) A diamond: a top, a bottom and two incomparable middle elements. The two middle elements have the top as join and the bottom as meet, and every other pair is comparable. So it is a lattice.
(ii) The diagram has a top, a left and a right element, a middle element below both of them, and a bottom element that is also below both of them. The middle element and the bottom element are both minimal, so they have no common lower bound and no meet. Also, the left and right elements have two lower bounds, the middle and the bottom, which are incomparable, so there is no greatest lower bound. Not a lattice.
(iii) The two upper middle elements have the two lower middle elements and the bottom as lower bounds. The two lower middle elements are incomparable, so there is no greatest lower bound. In the same way, the two lower middle elements have two incomparable upper bounds, so they have no join. Not a lattice.
(iv) A chain bottom, then a lower left element, then an upper left element, then the top, plus one right element between the bottom and the top. The right element and either left element are incomparable, and their join is the top and their meet is the bottom. Every other pair is comparable. So it is a lattice.
So (i) and (iv) are lattices.
Answer: (A)
Answer: (D)
In a simple undirected graph the sum of all degrees is , which is even. So the number of odd degree vertices is even.
The new vertex is joined to each odd degree vertex, so equals that count, which is even.
Each odd degree vertex gets one more edge, so its degree becomes even. A vertex that already had even degree is not joined to , so its degree stays even.
Now every vertex has even degree. A graph in which all degrees are even is an Euler graph (its edges can be traced in a closed walk, taking the graph as connected).
(A) is wrong because the degrees can differ, so the graph need not be regular. (B) is wrong because adding adds no edges between the old vertices, so the graph need not be complete. (C) is wrong because even degrees do not make a Hamiltonian cycle certain.
Answer: (D)