A mathematical theory of cooperative communication