# GATE Solved Paper 2017-19 - GATE 2019

 Productions rule Semantic action D →  TL X1 .type =  X2 .type T →  int T.type = int T  →  float T.type = float L →  L1 , id X3 .type = X4  .type add Type(id.entry, X5 .type) L →  id addType(id.entry, X6 .type)
• A

X1 = L, X2 = T, X3 = L1, X4 = L  • B

X1 = L, X2 = L, X3 = L1, X4 = T  • C

X1 = L, X2 = L, X3 = L1, X4 = T  • D

X1 = T, X2 = L, X3 = T, X4 = L1  • Option : A
• Explanation :
SDT for inserting type information in the symbol table
D → TL {L.idtype = T.stype}
T → int {T.stype = int}
T → float {T.stype = float}
L → L1, id {L1.itype = L.itype}

• A

Ο(n)  • B

Ο(n log n)  • C

Ο(n2)  • D

Ω(n2log n)  • A

I only  • B

II only  • C

Both I and II  • D

Neither I nor II  • Option : C
• Explanation : If no two edges of G have same weight surely G will have unique spanning tree is true.
So I is true
Also if, for every cut of G, there is a unique minimum weight edge crossing the cut then G will have unique spanning tree is also true. So II is true
[Note: The converse of II is not true, but that is not relevant to this question]
So both I and II are true.
Option (C) is correct.

• A

I, II and III  • B

I, II and IV  • C

I, III and IV  • D

II, III and IV  Related Quiz.
GATE 2019