@MartinSleziak , Sorry for late reply, I was a bit busy. The problem is of competitive exam GATE old papers. The solution is given deferent-2 in market solution books. The site for GATE old papers(
gateoverflow.in/previous-years ) made by students, and explanation given there by student. I've also written some answers there. For this question there is no solution available.