Answer : D) 1 and 3
Anti Data Dependency is caused when Instruction ‘J’ tries to Write the data before Instruction ‘I’ Reads it (Write-Before-Read)
So we need to find where (O/p register of Inst. ‘J’) == (I/p register of Inst. ‘I’). Anti data dependency can be non adjacent.
Here, $(I3-I1)$ creates Anti Data Dependency because $I3$ writes $R1$ before $I1$, if $I3$ will execute before $I1$.
Hence $1$ Anti Data Dependency.
True Data Dependency is caused when Instruction ‘J’ tries to Read the data before Instruction ‘I’ Writes it (Read-Before-Write)
So we need to find where (I/p register of Inst. ‘J’) == (O/p register of Inst. ‘I’). True data dependency is always adjacent data dependency.
Here, $(I2-I3)$ creates True Data Dependency because $I3$ reads $R2$ before $I2$, if $I3$ will execute before $I2$.
Here, $(I3-I4)$ creates True Data Dependency because $I4$ reads $R1$ before $I3$, if $I4$ will execute before $I3$.
Here, $(I4-I5)$ creates True Data Dependency because $I5$ reads $R2$ before $I4$, if $I5$ will execute before $I4$.
Hence $3$ True Data Dependency.