Automorphisms and derivations in prime rings