GATE 2001
60 questions
MCQ 601-mark 60
Questions 11–15 of 60
Consider the undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r . Let d(r,u) and d(r,v) be the lengths of the shortest paths form r to u and v respectively in G. If u is visited before v during the breadth-first traversal, which of the following statements is correct ?
Answer: (B)
BFS visits vertices level by level. It removes first, then all vertices at distance 1, then all at distance 2, and so on, because the queue holds vertices in non-decreasing order of distance from . Each vertex is first reached along a shortest path, so its BFS level is .
So if is visited before , there are two cases: is in an earlier level, so , or both are in the same level, so . Both give .
(A) is wrong because the two can be at equal distance. (C) is wrong because a vertex at greater distance is never visited first.
Answer: (B)
So if is visited before , there are two cases: is in an earlier level, so , or both are in the same level, so . Both give .
(A) is wrong because the two can be at equal distance. (C) is wrong because a vertex at greater distance is never visited first.
Answer: (B)
Seven (distinct) car accidents occurred in a week. What is the probability that they all occurred on the same day?
Answer: (B)
Each of the 7 distinct accidents can happen on any of the 7 days, so the total number of equally likely outcomes is .
For all accidents to fall on the same day, we choose that day in 7 ways. Then every accident goes on that day, in 1 way. So there are 7 favourable outcomes.
Option (A), , is the probability that all accidents fall on one particular day, such as Monday. The question allows any day, so we multiply by 7.
Answer: (B)
For all accidents to fall on the same day, we choose that day in 7 ways. Then every accident goes on that day, in 1 way. So there are 7 favourable outcomes.
Option (A), , is the probability that all accidents fall on one particular day, such as Monday. The question allows any day, so we multiply by 7.
Answer: (B)
Let be a function, and let E and F be subsets of A. Consider the following statements about images.
Which of the following is true about S1 and S2?
Which of the following is true about S1 and S2?
Answer: (A)
S1 is true. Take any . Then means for some . That means or , so or . This is the same as . Every step works in both directions, so always.
S2 is false. Only holds in general. Take and with
Then , so . But . So the two sides differ.
So only S1 is correct.
Answer: (A)
S2 is false. Only holds in general. Take and with
Then , so . But . So the two sides differ.
So only S1 is correct.
Answer: (A)
Consider the following statements:
S1: There exists infinite sets A, B, C such that is finite.
S2: There exists two irrational numbers x and y such that (x+y) is rational.
Which of the following is true about S1 and S2?
S1: There exists infinite sets A, B, C such that is finite.
S2: There exists two irrational numbers x and y such that (x+y) is rational.
Which of the following is true about S1 and S2?
Answer: (C)
Take This set is finite, but and are all infinite.
So is True.
Now Choose and both of these are irrational.
Their sum is and this is rational.
So is True.
Answer:
So is True.
Now Choose and both of these are irrational.
Their sum is and this is rational.
So is True.
Answer:
How many 4-digit even numbers have all 4 digits distinct?
Answer: (B)
A 4-digit number cannot start with 0, and the number is even when its last digit is 0, 2, 4, 6 or 8. All four digits must be different. Split by the last digit.
Case 1: the last digit is 0. The first digit has 9 choices (1 to 9), the second has 8 and the third has 7. This gives numbers.
Case 2: the last digit is 2, 4, 6 or 8. The last digit has 4 choices. The first digit cannot be 0 or the last digit, so it has 8 choices. The second digit can be any digit not yet used. Now 0 is allowed again, so it has choices. The third digit has 7 choices. This gives numbers.
Total .
Answer: (B)
Case 1: the last digit is 0. The first digit has 9 choices (1 to 9), the second has 8 and the third has 7. This gives numbers.
Case 2: the last digit is 2, 4, 6 or 8. The last digit has 4 choices. The first digit cannot be 0 or the last digit, so it has 8 choices. The second digit can be any digit not yet used. Now 0 is allowed again, so it has choices. The third digit has 7 choices. This gives numbers.
Total .
Answer: (B)