MCQ Computer Science

Compilers Questions and Answers – Relations

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Relations ”.

 

  1. (a,b) what is a?

a) Domain

b) Range

c) All of the mentioned

d) None of the mentioned

Answer

 

Answer: a

Explanation: A is called the domain.

  1. (a,b) what is b?

a) Domain

b) Range

c) All of the mentioned

d) None of the mentioned

Answer

 

Answer: b

Explanation: B is called the Range.

  1. R is said to be reflexive if aRa is true for every a in A;

a) True

b) False

Answer

 

Answer: a

Explanation: All the elements of A are related with

itself by relation R, hence it is a reflexive relation.

  1. If every aRb implies bRa then a relation R will be a symmetric relation.

a) True

b) False

Answer

 

Answer: a

Explanation: a is related to b by R, and if b is also related to a by the

same relation R).

  1. If every aRb and bRc implies aRc, then the relation is transitive

a) True

b) False

Answer

 

Answer: a

Explanation: a is related to b by R, and b is related to c by R, and similarly for a and c.

  1. 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

 

Answer: c

Explanation: Given A ? {1, 2} = {1, 2, 3, 5, 9}. Hence A = {3,5,9}.

  1. 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

 

Answer: c

Explanation: Number of subsets of A = nC0 + nC1+ . . . . . + nCn = 2n.

8. If A n B = B, then

a) A ? B

b) A = ø

c) B ? A

d) B = ø

Answer

 

Answer: c

Explanation: Since A n B = B , hence B ? A .

9. Empty set is a

a) Invalid set

b) Infinite set

c) Finite set

d) None of the mentioned

Answer

 

Answer: c

Explanation: Empty set is a finite set.

10. If A, B and C are any three sets, then A – (B ? C) is equal to

a) (A – B) ? (A – C)

b) (A – B) ? C

c) (A – B) n (A – C)

d) (A – B) n C

Answer

Answer: c

Explanation: it is De’ Morgan law.

11. A = {x: x ? x }represents

a) {0].

b) {1}

c) {}

d) {x}

Answer

 

Answer: c

Explanation: That is a fact.

12. If A, B, C be three sets such that A ? B = A ? C and A n B = A n C, then

a) A=B

b) A=C

c) B=C

d) A=B=C

Answer

 

Answer: c

Explanation: Transition Law.

13. The number of proper subsets of the set {1, 2, and 3} is.

a) 8

b) 6

c) 7

d) 5

Answer

 

Answer: b

Explanation: Number of proper subsets of the set {1, 2, 3) = 2³ – 2 = 6.

14. If A and B are any two sets, then A ? (A n B) is equal to

a) A

b) B

c) A^C

d) B^C

Answer

 

Answer: a

Explanation: A n B ? A Hence A ? (A n B) = A.

15. If A, B and C are any three sets, then A × (B ? C) is equal to.

a) (A × B) ? (A × C)

b) (A × B) n (A × C)

c) (A ? B) × (A ? C)

d) None of the mentioned

Answer

 

Answer: a

Explanation: It is distributive law.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button