Email Record: Distribution theory of runs and patterns and its applications :