GATE 2006
191 questions
MCQ 1911-mark 191
Questions 31–35 of 191
Answer: (D)
The smallest number in is exactly when are all not chosen and is chosen. This has probability
.
The value then is . So the expected value is
.
(The empty sample, which has probability , has no smallest number and is left out.)
Answer: (D)
It is required that the codewords have at most 1 leading and at most 1 trailing zero.
How many are such codewords possible?
Answer: (C)
A -bit codeword has possibilities. "At most 1 leading zero" means the first two bits are not both . "At most 1 trailing zero" means the last two bits are not both . Count the bad words and remove them.
- First two bits zero: , so
- Last two bits zero: , so
- Both: , so
- Bad words (first OR last two bits zero):
Valid codewords .
Answer: (C)
Which one of the following statements is TRUE about the graph?
Answer: (D)
In DFS a vertex stays open during . Any vertex first visited while is open is reached through , so it is a descendant of and in the same component.
P and Q: Q's interval lies inside P's interval . So Q was found while P was open, Q is a descendant of P, and P and Q are connected.
R: its interval starts after P finished at time and does not overlap P or Q. If there were an edge from R to P or to Q, R was still unvisited while P and Q were open, so the search would have gone to R before they finished. So there is no such edge, and the search had to restart at R. R is a separate component.
So there are two components, {P, Q} and {R}. (A) is wrong because R is apart from P and Q. (B) and (C) are wrong because they join R to P or Q.
Answer: (D)Answer: (B)
Cycles: P→Q→V→T→S→P and P→R→S→P. P lies on both. So P, Q, V, T, S, R can all reach each other through P, and they form one component .
U has no outgoing edge, so it cannot reach anything and is a component by itself.
(A) splits T and V off, but both lie on the cycle through S. (C) leaves R out, but R lies on P→R→S→P. (D) joins U to the rest, but U cannot reach any vertex.
Answer: (B)
Answer: (C)
Chromatic number: flipping one bit changes the number of 1s by exactly 1, so it changes its parity. Colour a string by the parity of its number of 1s (2 colours). Adjacent strings then get different colours, so 2 colours are enough. At least 2 are needed because there is an edge (for n ≥ 1). So the chromatic number is 2.
Diameter: the shortest path between two strings has as many edges as the number of positions where they differ, since each edge fixes one position. The largest such number is n, for example between 00...0 and 11...1. So the diameter is n.
Ratio = .
Answer: (C)