Because the question assume frequency f depends on tension T, length L and mass per unit lemgth m Assume the relation is f= TaLbmc The dimsnsion must be the same on either side of the equation Dimension for f is 1/t Dimenswion for T is M L /t2, dimension for m is M/L 1/t = (M L /t2)a Lb M/Lc=Ma+cLa+bt-2a so -2a=-1 , a+c=0 and a+b=0