GATE 2006
191 questions
MCQ 1911-mark 191
Questions 6–10 of 191
Consider the following propositional statements:
Which one of the following is true?
Which one of the following is true?
Answer: (D)
Rewrite :
So the right side of P2 should have , not . A counterexample: false, true, false. Left side: is false. Right side: is true. The two sides differ, so P2 is not a tautology.
For P1, take true, false, false. Left side: is , which is true. Right side: is , which is false. So P1 is not a tautology either.
Answer: (D)
So the right side of P2 should have , not . A counterexample: false, true, false. Left side: is false. Right side: is true. The two sides differ, so P2 is not a tautology.
For P1, take true, false, false. Left side: is , which is true. Right side: is , which is false. So P1 is not a tautology either.
Answer: (D)
Which one of the first order predicate calculus statements given below correctly expresses the following English statement?
Tigers and lions attack if they are hungry or threatened.
Tigers and lions attack if they are hungry or threatened.
Answer: (D)
Meaning: for any animal that is a tiger or a lion, if it is hungry or threatened then it attacks. That is .
The "and" in "tigers and lions" means "tigers or lions" for each animal.
(A) uses , which needs one animal to be both a tiger and a lion. Wrong.
(B) says every tiger or lion is hungry or threatened and also attacks, so it attacks always. The sentence only says it attacks if hungry or threatened.
(C) says an attack happens only when the animal is both hungry and threatened. The implication is reversed and it uses where the sentence has "or".
Answer: (D)
The "and" in "tigers and lions" means "tigers or lions" for each animal.
(A) uses , which needs one animal to be both a tiger and a lion. Wrong.
(B) says every tiger or lion is hungry or threatened and also attacks, so it attacks always. The sentence only says it attacks if hungry or threatened.
(C) says an attack happens only when the animal is both hungry and threatened. The implication is reversed and it uses where the sentence has "or".
Answer: (D)
A set X can be represented by an array x[n] as follows
Consider the following algorithm in which x,y and z are boolean arrays of size n;
Consider the following algorithm in which x,y and z are boolean arrays of size n;
algorithm zzz(x[] , y[], z [])
{
int i;
for (i=O; i < n; ++i)
z[i] = (x[i] ^ ~y[i]) V (~x[i] ^ y[i])
}
The set Z computed by the algorithm isAnswer: (D)
Correct Option: D
The for loop in the algorithm uses this logical expression:
z[i] = (x[i] ∧ ~y[i]) ∨ (~x[i] ∧ y[i]);
Now write the same expression in set form. Let us take . Then we get:
Let E,F and G be finite sets.
Let X=(E F) - (FG) and Y = (E - (EG)) - (E - F).
Which one of the following is true?
Let X=(E F) - (FG) and Y = (E - (EG)) - (E - F).
Which one of the following is true?
Answer: (C)
Set X: . Taking away from removes the part of that lies in . So , the part of outside (first figure).
Set Y: .
- (second figure).
- is the part of outside (third figure).
- Taking away from leaves (last figure).
So .
Answer: (C)
Set Y: .
- (second figure).
- is the part of outside (third figure).
- Taking away from leaves (last figure).
So .
Answer: (C)
Let X, Y, Z be sets of sizes x, y and z respectively. Let W=XY and E be the
set of all subsets of W. The number of functions from Z to E is
Answer: (D)
, so E, the set of all subsets of W, has elements.
A function from a set of elements to a set of elements gives each of the elements one of values, so there are such functions.
Here and , so the number of functions from Z to E is .
Answer: (D)
A function from a set of elements to a set of elements gives each of the elements one of values, so there are such functions.
Here and , so the number of functions from Z to E is .
Answer: (D)