Factors influencing the evolution of symbiotic relationships