Compilers Multiple Choice Questions & Answers (MCQs) on “Relations”.
1. (a,b) what is a?
a) Domain
b) Range
c) Domain & Range
d) None of the mentioned
Answer: a
Clarification: A is called the domain.
2. (a,b) what is b?
a) Domain
b) Range
c) Domain & Range
d) None of the mentioned
Answer: b
Clarification: B is called the Range.
3. R is said to be reflexive if aRa is true for every a in A.
a) True
b) False
Answer: a
Clarification: All the elements of A are related with itself by relation R, hence it is a reflexive relation.
4. If every aRb implies bRa then a relation R will be a symmetric relation.
a) True
b) False
Answer: a
Clarification: a is related to b by R, and if b is also related to a by the same relation R.
5. If every aRb and bRc implies aRc, then the relation is transitive.
a) True
b) False
Answer: a
Clarification: a is related to b by R, and b is related to c by R, and similarly for a and c.
6. The smallest set A such that A ∪ {1, 2} = {1, 2, 3, 5, 9} is?
a) {2,3,5}
b) {1, 2, 5, 9}
c) {3, 5, 9}
d) None of the mentioned
Answer: c
Clarification: Given A ∪ {1, 2} = {1, 2, 3, 5, 9}. Hence A = {3,5,9}.
7. If a set A has n elements, then the total number of subsets of A is?
a) N
b) 2n
c) N2
d) 2n
Answer: b
Clarification: Number of subsets of A = nC0 + nC1 + . . . . . + nCn = 2n.