GATE 2005
203 questions
MCQ 2031-mark 203
Questions 41–45 of 203
Answer: (C)
Since , the value of is always a value of .
(C) is true. Let be onto and take any . Then for some . So is the image under of , and every is hit by . So is onto.
Counterexample for the others. Take , , , , . Then is onto, but is not onto (nothing maps to ). So (B) and (D) fail.
For (A), take , , , , , . Then is onto, but never reaches , so is not onto.
Answer: (D)
The figures show a DFS forest with its tree edges (solid) for an example graph. Here 8 vertices and 6 tree edges give trees in the forest.
In general, the DFS forest has one tree for each time DFS is started from an unvisited vertex. For an undirected graph (which is what "connected components" refers to), one DFS from a vertex visits its whole component, so each tree is a spanning tree of exactly one component.
Let there be c components, with vertices each. A tree on vertices has edges, so
, which gives .
(For a directed graph, n - k only counts the trees of the DFS forest. It need not equal the number of components, as the example shows: it is weakly connected but has 2 trees.)
Answer: (D)
Answer: (B)
Blue, Green, Red
The number of such orders is
Next, the chance of Blue on the first draw, Green on the second and Red on the third:
So the required probability
Correct Answer:
Answer: (D)
Each bit of one string equals the matching bit of the other with probability , and the bits are independent.
Method 1. Let be the number of positions where the strings differ. Mismatch and match both have probability at each place, so
The strings are not identical when is from to :
Method 2. The probability that all places match is . So the probability that the strings are not identical is .
Answer: (D)Answer: (A)
Box P: red out of balls. Box Q: red out of balls. and .
Joint probabilities (box chosen and red ball drawn):
Total probability of red:
By Bayes' rule: