Answer : 3 [ S->XY , Y->ϵ, M->ϵ ]
First(S) = { ( , e } Follow(S) = { ) , $ }
First(X) = { ( , e } Follow(X) = { p, ) , $ }
First(Y) = { p , ϵ } Follow(Y) = { ) , $ }
First(M) = { q , ϵ } Follow(M) = { p, ) , $ }
So different missing entries are :
1) S->XY [under ( ]
2) Y->ϵ [under $ and ) ]
3) M->ϵ [under ) and $ ]