GATE 2008
185 questions
MCQ 1851-mark 52 · 2-mark 133
Questions 16–20 of 185
Consider the following Hasse diagrams.
i.
ii.
iii.
iv.
Which all of the above represent a lattice?
i.
ii.
iii.
iv.
Which all of the above represent a lattice?
Answer: (A)
A Hasse diagram is a lattice when every pair of elements has a least upper bound (join) and a greatest lower bound (meet).
- (i) The diamond has a top, a bottom and two incomparable middle elements. Every pair has a join and a meet, so it is a lattice.
- (ii) The two upper-middle elements both lie above two incomparable elements: the single middle element and the bottom element (the middle one has no line down to the bottom). So these two have two lower bounds and no greatest one. Not a lattice.
- (iii) The two upper-middle elements are both above the two lower-middle elements, which are incomparable. So the upper pair has no greatest lower bound (and the lower pair has no least upper bound). Not a lattice.
- (iv) The five-element diagram has a chain of two elements on one side and one element on the other side, between the same top and bottom. Any pair that is not already comparable has the top as join and the bottom as meet. It is a lattice.
So only (i) and (iv) are lattices.
Answer: (A)
- (i) The diamond has a top, a bottom and two incomparable middle elements. Every pair has a join and a meet, so it is a lattice.
- (ii) The two upper-middle elements both lie above two incomparable elements: the single middle element and the bottom element (the middle one has no line down to the bottom). So these two have two lower bounds and no greatest one. Not a lattice.
- (iii) The two upper-middle elements are both above the two lower-middle elements, which are incomparable. So the upper pair has no greatest lower bound (and the lower pair has no least upper bound). Not a lattice.
- (iv) The five-element diagram has a chain of two elements on one side and one element on the other side, between the same top and bottom. Any pair that is not already comparable has the top as join and the bottom as meet. It is a lattice.
So only (i) and (iv) are lattices.
Answer: (A)
Consider the field C of complex numbers with addition and multiplication. Which of the following form(s) a subfield of C with addition and multiplication?
S1: the set of real numbers
S2: and b are rational numbers
S3:
S4:
S1: the set of real numbers
S2: and b are rational numbers
S3:
S4:
Answer: (D)
A set is a field under and when these hold:
1. It is closed under both and
2. and are commutative and associative. (They already are for complex numbers, so we do not need to check.)
3. The additive identity and the multiplicative identity exist in the set.
4. Every element has an additive inverse, and every non-zero element has a multiplicative inverse.
5. is distributive over (also already true for complex numbers).
So for each set we only need to check properties and
(S1) : the set of all real numbers
1. Closed : Yes,
3. Identities : Yes, and are real numbers.
4. Inverses : Yes. For any real number the additive inverse is real, and for the multiplicative inverse is real.
(S2) : and are rational numbers
1. Closed : Yes. The sum has rational real and imaginary parts, and also has rational parts.
3. Identities : Yes, (additive identity) and (multiplicative identity) are in the set.
4. Inverses : The additive inverse is which is in the set. For , the multiplicative inverse is , which is also in the set, as its real and imaginary parts are rational.
(S3) :
1. Closed : No. For example Both numbers added are in the set (their values of are and ), but the sum has , so it is not.
(S4) : is real
This set does not contain (the multiplicative identity). It is not closed under either, since is real.
So (S1) and (S2) are subfields of C.
Answer: (D)
1. It is closed under both and
2. and are commutative and associative. (They already are for complex numbers, so we do not need to check.)
3. The additive identity and the multiplicative identity exist in the set.
4. Every element has an additive inverse, and every non-zero element has a multiplicative inverse.
5. is distributive over (also already true for complex numbers).
So for each set we only need to check properties and
(S1) : the set of all real numbers
1. Closed : Yes,
3. Identities : Yes, and are real numbers.
4. Inverses : Yes. For any real number the additive inverse is real, and for the multiplicative inverse is real.
(S2) : and are rational numbers
1. Closed : Yes. The sum has rational real and imaginary parts, and also has rational parts.
3. Identities : Yes, (additive identity) and (multiplicative identity) are in the set.
4. Inverses : The additive inverse is which is in the set. For , the multiplicative inverse is , which is also in the set, as its real and imaginary parts are rational.
(S3) :
1. Closed : No. For example Both numbers added are in the set (their values of are and ), but the sum has , so it is not.
(S4) : is real
This set does not contain (the multiplicative identity). It is not closed under either, since is real.
So (S1) and (S2) are subfields of C.
Answer: (D)
Consider the following sequence of nodes for the undirected graph given below:
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)?
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)
The edges of the graph are a-b, a-d, b-c, b-d, b-e, c-e, c-f, d-e, d-g, e-f, e-g, f-g. In a DFS, the next vertex visited is an unvisited neighbour of the current vertex. If there is none, DFS goes back to the most recent vertex that still has an unvisited neighbour.
1. a b e f d g c: after f, its unvisited neighbours are c and g, but d is not a neighbour of f. Not a DFS.
2. a b e f c g d: a-b, b-e and e-f are edges. After f, c is an unvisited neighbour. At c, all neighbours (b, e, f) are visited, so DFS goes back to f and then goes to its unvisited neighbour g. From g it goes to d. Valid.
3. a d g e b c f: a-d, d-g, g-e, e-b, b-c and c-f are all edges, and each next vertex is an unvisited neighbour of the previous one. Valid.
4. a d b c g e f: after c, its unvisited neighbours are e and f, but g is not a neighbour of c. Not a DFS.
Only 2 and 3 are possible outputs.
Answer: (B)
1. a b e f d g c: after f, its unvisited neighbours are c and g, but d is not a neighbour of f. Not a DFS.
2. a b e f c g d: a-b, b-e and e-f are edges. After f, c is an unvisited neighbour. At c, all neighbours (b, e, f) are visited, so DFS goes back to f and then goes to its unvisited neighbour g. From g it goes to d. Valid.
3. a d g e b c f: a-d, d-g, g-e, e-b, b-c and c-f are all edges, and each next vertex is an unvisited neighbour of the previous one. Valid.
4. a d b c g e f: after c, its unvisited neighbours are e and f, but g is not a neighbour of c. Not a DFS.
Only 2 and 3 are possible outputs.
Answer: (B)
G is a simple undirected graph. Some vertices of G are of odd degree. Add a node v to G and make it adjacent to each odd degree vertex of G. The resultant graph is sure to be
Answer: (D)
In a simple undirected graph, the sum of all vertex degrees is even, because each edge adds to the total degree. So the count of odd degree vertices must be even. If it were odd, their sum would be odd, and the total degree would be odd too.
Now one new vertex is joined to all these odd degree vertices, and their number is even. So the degree of is even as well. Also, every vertex joined to gets its degree raised by . So the vertices that had odd degree before now have even degree.
Now every vertex in the graph has even degree. This is the necessary and sufficient condition for an Euler graph. So (D) is correct.
What is the size of the smallest MIS (Maximal Independent Set) of a chain of nine nodes
Answer: (C)
The set is a maximal independent set. No two of its nodes are adjacent, and every other node is next to a chosen node, so adding any other node would make the set no longer independent. So an MIS of size exists.
Size is not possible. In a maximal independent set, every node is either in the set or next to a node in it. In a chain, one chosen node covers at most nodes (itself and its two neighbours). So chosen nodes cover at most nodes, and covering all nodes needs , so .
Answer: (C)