Discrete Mathematics Mathematical Logic GATE Previous Years Questions solutions

Ques 1: What is the converse of the following assertion?
I stay only if you go

GATE 2001

(A) I stay if you go

(B) If I stay then you go

(C) If you dont go then I dont stay

(D) If I dont stay then you go

Ans: (B) If I stay then you go

Solution: let us assume

P: I stay

Q: You go

Given Q→P

Converse is P→Q

i.e If I stay then you go

Ques 2: Consider the following logical inferences:

GATE 2012

I1: If it rains then the cricket match will not be played.

The cricket match was played.

Inference: There was no rain.

I2: If it rains then the cricket match will not be played.

It did not rain.

Inference: The cricket match was played.

Which of the following is TRUE?

(A)  Both I1 and I2 are correct inferences

(B) I1 is correct but I2 is not a correct inference

(C) I1 is not correct but I2 is a correct inference

(D) Both I1 and I2 are not correct inferences

Ans: (B) I1 is correct but I2 is not a correct inference

Solution: let us assume

R: It Rains

C: Cricket Match will not be Played

I1: R→C

means

¬C→¬R (Modus Tollen or the rule of Contrapositive)

So it is True

I2: R→C

¬R→¬C which is not valid

Ques 3: Consider the following statements:

GATE 2014 Set 3

P: Good mobile phones are not cheap

Q: Cheap mobile phones are not good

L: P implies Q

M: Q implies P

N: P is equivalent to Q

Which one of the following about L, M, and N is CORRECT?

(A) Only L is True

(B) Only M is True

(C) Only N is True

(D) L,M,N are True

Ans: (D) L,M,N are True

Solution: let us assume

G: Good Mobile phone

C: Cheap Mobile Phone

L: G→¬C

M: C→¬G

N: C ↔G

So all three are True

Ques 4: Consider the following two statements.

GATE 2015 Set 2

S1: If a candidate is known to be corrupt, then he will not be elected.

S2: If a candidate is kind, he will be elected.

Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?

(A)  If a person is known to be corrupt, he is kind

(B) If a person is not known to be corrupt, he is not kind

(C) If a person is kind, he is not known to be corrupt

(D)  If a person is not kind, he is not known to be corrupt

Ans: (C) If a person is kind, he is not known to be corrupt

Solution: let us assume

C: Corrupt person

K: Kind person

E: Elected Person

S1: C→E’

S2: K→E

which means

E’→K’

Combining: C→E’ and E’→K’ means C→K’

K→C’

Ques 5: In a room there are only two types of people, namely Type 1 and Type 2. Type 1 people always tell the truth and Type 2 people always lie. You give a fair coin to a person in that room, without knowing which type he is from and tell him to toss it and hide the result from you till you ask for it. Upon asking, the person replies the following:

GATE 2015 Set 3

“The result of the toss is head if and only if I am telling the truth.”

Which of the following options is correct?

(A) The result is head

(B) The result is tail

(C) If the person is of Type 2, then the result is tail

(D) If the person is of Type 1, then the result is tail

Ans: (A) The result is head

Solution: There are 2 cases:

Case 1: If the person is of Type 1, then

“The result of the toss is head if and only if I am telling the truth”

this sentence is true.

And, he’s telling the truth. So, head.

Case 2: If the person is of Type 2, then

“The result of the toss is head if and only if I am telling the truth”

this sentence is false.

“The result of the toss is head if and only if I am lying” would be true.

Since the given person is lying. So, head.

Ques 6: Consider the following expressions:

GATE 2016 Set 2

(A) False

(B) Q

(C) True

(D) P V Q

(E) Q’ V P

The number of expressions given above that are logically implied by P∧(P⇒Q) is

Ans: 4

Solution: P∧(P⇒Q) 

P(P’ + Q)

0+PQ

PQ

(i) False

means PQ⇒ False

(PQ)’+0

P’ + Q’ + 0

≠1

Not valid

(ii) Q

means PQ⇒Q

(PQ)’+Q

P’ + Q’ + Q

P’ +1

=1

valid

(iii) True

PQ⇒True

(PQ)’ + 1

P’ + Q’ +1

=1

So valid

(iv) P V Q

(PQ) ⇒ (P V Q)

(PQ)’ + (P V Q)

P’ + Q’ + P + Q

P’ + P + Q’ + Q

1=1

=1

So valid

(v) Q’ V P

(PQ) ⇒ (Q’ V P)

(PQ)’ + (Q’ +P)

P’ +Q’ + Q’ + P

P’ + P + Q’

1+Q’

=1

So valid

So total 4 expressions are valid

Ques 7: Consider the first-order logic sentence

GATE 2018

φ≡∃s∃t∃u∀v∀w∀x∀yψ(s,t,u,v,w,x,y)φ≡∃s∃t∃u∀v∀w∀x∀yψ(s,t,u,v,w,x,y)

where ψ(s,t,u,v,w,x,y) is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose φ has a model with a universe containing 7 elements.

Which one of the following statements is necessarily true?

(A) There exists at least one model of φ with universe of size less than or equal to 3

(B) There exists no model of φ with universe of size less than or equal to 3

(C) There exists no model of φ with universe size of greater than 7

(D) Every model of φ has a universe of size equal to 7

Ans: (A) There exists at least one model of φ with universe of size less than or equal to 3

Ques 8: Let p,q,r denote the statements ”It is raining”, “It is cold”, and “It is pleasantrespectively. Then the statement “It is not raining and it is pleasant, and it is not pleasant only if it is raining and it is cold” is represented by

GATE 2017 Set 2

(A) (¬p∧r)∧(¬r→(p∧q))

(B) (¬p∧r)∧((p∧q)→¬r)

(C) (¬p∧r)∨((p∧q)→¬r)

(D) (¬p∧r)∨(r→(p∧q))

Ans: (A) (¬p∧r)∧(¬r→(p∧q))

Solution:Not Pleasant only if it is raining and cold means

Not Pleasant implies it is raining and cold

¬r→(p∧q)

Ques 9: The CORRECT formula for the sentence, “not all Rainy days are Cold” is

GATE 2014 Set3

(A) ∀d(Rainy(d)∧~Cold(d))

(B) ∀d(~Rainy(d)→Cold(d))

(C) ∃d(~Rainy(d)→Cold(d))

(D) ∃d(Rainy(d)∧~Cold(d))

Ans: (D) ∃d(Rainy(d)∧~Cold(d))

Solution: In other words it says ‘‘Some rainy days are not cold”

Given statement is

¬∀d[R(d)→C(d)]

≡¬∀d[¬R(d)∨C(d)]

≡∃d[R(d)∧¬C(d)]

Hence option (D) is correct.

Ques 10: Consider the statement

GATE 2014 SET 1

 “Not all that glitters is gold”

Predicate glitters(x) is true if x glitters and

Predicate gold(x) is true if x is gold.  

Which one of the following logical formulae represents the above statement?

(A) ∀x:glitters(x)⇒¬gold(x)

(B) ∀x:gold(x)⇒glitters(x)

(C) ∃x:gold(x)∧¬glitters(x)

(D) ∃x:glitters(x)∧¬gold(x)

Ans: (D) ∃x:glitters(x)∧¬gold(x)

Solution: (D) means There exist a metal x which glitter but is not gold

Ques 11: What is the correct translation of the following statement into mathematical logic?

GATE 2012

“Some real numbers are rational”

(A) ∃x(real(x) ∨ rational(x))

(B) ∀x(real(x)→rational(x))

(C) ∃x(real(x) ∧ rational(x))

(D) ∃x(rational(x)→real(x))

Ans: (C) ∃x(real(x) ∧ rational(x))

Solution: Meaning of each choices:

There exists a number which is either real or rational

If a number is real it is rational

There exists a number which is real and rational

There exists a number such that if it is rational, it is real

So answer is (C)

Ques 12: What is the logical translation of the following statement?

GATE 2013

None of my friends are perfect

(A) ∃x(F(x)∧¬P(x))

(B) ∃x(¬F(x)∧P(x))

(C) ∃x(¬F(x)∧¬P(x))

(D) ¬∃x(F(x)∧P(x))

Ans: (D) ¬∃x(F(x)∧P(x))

Solution: Meaning of these options are:

A) “Some of my friends are not perfect”

B) “Some are not my friends and are perfect”

C) “Some are not my friends and are not perfect”

D) “There exist no one who is my friend and is perfect”

error: You can only copy the programs code and output from this website. You are not allowed to copy anything else.