Difference between linear and tree recursions