ans:(b) II only
A->BC*
(I) B.i = f(A.i) //A is B's parent so Valid L Attributed rule
(III) A.S = f(B.S) //synthesized attribute so valid L attributed rule
as L attributed sdd can contain both left inherited and synthesized attributes
(II) B.i = f(A.S) inherited attribute i is dependent on synthesized attribute s of A so its not a valid L Attributed sdd rule
//ur at B and want to calculate B.i but its dependent on A.s which will be calculated once u finish B and move up in syntax tree, so its a cycle.
also a syntax-directed definition is Lattributed if each inherited attribute of Xj on the right side of A → X 1 X2 … Xn depends only on
1. the attributes of the symbols X 1, X2, …, Xj-1
2. the inherited attributes of A
reference:https://www.cs.fsu.edu/~engelen/courses/COP562107/Ch5a.pdf