GATE 2003
107 questions
MCQ 1071-mark 107
Questions 31–35 of 107
m identical balls are to be placed in n distinct bags. You are given that m kn, where k is a natural number 1. In how many ways can the balls be placed in the bags if each bag must contain at least k balls?
Answer: (B)
Each bag must hold at least balls. So first put balls in every bag. That uses balls.
Now balls are left.
We can now use the balls sticks method
There are bags, so variables. Together they must add up to . There is no limit on how many balls go in each bag
Solving this, we get
Correct Answer:
Now balls are left.
We can now use the balls sticks method
There are bags, so variables. Together they must add up to . There is no limit on how many balls go in each bag
Solving this, we get
Correct Answer:
Consider the following formula
and its two interpretations
I1: Domain : the set of natural numbers
is a prime number
divides x
I2; same as I1 except that is a composite number.
Which of the following statements is true?
I1: Domain : the set of natural numbers
is a prime number
divides x
I2; same as I1 except that is a composite number.
Which of the following statements is true?
Answer: (D)
Formula given:
Note: It is known that is always True. So is always False.
Take the Left-Hand Side (LHS) first:
is always False, so we put that in:
Use the rule . This gives:
So the whole LHS becomes:
Now read it: says that no value of divides . This is clearly false, because:
- There is always at least one value (for example or ) that divides
So is false, and:
So the LHS turns into:
The full formula is now:
This implication is true in every case, since any statement implies itself.
Conclusion:
The formula is always true, whatever stands for. It can be prime numbers, composite numbers, and so on.
The formula is always true, whatever stands for. It can be prime numbers, composite numbers, and so on.
✅ So both I₁ and I₂ satisfy .
Correct Option: D
Which of the following is a valid first order formula? (Here and are first order formulae with x as their only free variable)
Answer: (D)
A formula is valid only if it is true in every interpretation. So for A, B and C one counterexample is enough. Take a domain of numbers, let mean "is a multiple of 3" and mean "is a multiple of 4".
(A) Take . is false, because 8 is not a multiple of 3. So is true. But is false, because 3 is a multiple of 3 and not of 4. A true statement implies a false one, so A is not valid.
(B) Take . is true, but is false, because no member of is a multiple of 4. So B is not valid.
(C) Take . is false, because 7 is neither, so is true. But is false, because 7 is not a multiple of 3. So C is not valid.
(D) Assume and . For any , is true and is true, so is true. As is arbitrary, holds. So D is true in every interpretation, and it is valid.
The converse of D is not valid: for with "even" and "multiple of 4", is false, so is true, while is false.
Answer: (D)
(A) Take . is false, because 8 is not a multiple of 3. So is true. But is false, because 3 is a multiple of 3 and not of 4. A true statement implies a false one, so A is not valid.
(B) Take . is true, but is false, because no member of is a multiple of 4. So B is not valid.
(C) Take . is false, because 7 is neither, so is true. But is false, because 7 is not a multiple of 3. So C is not valid.
(D) Assume and . For any , is true and is true, so is true. As is arbitrary, holds. So D is true in every interpretation, and it is valid.
The converse of D is not valid: for with "even" and "multiple of 4", is false, so is true, while is false.
Answer: (D)
Let (S,) be a partial order with two minimal elements a and b, and a maximum element c.
Let P:S {True, False} be a predicate defined on S . Suppose that P(a) = True, P(b) =False and P(x) p(y) for all x,y S satisfying xy, where stands for logical implication. Which of the following statements CANNOT be true?
Let P:S {True, False} be a predicate defined on S . Suppose that P(a) = True, P(b) =False and P(x) p(y) for all x,y S satisfying xy, where stands for logical implication. Which of the following statements CANNOT be true?
Answer: (D)
The predicate is upward closed: if is True and , then must be True. A False value is not forced upward.
(D) says False for every with and . Since is the maximum, and , so is included and would need False. But True and force True. So (D) cannot be true.
Take with and , and True, False. The implication holds: gives True True, and has a False start. This fits:
(A) True for all , that is and .
(B) False for all , that is only .
(C) False for with , that is only .
Answer: (D)
(D) says False for every with and . Since is the maximum, and , so is included and would need False. But True and force True. So (D) cannot be true.
Take with and , and True, False. The implication holds: gives True True, and has a False start. This fits:
(A) True for all , that is and .
(B) False for all , that is only .
(C) False for with , that is only .
Answer: (D)
Consider the following graph
Among the following sequences
(I) a b e g h f
(II) a b f e h g
(III) a b f h g e
(IV) a f g h b e
Which are depth first traversals of the above graph?
Among the following sequences
(I) a b e g h f
(II) a b f e h g
(III) a b f h g e
(IV) a f g h b e
Which are depth first traversals of the above graph?
Answer: (D)
In a DFS, each next vertex is an unvisited neighbour of the current vertex. If the current vertex has none, DFS goes back along the path to the nearest vertex that still has an unvisited neighbour. Edges: a-b, a-e, a-f, b-e, b-f, b-h, e-g, f-h, f-g, g-h.
(I) a b e g h f: each step is an edge (a-b, b-e, e-g, g-h, h-f), and every vertex is a new one. Valid.
(II) a b f e h g: after the next vertex is , but is not adjacent to . DFS could only move from if all its neighbours were visited, but and are still unvisited. Not valid.
(III) a b f h g e: edges a-b, b-f, f-h, h-g, g-e all exist. Valid.
(IV) a f g h b e: edges a-f, f-g, g-h, h-b, b-e all exist. Valid.
So I, III and IV are DFS traversals.
Answer: (D)
(I) a b e g h f: each step is an edge (a-b, b-e, e-g, g-h, h-f), and every vertex is a new one. Valid.
(II) a b f e h g: after the next vertex is , but is not adjacent to . DFS could only move from if all its neighbours were visited, but and are still unvisited. Not valid.
(III) a b f h g e: edges a-b, b-f, f-h, h-g, g-e all exist. Valid.
(IV) a f g h b e: edges a-f, f-g, g-h, h-b, b-e all exist. Valid.
So I, III and IV are DFS traversals.
Answer: (D)