Error minimizing relaxation strategies in Landweber and Kaczmarz type iterations