Characterizing Functions in Kleene Algebras