GATE 2014 (Session 2)
65 questions
MCQ 42 · NAT 231-mark 30 · 2-mark 35
Questions 61–65 of 65
A cycle on n vertices is isomorphic to its complement. The value of n is _____.
Answer: 5
A cycle has n edges. Its complement has edges. Graphs that are isomorphic must have the same number of edges:
We can check this: the complement of (the pentagram) is again a 5-cycle.
Answer: 5
We can check this: the complement of (the pentagram) is again a 5-cycle.
Answer: 5
The number of distinct minimum spanning trees for the weighted graph below is
Answer: 6
Use Kruskal. The graph has a left group of 6 vertices and a triangle of 3 vertices, joined by the long bottom edge of weight 2.
Weight 1 edges. There are five and none forms a cycle, so all are taken. The components are:
- A: the top-left, centre, left and bottom vertices of the left group (joined through the centre),
- B: the top-right and right vertices of the left group,
- C: the top and bottom-right vertices of the triangle (joined by its weight 1 edge),
- D: the bottom-left vertex of the triangle, alone.
Three more edges of weight 2 are needed to join A, B, C, D.
- A and B: three weight 2 edges join them (the top edge, the top-right to centre edge, and the centre to right edge). Exactly one is taken, so 3 choices. The other two weight 2 edges inside the left group (top-left to left, and left to centre) join vertices already in A, so they form cycles and are rejected.
- A and D: the long bottom edge is the only link to the triangle, so it is forced (1 way).
- D and C: the triangle's two weight 2 edges each join D to C. Exactly one is taken, so 2 choices.
Number of MSTs .
Answer: 6
Weight 1 edges. There are five and none forms a cycle, so all are taken. The components are:
- A: the top-left, centre, left and bottom vertices of the left group (joined through the centre),
- B: the top-right and right vertices of the left group,
- C: the top and bottom-right vertices of the triangle (joined by its weight 1 edge),
- D: the bottom-left vertex of the triangle, alone.
Three more edges of weight 2 are needed to join A, B, C, D.
- A and B: three weight 2 edges join them (the top edge, the top-right to centre edge, and the centre to right edge). Exactly one is taken, so 3 choices. The other two weight 2 edges inside the left group (top-left to left, and left to centre) join vertices already in A, so they form cycles and are rejected.
- A and D: the long bottom edge is the only link to the triangle, so it is forced (1 way).
- D and C: the triangle's two weight 2 edges each join D to C. Exactly one is taken, so 2 choices.
Number of MSTs .
Answer: 6
Which one of the following Boolean expressions is NOT a tautology?
Answer: (B)
Test option 2 by putting a = 0, b = 0, c = 0:
Here , while . So the full expression is , and this means it is not a tautology.
Options 1 (transitivity), 3 and 4 are true every time.
Answer:
Here , while . So the full expression is , and this means it is not a tautology.
Options 1 (transitivity), 3 and 4 are true every time.
Answer:
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below:
Select * from R where a in (select S. a from S)
Select * from R where a in (select S. a from S)
Answer: (C)
The nested query returns each tuple of R once for every copy of it in R, whether S has one matching tuple or many. It only tests if some tuple of S has the same a.
- (A) A plain join repeats an R tuple once for every matching S tuple, so extra duplicates appear.
- (B) DISTINCT also removes duplicates that are really present in R, so it can give fewer rows than the nested query.
- (C) S1 holds each value of a only once, so every R tuple matches at most one row of S1. The R tuples come out exactly as in the nested query, with R's own duplicates kept.
- (D) "is unique R" is not valid SQL syntax.
Answer: (C)
- (A) A plain join repeats an R tuple once for every matching S tuple, so extra duplicates appear.
- (B) DISTINCT also removes duplicates that are really present in R, so it can give fewer rows than the nested query.
- (C) S1 holds each value of a only once, so every R tuple matches at most one row of S1. The R tuples come out exactly as in the nested query, with R's own duplicates kept.
- (D) "is unique R" is not valid SQL syntax.
Answer: (C)
Consider a main memory system that consists of 8 memory modules attached to the system bus, which is one word wide. When a write request is made, the bus is occupied for 100 nanoseconds (ns) by the data, address, and control signals. During the same 100 ns, and for 500 ns thereafter, the addressed memory module executes one cycle accepting and storing the data. The (internal) operation of different memory modules may overlap in time, but only one request can be on the bus at any time. The maximum number of stores (of one word each) that can be initiated in 1 millisecond is ____________
Answer: 10000
A store keeps the bus busy for 100 ns, and its module stays busy for 600 ns. The 8 modules are used one after another. So a module gets its next request only after 8 100 = 800 ns, which is 600 ns. This means the modules never make a request wait.
The bus is the limit here. Only one store can start every 100 ns.
Number of stores in 1 ms:
Answer: 10000
The bus is the limit here. Only one store can start every 100 ns.
Number of stores in 1 ms:
Answer: 10000